I’ve just found my favourite piece of software (of the week, at least): Automounter or amd.

Basically it allows you to mount filesystems on demand, so I’ve got it setup on all my Linux boxes now to mount each other’s NFS shares. The extra good bit is that if the NFS server is offline it doesn’t hang your machine on boot (like putting it in /etc/fstab does).

All you need is to install autofs (“yum install autofs”, which i think sets it to start on boot) and create the following two files:

/etc/auto.master :

/media /etc/auto.nfs --timeout=3600 --ghost```

That mounts the shares in /media, and tells it to create the directories even if the server is offline, and to unmount them again after and hour if idle.

/etc/auto.nfs : 

data5 -fstype=nfs,hard,intr,timeo=10,async,rw```

That’s the equivalent of your “mount -t nfs” command (or /etc/fstab entry), it tells it to nfsmount in /media/data5, not to fall over if the server goes offline (although it still does a bit), async for performance, read+write permissions, and the server IP and mountpoint on the end (as in /etc/exports).

What’s extra cool is that when the NFS server boots, it creates disk icons on your desktop (due to the mountpoints being in /media)!

I guess this is similar to how MacOSX does it with its “Directory Utility”. I upgraded the MacMini to OSX 10.5.6 today, doesn’t seem to be anything particulary new/interesting….