Autofs
Use autofs
on the NFS client to auto-mount.
For Ubuntu, install the autofs
package after you've gotten nfs-common
set up.
NFS4 home directory example
In /etc/auto.master
:
/home file:/etc/auto.home --ghost -t 600
The ghost
argument makes the directories appear to be present under /home
even when they aren't actually mounted.
The -t 600
gives a 10-minute (600 seconds) timeout.
In /etc/auto.home
:
barney -fstype=nfs4,port=2049,soft 123.45.67.89:/users/&