Using NFS on Mac OS
Disclaimer: This is one of those tech articles.
It’s not that I hate windows, I mean I did get an MCSE and everything… its just that I find linux and mac vastly better.
It’s a religious war, and I choose not to preach my choices to you. Mine works for me… whatever works for you is A-OK by me.
Anyway… this post is about NFS.
What is NFS?
NFS is the acronym for Network File System — brought to you by the friendly folks at Sun Mircosystems. The quick twitter definition?
NFS allows systems to share files and directories across a network.
As far as you’re concerned, it’s a local resource — in reality it’s on a network resource. NFS brings it to you fast and easily.
Many choices out there… I like NFS.
For my needs, we have several clients running Mac OS and Ubuntu. We share resources on a CentOS box. This box sets up the resources, and the others connect as clients.
Setting up on CentOS is simple:
yum install nfs-utils nfs-utils-lib chkconfig nfs on service nfs start
Simple as pie.
You’ll then want to allow clients to connect. This is controlled by the /etc/exports file and formatted as resource / client.
vi /etc/exports (or nano if you're that way about it) /home/whatever 192.168.1.200(rw,sync,no_root_squash,no_subtree_check,insecure)
Note: You can use whatever options you want. Here rw allows read/write access, no_root_squash allows root connection, no_subtree_check reduces security but can increase reliability, and insecure is needed for our crazy Mac OS connections.
There’s a lot to learn about these options… but this is quick overview time.
exportfs -a (whenever you make changes to /etc/exports
Mac OS NFS Client
There’s 1000 ways to kill a cat… I find it easiest to connect Mac OS to an NFS resource via the disk utility.
- Open Disk Utility, and from the File menu, select NFS Mounts
- Create a new mount, using nfs://SERVER/resource. For example:
- For the mount location, select a location of your liking, I used Volumes, such as
- Click advanced and add the following:
- Click Verify
Simple as pie. =)