Linux: Using automount to mount NFS on the fly
My home network has an NFS server that I like to mount on my laptop. When I take my laptop to work, the boot hangs trying to find the now non-existent NFS server. The solution that I found was to use automount to mount that directory on demand. When I'm at work, I don't try an access that folder.
If you want to mount your NFS server at /mnt/nfs_server/ Put the following in your /etc/auto.master:
Then create /etc/auto.master.d/server.autofs that has your actual NFS information in it:
* -rw server.domain.com:/home/share/