Never reboot a system for stall NFS

Posted on June 17, 2007 by ZDima.
Categories: UNIX.

This was copied from VentureCake. I keep it here because this is useful information and would be handy.


At some point every Linux admin has had a problem with a computer using a hard-mounted NFS export, where the connecton to the server has been lost - perhaps the network had a problem or the server went down. Any processes which check the status of filesystems - df, rpm, etc. - will hang, waiting on the storage to respond. Next time, you’ll want to mount using the intr option (not soft - see the Linux NFS FAQ). This time, run:

killall -KILL rpciod

rpciod (the kernel process that handles NFS IO), will instantly respawn, sending errors to processes waiting for NFS IO, causing them to respond. If you’re mounting exports from multiple NFS servers and only wish to time out a single connection, you can do so with:

iptables -A OUTPUT -d nfsserver -j REJECT

Within about a minute, the NFS client will decide the server is unreachable. Again, the processes start responding.

You can now unmount the NFS server. No need to reboot.

Benefit: No need to reboot when an NFS mount fails.
Works in: any Linux.
Drawbacks: You can’t disable an individual NFS export, just all the exports from A particular NFS server. Still beats rebooting though.

1 comment.

Pingback on January 13th, 2008.

[...] Never reboot a system for stall NFS Posted on June 17th, 2007 @ ZDima.net. Categories: UNIX.This was copied from VentureCake. I keep it here because this is useful information and would be handy [...]

Leave a comment

Names and email addresses are required (email addresses aren't displayed), url's are optional.

Comments may contain the following xhtml tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>