autofs

How to use the automounter :-)

Install:

aptitude install autofs

Configuration:
I use autofs to mount some NFS exports as needed.

/etc/auto.master

#
# $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/auto.net

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

/etc/auto.nfs-somehost

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