

append /mounts/nfsserver:\\/exported\\/path dir /private/mnt append /mounts/nfsserver:\\/exported\\/path opts "" append /mounts/nfsserver:\\/exported\\/path type nfs We need type which we set to nfs opts, set to an empty string (but see the note about opts, below, if you have problems) and dir, set to the local mount point, /private/mnt. Now we need to add the three properties which tell automount about this entry.This is definitely not what we want.īasically, double-backslash the forward slashes in the NFS server's path ( /exported/path), but not the NetInfo path ( /mounts/). If we don't use any backslashes, nicl will end up creating an entry /mounts/nfsserver: which has a subdirectory exported and that would have a subdirectory path. After the shell is done examining the command, the string \\/ becomes \/ which is what we need to pass to nicl. This is done with the backslash, \, and since we are running in a shell, we need to double them up. Since NetInfo uses the / to separate path components, and we have / characters in the entry we want to create, they have to be escaped. create /mounts/nfsserver:\\/exported\\/path It involves four simple steps, one to create the new NetInfo entry, and three to add the three new properties to that Run through the steps for each one, then do the final step (notifying automount) after all the mounts have been entered.Īdding an NFS mount point via the command line is actually quite simple, once you know the secret. This can, of course, be repeated for other NFS mounts. The only thing left is to inform the automount process that things have changed.


At this point, all necessary information has been loaded into NetInfo for automount to take care of the NFS mount. To accomplish this in Aqua, run NetInfo Manager (located in /Applications/Utilities) and authenticate as an administrator (the little lock at the bottom of the window).In a nutshell, a new directory is added to NetInfo, called /mounts, and subdirectories under that specify the remote filesystems to mount. The best way, however, is to add the information to NetInfo, and let the automounter handle everything. In order to have the system deal with mounting it for you, you could add that mount command to an rc script or create a startup script in /Library/StartupItems. This is, however, temporary (it won't live through a reboot). Sudo mount nfsserver:/exported/path /private/mnt Mounting NFS filesystems on OS X can be done simply by running: You will obviously want to change these to something useful and sane for your situation. The example filesystem used here will be called /exported/path from the server nfsserver. This was originally written in the 10.1 days, but is still applicable on 10.4.2 (non-server versions tested). I'll discuss the changes necessary to mount NFS filesystems onto a Mac OS X machine.
