[Tutor] Testing the status of NFS mounts

Kent Johnson kent37 at tds.net
Thu Jan 4 16:38:28 CET 2007


Andrew Robert wrote:
> Hi everyone,
> 
> We have several NFS mounts that are in use.
> 
> Occasionally, the NFS mounts seem to go out to lunch.
> 
> The mounts appear active but are no longer functional.
> 
> Is there a Python module specific to NFS that I might use to 
> periodically check its status?
> 
> I imagine I could make a script to attempt a write on the share and 
> clean up after itself but I am hoping for a more elegant solution.
> 
> Any insight anyone can provide on this would be greatly  appreciated.

If the share is mounted on the test machine, seems to me a simple 
os.path.isdir(<path to NFS root>) might do the trick. Otherwise, a quick 
Google turns up
http://www.citi.umich.edu/projects/nfsv4/pynfs/

HTH
Kent



More information about the Tutor mailing list