macOS NFS

Sometimes the obvious isn’t obvious.

Connecting macOS workstations to Network File System (NFS) shares is sometimes less convenient than Server Message Block (SMB/CIFS) shares.

If you’re connecting your macOS workstation to your NAS you may experience problems with flame if you are not using NFS.

Here is a reasonably simple guide for one method of enabling NFS connections from your macOS flame to your NAS.

  1. Enable a static IP address for your NAS (This is defined in your router settings)

  2. Define a shared directory on your NAS and enable NFS sharing.

  3. Edit the auto_master file:
    Open the Terminal on your macOS workstation and edit the /etc/auto_master file using a text editor like nano or vi:

    sudo nano /etc/auto_master
    

    Add a line at the end of the file to reference a new map file:

    /-    auto_nfs
    
  4. Create the auto_nfs map file:
    Create a new file called /etc/auto_nfs and define the mount points and corresponding NFS shares. For example:

    sudo nano /etc/auto_nfs
    

    Add the following lines to the file, replacing your-nfs-server and your-share with the appropriate values:

    /path/to/mount/point    -fstype=nfs,rw,nfsvers=4    nfs://your-nfs-server:/path/to/your-share
    
  5. Reload the autofs service:
    After editing the files, reload the autofs service to apply the changes:

    sudo automount -vc
    

This setup should automatically mount the NFS shares when they are accessed, but in some instances, you may need to create

/path/to/mount/point

8 Likes