Client recovery of NFS mount

Client recovery of NFS mount

Ehud Karni ehud at unix.mvs.co.il
Wed May 12 13:55:51 IDT 2010


On Wed, 12 May 2010 10:28:13 Tom Rosenfeld wrote:
>
> Is there a way in RHEL 5 for NFS clients to recover automatically after a
> server reboot?

There is the "hard" (and "intr" that can go with it) option for NFS mounts:
  hard  If an NFS file operation has a major timeout then report  "server  not
        responding"  on  the console and continue retrying indefinitely.  This
        is the default.

  intr  If an NFS file operation has a major timeout and it is  hard  mounted,
        then  allow  signals  to  interupt  the file operation and cause it to
        return EINTR to the calling program.  The default is to not allow file
        operations to be interrupted.

Note that "hard" is the default, but the option "soft" (or "nohard") cancels it.

I use "hard,intr" and it solve the problem you describe in most case but
not all (I did not find the reasons for the different behavior).

> Every time my server goes down, even for just a few minutes the clients get
> stuck with STALE nfshandles and the only way for me to recover is to umount
> and then mount again.

Try my suggestion above.

Ehud.


--
 Ehud Karni           Tel: +972-3-7966-561  /"\
 Mivtach - Simon      Fax: +972-3-7976-561  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D <http://www.keyserver.net/>    Better Safe Than Sorry



More information about the Linux-il mailing list