I wanted to mount two AFP volumes that I have shared from my Redhat box to my home directory. There is a utility called Sharepoints Autmount, but it lacks a way to pass passwords during the mounting process. then I thought about exporting the volumes as NFS shares.
On the Linux side it was very simple, I used the Webmin Server configurator that comes with Redhat. I simply exported the volumes to my IP address and added myself as a read/write user. I tested it with this command:
% sudo mount server:/path/to/export /home/username/server/This worked fine, but was only temporary. It needed to be performed at every boot.
Next I looked at Netinfo on an OS X 1.2 server, which I installed onto a 9600/200. It is not very user freindly, but it does have buttons for easily adding NFS mounts to netinfo. I used that to get the basic Netinfo settings I would need. This machine is invaluable for hacking Netinfo on OS X 10.1.x or 10.2.
In Netinfo, add a new Directory at the root level named "mounts". You need a new directory inside of mounts for each mountpoint. You will need three new properties inside of these directories. The first is "name", and it has a value that is the same as the path to the NFS export you want to mount. The next is "dir", and it has a value that is the same as the directory path to where you want to mount it locally. Now we need a "type" property. This lets OS X know what kind of filesystem to mount. In this case it is "nfs". So the final settings look like this:
% sudo kill -1 `cat/var/run/automount.pid`This kills and restarts the automount process. This is also useful if you decide you want to change the icon on your automount directory. You must do it before the system takes hold of it. Plus if you want to add more mounts it is simple, and makes experimenting with the placement of the directories less of a chore.
Mac OS X Hints
http://hints.macworld.com/article.php?story=20021010060844982