Discussion:
help debug NFS
Родин Максим
2021-04-11 08:31:23 UTC
Permalink
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
Ed Gray
2021-04-11 17:53:42 UTC
Permalink
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
Post by Родин Максим
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
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
James Stark
2021-04-11 18:11:39 UTC
Permalink
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
Post by Родин Максим
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
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
Родин Максим
2021-04-12 07:53:00 UTC
Permalink
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.
Post by Ed Gray
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
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
Post by Родин Максим
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
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
--
С уважением,
Родин Максим
Continue reading on narkive:
Loading...