NFS mounts in OS X Yosemite & Mavericks

Update 16/10/2014: it looks like all this continues to work in Yosemite as well as Mavericks

Until recently I’d been using Snow Leopard on my MacBook Pro. I also have a wee NAS, and had configured it to share its folders via NFS. I’d mounted these on my Mac using the fairly obscure NFS menu items in Disk Utility.

But after upgrading to Mavericks, my NFS mounts had disappeared. My Google-fu didn’t turn up anything that looked like user-level documentation on this issue, so I put on my UNIX hat and went rummaging in /etc.

What we’re dealing with here is the automounter, aka autofs. I know how this works on older UNIXes and Linux, but OS X does things differently. I found some information from 2009 which seems to still be accurate:

Here’s how I got my mounts working again.

First, I edited /etc/auto_master to add a line for my NAS mount points:

/nas          auto_nas

What this means is, “for directories under /nas, consult the file /etc/auto_nas to see how to mount them”. I added this before the final /- line, which I believe is a wildcard, but I’m not sure whether order is significant in this file (the linked document would probably answer that).

So secondly, I added the file auto_nas:

music    storage.local:/nfs/music
data     storage.local:/nfs/data

This lets me access the music and data folders on my NAS from my Mac as /nas/music and /nas/data respectively.

Finally, I told the automounter that I’d changed its configuration:

sudo automount -vc

After that I was able to access my network data again, happy times.

Advertisements
15 comments
    • You’re right of course… I’ve updated the post. Cheers!

  1. Ian said:

    I’ve discovered that mount options in the automounter map file get ignored, but AUTOMOUNT_MNTOPTS in autofs.conf don’t. I managed to make automounts work again for me by putting my mount options (rw,bg,hard,intr,resvport,nosuid,nodev,noac,nfc,tcp,vers=3) into autofs.conf.

  2. Peter said:

    This is a great tutorial. I have learned a lot but I still need some help. I have a Synology that I had mounted to a Mac mini (NFS). But after upgrading to Mavericks nothing works. I just did a clean install of Mavericks and need some help to mount my Synology again.

    The old connection was made in Disc Utility with the following parameters.

    Remote NFS URL = nfs://ip_number_of_my_synology/volume1/data
    Mount location = /Volumes/data
    Advanced Mount Parameters = -P

    Can someone please tell me how to make this work again?

  3. Lars said:

    nfsvers=3 would probably be a good choice because apple in 10.9 moved to version 4 of nfs without any negotiation to use 3, 2 or 1 by default.
    For me with a NetApp it worked!

  4. taiko said:

    I would like to try the solution, but somehow can’t get, where/how the IP of my NAS is defined here. Am I missing something?

  5. I was using the network name of my NAS (storage.local). You should be able to replace that with the IP address of yours.

  6. taiko said:

    thanx a lot. Though so :). Used your approach and its working very well for me.

  7. Julxrp said:

    I’m trying to have NFS shares from my fileserver autmount on my mac.
    The server is running OpenSUSE 13.1 and my mac is running Yosemite.
    I’ve googled it extensively and nothing seems to be working. I always get the message that permissions denied or something.
    Any ideas?

    • I don’t have much experience of NFS debugging I’m afraid. My hunch would be you’ll get more useful information at the server end, i.e. cranking up the debug settings on the nfs server and then look in its logs.

    • It might be worth trying the “noresvport” mount option. I too have frustrating problems (only in Finder, though, not in a shell) until I mount with that option.

      I used Larry Williamson’s mount options linked to a few messages up.

  8. alcazzar said:

    Hi,
    I have a Synology DS412+ and a MacPro using Yosemite. I followed your instructions but I cannot make it run. The mapped directory is always empty… I know it did work some time ago but I do not know what went wrong.. Could it be that some permissions are incorrect? What should I check? Thanks for your support!

    • If the mount point is empty, chances are it failed to mount. The ‘df’ command would list it if it’s mounted. I don’t think the permissions of the mount directory on the local machine (the nfs client) are important. I don’t have experience of debugging NFS on a Mac; there might be something in the logs in /var/log, otherwise perhaps your NAS has some logs.

  9. krylon said:

    Thank you very much!!!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: