Skip to content

Instantly share code, notes, and snippets.

@13k
Created December 17, 2014 01:04
Show Gist options
  • Save 13k/b90b1b335f3bba007890 to your computer and use it in GitHub Desktop.
Save 13k/b90b1b335f3bba007890 to your computer and use it in GitHub Desktop.
Automount NFS exports in OSX

Linux server

Install NFS.

Add to /etc/exports:

<export_path>   <network>/24(rw,nohide,insecure,no_subtree_check,sync,all_squash,anonuid=1000,anongid=1000)

Update exports table:

exportfs -rav

Important options:

  • insecure: enables OSX to connect with ports >1024
  • all_squash: remaps all user ids
  • anonuid: destination user id to squash to
  • anongid: destination group id to squash to

OSX client

Inspect exports:

showmount -e <server>

Add to /etc/auto_master:

/-			auto_nfs		-nobrowse,nosuid

Create /etc/auto_nfs with:

<mount_point>	-fstype=nfs,sync,noresvport,soft,bg,intr,rw,tcp,nfc nfs://<server>:<export_path>

Update auto mounts:

automount -vc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment