nfs mount fails from Finder though works from command line

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)

Solution 1:

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):

auto_master:

#
# 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

auto_nfs:

iTunesMedia -fstype=nfs,rw,bg,hard,intr,tcp 192.168.2.11:/volume1/iTunesMedia

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.