0

I have faced a problem recently with a NFS mapping. An I/O process (cp) got in uninterruptible sleep state and I ended up having to reboot the machine to fix the problem. Rebooting was bad so I don't want this to happen again.

It was mounted as follows:

mount //path/to/network/drive /path/to/folder -o domain=DOMAIN_HERE,username=USERNAME_HERE

It was a CIFS mount because the //path/to/network/drive is a windows filesystem (but I assume the command above figured this out automatically, since I didn't specify CIFS explicitly).

Upon investigating I found out that it was a "hard-mount" and that was a part of the problem. I found that a "soft-mount" could have helped, and also the intr option could have helped too.

So now I want to mount it again, but instead of simply calling the above command, I was thinking of calling it as follows:

mount //path/to/network/drive /path/to/folder -o soft,intr,domain=DOMAIN_HERE,username=USERNAME_HERE

Does this work? Are soft and intr compatible? I don't understand deeply what they do exactly but I've seen that they should help prevent the same issue from happening again because nothing would ever reach the uninterruptible sleep state with them. Also, since apparently option order matters, is the ordering above ok?

1 Answer 1

4

First of all, NFS is a file share protocol of its own that is not CIFS / SMB. Yes, it is a very generic name, but because NFS inspired some of these mount options and other conventions, be very clear in what you are using.


intr doesn't do anything.

CIFS:

intr currently unimplemented.

NFS:

intr / nointr This option is provided for backward compatibility. It is ignored after kernel 2.6.25.

soft is the mount option to use if you value fast failure. hard values data integrity and will hang the client if the server goes away.


You cannot escape the possibility of the file server going away unexpectedly leaving uninterruptable processes around. At best you minimize the risk by making the file share as reliable as you can, and reducing the use of such mounts on your system.


I assumed Linux. Please state your operating system going forward because various UNIXes and even the Linux distros may be different.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .