The automount process
- automountd - daemon started at boot time, issues ->
- automount command - reads automaster map, installs ->
- autofs mount points - these are triggered as and when files required ->
- file request made ->
- autofs intercepts ->
- autofs - send message to automount to mount filesystem ->
- auomountd - locates filesystem info in map and mounts ->
- autofs - allows process to continue ->
- file unmounted - after specified period of inactivity (controlled by -t flag on
automount command)
autofs map
- Master maps:(e.g. /etc/auto_master) - Associates directory with map
- Direct maps:(e.g. /etc/auto_direct) - Directs autofs to specified file system
(i.e. direct maps contain the mount points as well)
- Indirect maps:(e.g. /etc/auto_home) - Directs autofs to reference orientated
file systems
Examples
auto_master contains: /home auto_home
This instructs autofs to look in /etc/auto_home map for information about /home
directories
auto_home contains:
user1 server1:/export/home/user1
user2 server2:/export/home/user2
etc...
i.e. user location
The actual data is in /export/home/user1 but is mounted as /home/user1
An entry in auto_master such as: /net -hosts -nosuid is a built in map that uses
the hosts database. If host host01 is defined in the hosts database and the command
cd /net/host01 is issued, the system will change to the root directory of host01
mounting any filesystems defined as NFS mountable. If there aren't any, the directory
will appear empty