2

I have a case where I have one machine that has numerous NFS mounts. Once in a while, one of the NFS servers loses its devices due to a hardware issue that requires a reboot to fix.

Then, users come along via something like ftp, do an ls on a directory and it hangs. Then they typically get frustrated and try again. This ends up hanging the client machine by using up all of the ftp sessions.

Is there any way to get NFS to just drop the mount, so that when they do an ls they just get an empty directory? Or is there some way for me to detect when an NFS host isn't responding properly and drop it? ... Or can I do this from the server side somehow when drives are gone?

1
  • You should probably take this question over to serverfault.com. It's a sister site to this one, specifically for sys admin questions.
    – mamboking
    Jun 4, 2009 at 15:31

3 Answers 3

3

You first need to change your nfs mounts to us the interruptable options(intr on most flavors). This will allow you to Ctl-C out apps that would normally hang waiting for return from the kernel that is never gonna happen.

0

It will help if you use autofs, a soft mount, and a short timeo value on the client.

0

The above answers are excellent from the client point of view, but you should also think about the server side.

In our environment, we're using an nfs server to share out web content among several machines. The machines also use pacemaker/openais to figure out who should have the NFS server process running, the fiber channel volume mounted, and the IP address for the nfs server.

When we need to reboot one machine, pacemaker detects this and moves the active NFS server to another node so that services aren't interrupted.

You must log in to answer this question.