Re: Optimal NFS mount options to safely allow interrupts and timeouts on newer kernels

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 5 Mar 2014 11:45:24 -0600 (CST) Andrew Martin <amartin@xxxxxxxxxxx>
wrote:

> Hello,
> 
> Is it safe to use the "soft" mount option with proto=tcp on newer kernels (e.g
> 3.2 and newer)? Currently using the "defaults" nfs mount options on Ubuntu
> 12.04 results in processes blocking forever in uninterruptable sleep if they
> attempt to access a mountpoint while the NFS server is offline. I would prefer
> that NFS simply return an error to the clients after retrying a few times, 
> however I also cannot have data loss. From the man page, I think these options
> will give that effect?
> soft,proto=tcp,timeo=10,retrans=3
> 
> >From my understanding, this will cause NFS to retry the connection 3 times (once
> per second), and then if all 3 are unsuccessful return an error to the
> application. Is this correct? Is there a risk of data loss or corruption by
> using "soft" in this way? Or is there a better way to approach this?

I think your best bet is to use an auto-mounter so that the filesystem gets
unmounted if the server isn't available.
"soft" always implies the risk of data loss.  "Nulls Frequently Substituted"
as it was described to very many years ago.

Possibly it would be good to have something between 'hard' and 'soft' for
cases like yours (you aren't the first to ask).

 From http://docstore.mik.ua/orelly/networking/puis/ch20_01.htm

   BSDI and OSF /1 also have a spongy option that is similar to hard , except
   that the stat, lookup, fsstat, readlink, and readdir operations behave like a soft MOUNT . 

Linux doesn't have 'spongy'.  Maybe it could.  Or maybe it was a failed
experiment and there are good reasons not to want it.

NeilBrown

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux