4 ms·
On this article, one of the tricks you can do to avoid the hung NFS client reboots is to quickly alias the NFS server IP onto the local device (ip addr add ...)
by gravitas 7y ago
On this article, one of the tricks you can do to avoid the hung NFS client reboots is to quickly alias the NFS server IP onto the local device (ip addr add ...). This basically causes the networking layer to act like the NFS server went away but also return a RST (reset) network packet to that effect, allowing the failure to propagate upwards to the rest of the stack and unhang.
- jmiserez 7y agoUnplugging the ethernet cable usually also works.
- the8472 7y agoyou could also mount nfs with soft timeouts which won't wait forever and instead return an error to userspace.
- Spivak 7y agoWhich is a very good practice if you're in control of the software receiving the error. But so much freaking software doesn't handle this correctly it's maddening and so sleep everything that touches it is the only safe thing to do.
- GauntletWizard 7y agoFor some network filesystems, I want to mount them "Kill every process with a filehandle open to this on error". Is there a way to do that?
- the8472 7y agoNFS has been converted to to the TASK_KILLABLE mentioned elsewhere in the comments, so you could scan for threads stuck in this state, scan proc for open file descriptors pointing to the network filesystems and then kill those processes. That of course doesn't work if you're dealing with a filesystem that still uses TASK_UNINTERRUPTIBLE