Mounting NFS in OSX

Update: for Mountain Lion the NFS mount is taken out. Use LoginHook instead.

Update 2:

sudo vim /etc/mount-allspark
mkdir /Volumes/Allspark
mount -t nfs /Volumes/Allspark
sudo defaults write LoginHook /etc/mount-allspark

Update 3: (change mount only if server is reachable, also added resvport and rw option)


ping -c 1 -w 5 $HOST &>/dev/null
if [ $? -ne 0 ] ; then
    echo "down";
    mkdir /Volumes/Allspark
    mount -t nfs -o resvport,rw /Volumes/Allspark

5 thoughts on “Mounting NFS in OSX”

  1. Well this is quite a bummer. I manage 30+ macs at my job and we heavily rely on NFS mounts, and it needs to be mounted before login because we actually mount the home folders from there… I’ll probably end up doing a launchdaemon to mount it as root at startup but I really don’t see why Apple removes features that work….

  2. On network level there are quite a few quirks with the OSX system and it seems to get worse from SL to Lion to ML…

  3. The script does not work on OSX ML v10.8.2. It does not accept the -w option, it should be capital -W
    ping -c 1 -W 5 $HOST &>/dev/null

    and also to add if you want to set the script to run at login:
    sudo defaults write LoginHook /path/script

Leave a Reply