How to use the automounter :-)


aptitude install autofs

I use autofs to mount some NFS exports as needed.


# $Id: auto.master,v 1.4 2005/01/04 14:36:54 raven Exp $
# Sample auto.master file
# This is an automounter map and it has the following format
# key [ -mount-options-separated-by-comma ] location
# For details of the format look at autofs(5).
#/misc  /etc/auto.misc --timeout=60
#/smb   /etc/auto.smb
#/misc  /etc/auto.misc
#/net   /etc/

/var/autofs/somehost                /etc/auto.nfs-somehost --timeout=120


production      -fstype=nfs somehost:/imgrepos/production
colqueue        -fstype=nfs somehost:/imgrepos/colqueue

Call /etc/init.d/autofs status to see what is configured or mounted.

What's next? If you cd into /var/autofs/somehost/colqueue that directory will be mounted just as needed and will time out (umount) after 2 minutes of inactivity.

linux/autofs.txt · Last modified: 2009-04 by tb
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0 ipv6 ready