AutoFS is a client-side service that supports automatic mounting
and unmounting of file systems. This process is nearly transparent
to the user.
AutoFS is implemented as a virtual file system (VFS). It supports automounting
by instructing the user-space daemon, automountd, to mount and unmount the directories it manages.
It automatically mounts the appropriate file systems when needed
and unmounts them if they have been idle for the configured period
of time (10 minutes is the default value).
AutoFS has been enhanced to provide the features of the SUN
ONC+ version 2.3 AutoFS product. This version of AutoFS is known
as Enhanced AutoFS. With the Enhanced AutoFS implementation, both performance
and scalability are significantly improved.
How
AutoFS Works |
 |
AutoFS consists of the following components:
The AutoFS file system (kernel AutoFS) - A
virtual file system that provides a directory structure for automatic
mounting. It includes autofskd, a kernel-based process that periodically cleans
up mounts.
The automountd daemon - A stateless daemon that accepts
RPC requests from kernel AutoFS to perform mounts or umounts.
Figure 1-1 “Interaction
Among AutoFS Components” illustrates the
interaction among the components of AutoFS.
The automount command is invoked at the system startup. It reads
the AutoFS master map to create the initial set of AutoFS mount
points in the internal mount table, /etc/mnttab. The automounted file systems are not mounted
automatically at startup. The automounted file systems are points
under which file systems are mounted when users request access to
them.
When AutoFS receives a request to mount a file system that
is not mounted, it calls the automountd daemon, which actually mounts the requested file
system. Once you mount the file system, further access does not
require any action from the automountd daemon. AutoFS mounts file systems at the configured
mount points. It does not maintain its own directory of mount points
with symbolic links into it.
The automountd daemon is completely independent from the automount command. Because of this separation, it is possible
to add, delete, or change the AutoFS map information without having
to stop and restart the automountd daemon.
After system startup, when the AutoFS mount points are set
up, you can modify the set of mount points by modifying AutoFS maps
and running the automount command to read them and modify the mount table accordingly.
You do not have to stop and restart AutoFS.
If an automounted file system has been idle for a configured
period of time (the default is 10 minutes), AutoFS unmounts it.
For more information on AutoFS, see the following man pages: automount (1M) and automountd (1M).