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

Re: Unmounting NFS partition in case of time-out?

On Mon, 24 Jan 2005 18:00:23 +0100, Kevin B. McCarty wrote:

> Is there a way to have an NFS mount become "invisible" if the NFS server
> doesn't respond after a certain time?  I'm not sure if the mount option
> timeo=<time> does exactly what I want; it appears to just cause NFS
> accesses to fail after the given amount of time.  Can a non-working NFS
> mount even be umount'ed?

It can. You have to use the option  soft  
from man nfs
If an NFS file operation has a major timeout then report an I/O error to
the calling program.  The default is to continue retrying NFS file 
operations indefinitely

If you mount your NFS shares "hard" and try to access it, the process
hangs in state D which cannot be killed. (Anybody has ideas?)

> In an ideal world the NFS mount would automatically be recovered once
> the file server is brought back up, but I can live without this feature

I think this will be done automatically when you mount soft.

> Possible to do this easily, or do I need to hack up something with ping
> in a cron job?

Maybe you should use a cron job for checking the presence of the NFS
mounts, and generate a error page on some location if the NFS mount is

   bis denne,

get my gpg public key at http://www.haschmir.de/chrissie-web.asc 
You prefer the company of the opposite sex, but are well liked by your own.

Reply to: