• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Determine whether a NFS mount is actually reachable
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Determine whether a NFS mount is actually reachable


  • Subject: Re: Determine whether a NFS mount is actually reachable
  • From: Thomas Tempelmann <email@hidden>
  • Date: Sun, 22 Feb 2015 21:11:07 +0100

I did some testing and can confirm that what Jim wrote below only tells me whether a path has an auto-mount trigger, but not whether it's actually reachable at the moment.

So far, to tell if the volume is actually available I must try to read its content. Often I would then get an error returned for off-line vols immediately, and sometimes the call would take a long time before I get the error, which means that it tried to contact the server, waiting, and eventually timing out.

What bothers me is that the "automountd" daemon maintains a state of whether the volume is currently accessible or not, and it silently keeps on checking if the server is reachable. I had hoped that this state would be communicated thru the BSD APIs, but that doesn't seem to be the case. Bummer.

Thomas


On Sat, Feb 21, 2015 at 11:56 PM, Jim Luther <email@hidden> wrote:
You can tell if the automounted volume has been auto-unmounted by checking to see if it is a trigger again — at a low-level with getattrlist() by checking the DIR_MNTSTATUS_TRIGGER bit returned for the ATTR_DIR_MOUNTSTATUS attribute, or at a high level by checking the value of the NS/kCFURLIsMountTriggerKey resource property value. Accessing a path beyond a trigger of opening the trigger directory will cause the automount to be mounted.

However, that doesn’t really answer your question because a mounted network volume’s server might not be accessible, and mounting/remounting an automount might not find the file server. Other than pinging the server’s host, there’s not much you can do to tell the server is reachable (and even if it pings OK, the NFS server might not be responsive). Someone else might have more/better suggestions.

 _______________________________________________
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

  • Follow-Ups:
    • Re: Determine whether a NFS mount is actually reachable
      • From: Thomas Tempelmann <email@hidden>
References: 
 >Determine whether a NFS mount is actually reachable (From: Thomas Tempelmann <email@hidden>)
 >Re: Determine whether a NFS mount is actually reachable (From: Jim Luther <email@hidden>)

  • Prev by Date: Re: Determine whether a NFS mount is actually reachable
  • Next by Date: Re: Determine whether a NFS mount is actually reachable
  • Previous by thread: Re: Determine whether a NFS mount is actually reachable
  • Next by thread: Re: Determine whether a NFS mount is actually reachable
  • Index(es):
    • Date
    • Thread