Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to create a script that runs on the client and checks my NFS mount periodically and changes some stuff around (moves a read-only, local version of the data in place of NFS) if there is an issue. Right now the script attempts to load a file on the NFS mount, which more or less works, except it takes 5 minutes to time out when there is an issue. Is there a way to set the timeout of a file request? Or another way to quickly test if my NFS mount is working? Even better would be a way to have NFS unmount itself if the connection gets dropped.


share|improve this question
How are you mounting NFS and what NFS version are you using? – jeffatrackaid Jan 3 '12 at 21:48

There are hard and soft mounts that have different behaviors when network connectivity is lost.

hard or soft — Specifies whether the program using a file via an NFS connection should stop and wait (hard) for the server to come back online, if the host serving the exported file system is unavailable, or if it should report an error (soft).

You may want to review the NFS mount options and see which best fit your needs. Intr is another one to check.

NFS Monitoring

In terms of checking NFS mounts, why re-invent the wheel. I would take a look at some nagios plugins to start:

Perhaps you can modify those to meet your needs.

In our practice, we often monitor NFS indirectly. We monitor the applications that depend on an NFS mount. If the app fails, our response procedures include checking NFS. We could monitor NFS directly but we see NFS failures very rarely.

share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.