We have an NFS 4 share, sharing a volume between a number of servers (NFS server, and clients all Debian 8). We have had some issues recently where network outages would freeze the client systems.
Our NFS options were minimal, just rw
(and so the defaults hard
, fg
, etc).
I'm now experimenting with these options, but am not getting the behaviour I expect:
rw,soft,bg,retrans=6,timeo=150
(I've increased the retrans to offset some of the soft risk)
The procedure I'm following to test is :
- Boot machine
cd
to/mnt/mountpoint
- Verify NFS connection ok
cd /
- kill network
ifdown eth0
cd
to/mnt/mountpoint
ls
At this point the command line freezes, and I can't interupt it. After some time the message 'nfs: server [servername] not responding, timed out`, which seems to repeat once a minute (indefinately).
What I would like/expect to happen for the operation to fail, and return control.
Please could someone tell me where I'm going wrong with these settings?
(PS: I also tried mounting with autofs, but saw similar behaviour)
Thank you
soft
under any circumstances. It allows data to be discarded on error. Instead I'd suggesthard,intr
. – Chris Davies Mar 02 '16 at 17:59hard
is just as bad for us (systems dying and staying dead until rebooted).intr
is not supported in NFS4 according to man. – UpTheCreek Mar 02 '16 at 18:01intr
it's supported by NFS4, but not by kernels > 2.6.25) – UpTheCreek Mar 02 '16 at 19:16cd
, but instead doingls /mnt/mountpoint
? It's possible that after thels
fails, your shell is attempting filesystem operations dependent on PWD. (Even worse, if you were foolish enough to put.
in your$PATH
) – Toby Speight Mar 14 '16 at 10:03