# Why do nfs filesystems block everything when network is down?



## laufdi (Jan 16, 2019)

`df` blocks forever, even a reboot hangs forever if the network is down. Why?


----------



## olli@ (Jan 16, 2019)

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.


----------



## laufdi (Jan 16, 2019)

I have set *soft* already but it doesn't help. Is there another recommended more interruptible network "filesystem"?


----------



## olli@ (Jan 16, 2019)

As I mentioned, using the `soft` mount option can be dangerous. I would advise against it.
The `soft` option _only_ works if you also set a non-zero `retrycnt` (the default is zero). See the mount_nfs(8) manual page.
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.


----------

