I can't imagine there isn't a simple strategy to solve this issue of stale nfs handles preventing a machine from shutting down normally, but I'm not sure what that would be. It's pretty annoying to have to force a reboot just because a wifi connection dropped out at some point while watching endless 'waiting for nfsmount' messages.
1 Answer
What are your mount options?
You should experiment with "hard,intr
", or "soft
" (with "timeo
"), and possibly "retrans
" depending on your client options. Using TCP instead of UDP may also help. The default is usually "hard
".
Using "soft" is usually advised against, it can result in written data being lost. It's safe to use as read-only.
On latter linux kernels (2.6.25) NFS clients "intr" is deprecated, sigkill should just work. "umount -f
" and "umount -l
" can help.
See also Stop broken NFS mounts from locking a directory? and https://serverfault.com/questions/365149/how-do-i-forcibly-unmount-when-im-getting-stale-nfs-file-handles .
-f
for netfs (modify the mount command), I couldn't remember the exact name of the service