Re: Determine whether a NFS mount is actually reachable
Re: Determine whether a NFS mount is actually reachable
- Subject: Re: Determine whether a NFS mount is actually reachable
- From: Mike Mackovitch <email@hidden>
- Date: Sat, 21 Feb 2015 15:18:30 -0800
On Sat, Feb 21, 2015 at 11:01:06PM +0100, Thomas Tempelmann wrote:
> (I realize this isn't really the best place to ask this question as it's
> rather a user-level API question, not a filesys designer's question, but I
> give it a try anyway because I didn't have luck finding answers elsewhere
> so far.)
>
> My question is: How can a user level app determine whether an automounted
> NFS share is currently accessible or not?
You can use getfsstat(..., ..., MNT_NOWAIT) to get the current list of mounted filesystems.
(Note: this will include things you may not consider a "filesystem" or "volume".
For example, synthetic autofs directories (/net, /home, /Network/Servers).)
However, whether a remote filesystem is "accessible" or not is never certain.
Even if you *just* accessed files on it, a millisecond later that server
may become inaccessible.
Network file systems attempt to make remote resources look like they are local.
Unfortunately, networks often do not like to cooperate.
HTH
--macko
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Filesystem-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden