Setup NFS on Mac OS X 10.6

Couldn’t find a single good guide for doing this, so here it goes. It’s super simple (once you know the trick).

On the Server Mac:

Open Terminal:
sudo nfsd enable

This starts the nfs server and sets it to startup on reboot.

Edit /etc/exports (create if it does not exist)
Type the full path of the folder you want to share. In my case it was the USB drive attached to my MacMini but it could be any folder. Optional: Use the “-alldirs” option to allow clients to mount any directory under there.

If your UIDs across machines do not match the “-mapall” will map all IDs with an ID that has access to the directory. Find your ID by typing “id” at the terminal on the server. This may not be the most secure setup in the world, but it works and for my home use is perfectly acceptable. There are ways to restrict to a specific network or host.

Anyway, my /etc/exports looks like this.

/Volumes/storage1 -alldirs -mapall=501

Verify via a showmount -e

gallifrey:~ smcgrath$ showmount -e
Exports list on localhost:
/Volumes/storage1                   Everyone
gallifrey:~ smcgrath$

Your server is ready. On the client, create a directory to mount to (recommended somewhere in /Volumes) and mount the nfs export.

sudo mkdir /Volumes/storage1-nfs

sudo mount -o rsize=32768,wsize=32768,intr,noatime -t nfs gallifrey.local:/Volumes/storage1 /Volumes/storage1-nfs

Obvious replace with:
host:/full/path/to/export /path/to/local/mountpoint

Done.

Advertisement
Explore posts in the same categories: Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.