Solved [solved] the nfshost has gone ... the nfsclient hangs

I had mounted an NFS filesystem on an NFS client which worked. Then I took the NFS host offline without unmounting first on the NFS client. Some may start grinning at that point, but I did run into this the first time. I tried a forced umount but this resulted in a hang. Then I sent some KILL signals to the pid – nothing worked. A reboot also hang for minutes until I pushed the power switch. That finally completed a shutdown after nine minutes.
Is there a way to resolve the unmount other than with the power switch, as a power switch is not always within reach?
How should an NFS mount be configured, to minimize such problems?
 
Re: the nfshost has gone ... the nfsclient is forced to foll

NFS is very problematic because the original design didn't take into account the possibility of the client having the rug pulled underneath it in form of the NFS server dissappearing suddenly and not coming back online. The client would then wait indefinitely for the server to reappear and if it doesn't reappear you have a hard deadlock that can't be solved by any other means than a reboot of the client machine. There are later additions to the mount_nfs(8) options that can remedy the problem, intr and soft.

Code:
     If the server becomes unresponsive while an NFS file system is mounted,
     any new or outstanding file operations on that file system will hang
     uninterruptibly until the server comes back.  To modify this default be‐
     haviour, see the intr and soft options.
 
Back
Top