How to permanently mount a NFS share on Mac OS X Yosemite using automount

When mounting a volume with the Finder, it’ll be no permanent mount. Upon restart or even after logout the mount points are lost.

We’ll use automount to get it done in seconds.

I’ll assume your server is named myserver, and has two shares MyShare1 and MyShare2, which are located under /exported/path/ on the remote server.

It’s easy as adding a descriptor to /etc/auto_master:

/myserver	auto_myserver

Save and create a file named /etc/auto_myserver.

Add the following lines to this file:

MyShare1	myserver.local:/exported/path/MyShare1
MyShare2	myserver.local:/exported/path/MyShare2

To check if mounting works, run:

sudo automount -vc

The shares should have been mounted now under /myserver/MyShare1 and /myserver/MyShare2, and get mounted each time, you restart your Mac. Et voilĂ !

Benjamin Wiedmann

Benjamin Wiedmann is an IT Professional and Software Developer. Read more...

More Posts - Website

Follow Me:
TwitterFacebookLinkedInPinterestGoogle PlusFlickr

8 thoughts on “How to permanently mount a NFS share on Mac OS X Yosemite using automount”

  1. Thanks for this. It’s simplest mounting method I’ve seen.

    If my configuration is ‘nfs://192.168.0.1/foldername’ would the corresponding line in auto_myserver be:
    “MyFolderLabel myserver.local:/192.168.0.1/foldername/MyFolderLabel”?

    1. I’m a little confused…I would think it is an either/or situation…since you have your server name you shouldn’t need the IP address as well…

      I thought it would be EITHER:

      MyFolderLabel myserver.local:/foldername/MyFolderLabel
      ~or~
      MyFolderLabel 192.168.0.1:/foldername/MyFolderLabel

  2. Hey Benjamin,

    I have a number of systems, and what I found is that this works on systems that were UPGRADED to Yosemite, but it doesn’t seem to work on systems that were a clean install…I’m not sure what feature is turned OFF by default now, but something is amiss…

    Cheers
    Bryan

  3. Thank you this. Didn’t know it could be that simple…
    @Bryan, my system is a fresh installed Yosemite macmini. It works.

Leave a Reply

Your email address will not be published. Required fields are marked *