help debug NFS
Hello I have an NFS server on OpenBSD 6.8 stable which exports a folder with default settings. I have a linux mint client which mounts a share from this NFS server with these settings: sudo mount -o wsize=8192,rsize=8192 192.168.1.65:/big /home/user/store which gives a decent speed at about 50-60MB/s both sides which seem ok for me. The problem is: when the mount point is not used for a while (5 minutes and more) the share becomes unresponsive and the only way to unmount the share is to do sudo umount -lf /home/user/store After that I can mount the share once again. When I imitate using the share on client using while :; do ls /home/user/store/ && echo "OK" && sleep 3 ; done; the share remains responsive all the time and shows no problems. What tweaks(settings) on the client(server) am I missing in my setup to keep the mount point responsive? -- Best regards Maksim Rodin
Re: help debug NFS
Hi Maxim, I cannot help you fix this as I don't have a similar set-up but I can tell you this isn't normal behaviour for NFS. You should not need to tweak anything to get a stable mount at least in my experience. It sounds like a bug somewhere to me. You could try using the gnu watch command or similar while loop to run an ls of the share from the client to confirm if it hangs after non use or after five minutes regardless of use or non-use. You could also try testing the network connection between the two machines to make sure there is no connectivity or cable problem. You could use the same while loop to run rpcinfo or showmount commands from the client and server to see if it stops working after the same delay. Someone with more knowledge of NFS might suggest some better debugging steps... Regards Ed Gray On Sun, 11 Apr 2021, 10:07 am Родин Максим, wrote: > Hello > I have an NFS server on OpenBSD 6.8 stable > which exports a folder with default settings. > I have a linux mint client which mounts a share from this NFS server > with these settings: > sudo mount -o wsize=8192,rsize=8192 192.168.1.65:/big > /home/user/store > which gives a decent speed at about 50-60MB/s both sides which seem ok > for me. > The problem is: when the mount point is not used for a while (5 minutes > and more) the share becomes unresponsive and the only way to unmount the > share is to do > sudo umount -lf /home/user/store > After that I can mount the share once again. > When I imitate using the share on client using > while :; do ls /home/user/store/ && echo "OK" && sleep 3 ; done; > the share remains responsive all the time and shows no problems. > > What tweaks(settings) on the client(server) am I missing in my setup > to keep the mount point responsive? > -- > Best regards > Maksim Rodin > >
Re: help debug NFS
Hi Maxim, I ran into the problem with the nfs mounts on linux hanging a few months ago, when the Linux distro that I'm running (Void) on the NFS client dropped UDP NFS mounts. At the time I found this post that explains the situation: http://openbsd-archive.7691.n7.nabble.com/nfsd-hangs-Linux-tcp-clients-after-5-minutes-idle-td402844.html As a work around, I've set up a cron script that stat's the mount point every four minutes. That stops the mount from hanging. I hope that helps. James On Sun, Apr 11, 2021 at 2:04 AM Родин Максим wrote: > > Hello > I have an NFS server on OpenBSD 6.8 stable > which exports a folder with default settings. > I have a linux mint client which mounts a share from this NFS server > with these settings: > sudo mount -o wsize=8192,rsize=8192 192.168.1.65:/big > /home/user/store > which gives a decent speed at about 50-60MB/s both sides which seem ok > for me. > The problem is: when the mount point is not used for a while (5 minutes > and more) the share becomes unresponsive and the only way to unmount the > share is to do > sudo umount -lf /home/user/store > After that I can mount the share once again. > When I imitate using the share on client using > while :; do ls /home/user/store/ && echo "OK" && sleep 3 ; done; > the share remains responsive all the time and shows no problems. > > What tweaks(settings) on the client(server) am I missing in my setup > to keep the mount point responsive? > -- > Best regards > Maksim Rodin >
Re: help debug NFS
Hi, James Thank you for the link. Since the problem really exists, the only option is to use a periodical querying the mount point like you recommend or like I did using while-loop. 11.04.2021 21:11, James Stark пишет: Hi Maxim, I ran into the problem with the nfs mounts on linux hanging a few months ago, when the Linux distro that I'm running (Void) on the NFS client dropped UDP NFS mounts. At the time I found this post that explains the situation: http://openbsd-archive.7691.n7.nabble.com/nfsd-hangs-Linux-tcp-clients-after-5-minutes-idle-td402844.html As a work around, I've set up a cron script that stat's the mount point every four minutes. That stops the mount from hanging. I hope that helps. James On Sun, Apr 11, 2021 at 2:04 AM Родин Максим wrote: Hello I have an NFS server on OpenBSD 6.8 stable which exports a folder with default settings. I have a linux mint client which mounts a share from this NFS server with these settings: sudo mount -o wsize=8192,rsize=8192 192.168.1.65:/big /home/user/store which gives a decent speed at about 50-60MB/s both sides which seem ok for me. The problem is: when the mount point is not used for a while (5 minutes and more) the share becomes unresponsive and the only way to unmount the share is to do sudo umount -lf /home/user/store After that I can mount the share once again. When I imitate using the share on client using while :; do ls /home/user/store/ && echo "OK" && sleep 3 ; done; the share remains responsive all the time and shows no problems. What tweaks(settings) on the client(server) am I missing in my setup to keep the mount point responsive? -- Best regards Maksim Rodin -- С уважением, Родин Максим