Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
    
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 '09 at 15:31

3 Answers 3

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.

share|improve this answer

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

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.