Solaris, NFS & OS X

At home I use ZFS+NFS on a Solaris box to make a file server that provides disk space to all the other machines at home, which are mostly MACs. I use NFS to access the files instead of AFS because it's so much faster. A friend and I were talking about this over the weekend and he was surprised: OS X is notoriously tricky to configure to use NFS. They have a nonstandard way to manage automount maps and, unusual for Apple: no easy-to-use front end. So lots of folks stay away from using NFS on OSX. It turns out that there's a trick that not many folks know about that makes it easy: (almost) no configuration required. The default NFS configuration contains a default automount map based on hostnames: /net/hostname/filepath. The tricky bit is that the finder suppresses the "/net" directory so you can only see it from the Unix shell. From the shell on OS X, /net references work with no effort:
ls /net/
Lists all the files in /tank/photos on the host with IP address (if you're feeling adventurous, you can associate a name with the address by appropriate configuration of the naming environment, but that can be a pain, so I often just use naked static addresses). To make this work with finder in OS X, just do this from the shell:
sudo ln -s /net/ /tank
Then "tank" will show up on the root filesystem, and "photos" will be visible within it. The only configuration I do is this one symlink, then all the filesystems on the server appear. Easy.
October 6, 2008