Mount NFS file share with automounter (Mac)

Tags mac how-to

Objective

Access a network storage volume shared as NFS. A common use case is mounting your Research Storage volume on your desktop or laptop. In this procedure, the share is mounted under the directory /nfs.

 Note
The method covered in this article must be performed by an administrator on the computer. If you do not have administrative privileges and wish to implement this solution, contact your support organization. An alternative method of mounting manually in Finder is discussed in this separate article.

Environment

  • Mac OS X
  • macOS
  • NFS
 Note
Before it can be successfully mounted, an NFS share must be exported to a client with a known or resolvable IP address. This article assumes that an export has already been established on the server for your machine.

Procedure

  1. If it doesn't already exist, add the nfs definition to /etc/auto_master: sudo echo '/nfs auto_nfs' >> /etc/auto_master
  2. Add a line with the specific configuration to /etc/auto_nfs: <Share Name> -fstype=nfs,rw,soft,bg,intr <server path to NFS share>
    • Example: uniqname -fstype=nfs,rw,soft,bg,intr uniqname.value.storage.umich.edu/uniqname
    • Command to implement the above example:
      sudo echo "uniqname -fstype=nfs,rw,soft,bg,intr uniqname.value.storage.umich.edu/uniqname" >> /etc/auto_nfs
  3. Modify the file permissions of /etc/auto_nfs: sudo chmod 644 /etc/auto_nfs
  4. Re-load automount: sudo automount -v
  5. Confirm that your share is available under /nfs: ls /nfs/uniqname

Additional notes

Details

Article ID: 1776
Created
Wed 5/27/20 10:57 AM
Modified
Thu 9/10/20 12:24 PM