I have a file server with a NFS server running.
/etc/exports contains this line for the share:
/mnt/datastorev2/data/<username> 192.168.20.*(rw,no_root_squash,no_subtree_check) 192.168.22.*(rw,no_root_squash,no_subtree_check)
/mnt/datastorev2/ a ZFS mirrored file system is mounted.
I've tried these definitions as below inside
/etc/fstab on my client machine, and am currently using the
192.168.20.72:/mnt/datastorev2/data/<username> /media/<servername>/datastorev2/ nfs rw,noauto,user,_netdev,bg 0 0 192.168.20.72:/mnt/datastorev2/data/<username> /media/<servername>/datastorev2/ nfs noauto,x-systemd.automount,x-systemd.device-timeout=10,timeo=14,x-systemd.idle-timeout=1min,user 0 0
I'm able to mount the file shares using
dolphin but after a while the share becomes inaccessible with the message:
mount.nfs: Stale file handle error
And the message in
Failed to mount "datastorev2".
Error when getting information for file “/media/< servername >/datastorev2”: Stale file handle.
I'm unable to find real information about this problem and can't find what debug info would be of use (or even where to find these)
Ubuntu 18.04.2 LTS with kernel
4.15.0-51-generic. NFS on both systems is version 4.
(Sidenote: samba isn't an option for me because of latency and because of he fully linux network it would be a shame to use samba.)
sudo service nfs-server restart on the server fixes the problem and the shares become available again after 2 min on the client.
I was using Xubuntu 18.04 but am now using Kubuntu 18.04 (so without
thunar and only
dolphin) and haven't had this problem anymore.