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 -b
hang? – muru Jan 02 '15 at 12:26upstart
and all. You probably want to restart all the services in thenfs-common
package, 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 dorpcbind
as your last stop/first start. I have done this before on Debian, but it just has one nicenfs-common
service. – Graeme Jan 02 '15 at 15:03nfs-common
package on Mint, but there are no /etc/init.d entries from that to restart.rpcbind
restart doesn't help. – Anthon Jan 02 '15 at 16:08mount /data0
), I have added the full/etc/fstab
entry. – Anthon Jan 02 '15 at 16:09/etc/init
,/etc/init.d
is only for SystemV scripts - https://help.ubuntu.com/community/UbuntuBootupHowto – Graeme Jan 02 '15 at 16:13intr
to your mount options, see the nfs man pageman nfs
for 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:50intr
is deprecated and ignored on my 3.13 kernel – Anthon Jan 02 '15 at 16:57