I have been working on my server, from which I export one directory using NFS.
Of course over the week or so of server reboots, I multiple times forgot to umount the export filesystem in my workstation (which gets mounted from /etc/fstab on boot). In between I was able to umount after the fact and remount (I am not using autofs):
umount -fl /data0
mount /data0
But this no longer works.
I cannot mount the exported directory from the server on a different directory (mount hangs), but I can nfs mount that exported dir on a virtual machine running on my workstation.
What I tried is removing (rmmod) the nfs and nfsv3 module (which would not work: Resource temporarily unavailable). lsof hangs. mount doesn't show anything mounted via nfs. This is all probably a result of using 'umount -l' multiple times, but the first two times this worked without a problem.
I have restarted the server in the mean time, after not being able to mount without that making any difference. I also used service nfs-kernel-server restart. I suspect everything would be back to normal if I restart the client workstation.
Is there a way to recover from this and reinitialise the nfs client side on my workstation without a reboot?
If I cannot fix this without reboot, would this not reoccur if I start using autofs?
lsof -b hangs with as last lines:
lsof: avoiding readlink(/run/user/1001/gvfs): -b was specified.
lsof: avoiding stat(/run/user/1001/gvfs): -b was specified.
lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1001/gvfs
Output information may be incomplete.
in the lines preceding that, there is no /data0.
The entry in /etc/fstab:
192.168.0.2:/data0 /data0 nfs defaults,auto,nolock,user 0 2
lsof -bhang? – muru Jan 02 '15 at 12:26upstartand all. You probably want to restart all the services in thenfs-commonpackage, looks like there are a few. Order likely matters as well, so try stopping then starting in order of dependency. You probably also want to dorpcbindas your last stop/first start. I have done this before on Debian, but it just has one nicenfs-commonservice. – Graeme Jan 02 '15 at 15:03nfs-commonpackage on Mint, but there are no /etc/init.d entries from that to restart.rpcbindrestart doesn't help. – Anthon Jan 02 '15 at 16:08mount /data0), I have added the full/etc/fstabentry. – Anthon Jan 02 '15 at 16:09/etc/init,/etc/init.dis only for SystemV scripts - https://help.ubuntu.com/community/UbuntuBootupHowto – Graeme Jan 02 '15 at 16:13intrto your mount options, see the nfs man pageman nfsfor a description of intr. This should help prevent this in the future. You are most likely going to need to reboot to clear this condition, nfs sub system is just locked at this point. – PaperMonkey Jan 02 '15 at 16:50intris deprecated and ignored on my 3.13 kernel – Anthon Jan 02 '15 at 16:57