Monday Oct 06, 2008

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/10.0.0.123/tank/photos
Lists all the files in /tank/photos on the host with IP address 10.0.0.123 (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/10.0.0.123 /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.
About

jag

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today