Why do nfs filesystems block everything when network is down?

Because that's how NFS works. The client waits until it receives a reply from the server, even if that means waiting forever.
From the mount_nfs(8) manual page: “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.”
The behavior can be changed somewhat with the intr and soft mount options, but these have negative impact on file system integrity. Do not use them.
 
I have set soft already but it doesn't help. Is there another recommended more interruptible network "filesystem"?
 
  1. As I mentioned, using the soft mount option can be dangerous. I would advise against it.
  2. The soft option only works if you also set a non-zero retrycnt (the default is zero). See the mount_nfs(8) manual page.
  3. You could try the intr option (instead of soft – do not use both), which is a little less dangerous and might solve the issue that you're seeing (e.g. interrupting hanging commands like df).
PS: Keep in mind that NFS was designed for reliable and stable servers and networks, and for an availability level that's comparable to a local hard disk. If that condition is not met, then it's probably not a good idea to use NFS.
 
Back
Top