NFS mounting from OSX

Using Finder's Connect to Server... option with nfs://vers=4;nuc.local/mnt/tb I'm unable to mount my nfs server. However from the command line it works just fine.

Ideally I want the MBP to boot and mount the share when at home automatically. However I'm struggling to understand auto mounting on MacOSX 10.10.4. Can someone please additionally illustrate IIUC a /etc/auto_master example?

nuc.local's /etc/exports is:

/mnt/tb     *(rw,insecure,async,no_subtree_check,no_root_squash)

To properly connect to NFSv4 share with the Finder use nfs://vers=4,nuc.local/mnt/tb instead of nfs://vers=4;nuc.local/mnt/tb.

To mount a share automatically do the following:

  • Create a folder (e.g. /Users/youruser/mnt) as the future mount point
  • Open Terminal and enter sudo nano /etc/auto_master
  • Add a line with the following content:

    /Users/youruser/mnt /etc/auto_nfs

    Please check, that the file contains a trailing empty line!
    Save the edit with ctrlO and quit nano with ctrlX

  • enter sudo touch /etc/auto_nfs to create a new file with the name "auto_nfs".
  • Enter sudo nano /etc/auto_nfs to edit the file.
  • Add a line with the following content:

    DirectoryName -fstype=nfs,other_options... exported_share

    Please check, that the file contains a trailing empty line!
    Save the edit with ctrlO and quit nano with ctrlX

  • Enter sudo automount -vc to mount the new NFS-share immediately.

Example (mount an external iTunes Media folder to local /Users/someusername/mnt):


# Automounter master map
+auto_master        # Use directory service
/net            -hosts      -nobrowse,hidefromfinder,nosuid
/home           auto_home   -nobrowse,hidefromfinder
/Network/Servers    -fstab
/-          -static
/Users/someusername/mnt /etc/auto_nfs


iTunesMedia -fstype=nfs,rw,bg,hard,intr,tcp

Tested with 10.7.5 and 10.10.4

After some extended testing with a virtual ArchLinux VM as NFS-server and Mac OS 10.10.4 as the NFS-client I come to the following conclusion:

The Finder probably has a bug connecting to NFSv4-only NFS-servers (ArchLinux). So if you have disabled NFSv2/NFSv3 in /etc/conf.d/nfs-server.conf you won't be able to connect to the NFS-Share with the Finder.

You will be able to connect to it with mount_nfs options server.local:/share /destination.. or NFS Manager though.

If you enable NFSv2/NFSv3 you will be able to connect to the share with the Finder if you use the full path (as defined in exports) to the share: nfs://vers=4,server.local/path/to/share.

  • I tried your automounter suggestion and I keep just getting: "NFS server nuc.local not responding". I tried replacing it with it's IP address. No dice. Furthermore this: youtube.com/watch?v=CG3sV85SYeo – hendry Jul 27 '15 at 3:48
  • @hendry What kind of OS is installed on nuc.local? ArchLinux? – klanomath Jul 27 '15 at 6:39
  • That's correct, Archlinux. – hendry Jul 28 '15 at 6:42
  • @hendry please cite the relevant parts of /etc/exports and /etc/fstab on your ArchLinux server in your question. – klanomath Jul 28 '15 at 13:36
  • I thought I mentioned it in the video earlier. Thanks again for taking a look! – hendry Jul 28 '15 at 14:49

From exports(5) - Linux man page

secure This option requires that requests originate on an Internet port less than IPPORT_RESERVED (1024). This option is on by default. To turn it off, specify insecure.

so you must use insecure to be able to mount a nfs share under non root user.

sample line from /etc/exports file


Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.