HP-UX Reference (11i v2 07/12) - 1M System Administration Commands A-M (vol 3)

a
automount(1M) automount(1M)
NAME
automount - install automatic mount points
SYNOPSIS
/usr/sbin/automount
[-f master-file][
-t duration][-v]
DESCRIPTION
The
automount command installs autofs mount points and associates an
automount map with each
mount point. The
autofs filesystem monitors attempts to access directories within it and notifies the
automountd daemon (see automountd(1M)). The daemon uses the map to locate a filesystem, which it
then mounts at the point of reference within the
autofs filesystem. You can assign a map to an autofs
mount using an entry in the /etc/auto_master
map or a direct map.
If the filesystem is not accessed within an appropriate interval (10 minutes by default), the
automountd
daemon unmounts the file system.
The file
/etc/auto_master
determines the locations of all autofs
mount points. By default, this file
contains the following entry:
# Master map for automounter
#
/net -hosts -nosuid,soft,nobrowse
The first field in the master file specifies a directory on which an
autofs mount will be made, and the
second field specifies the automounter map to be associated with it. Mount options may be supplied as an
optional third field in the entry. These options are used for any entries in the map that do not specify
mount options explicitly. The
automount command is usually run without arguments. It compares the
entries /etc/auto_master
with the current list of autofs mounts in /etc/mnttab and adds,
removes, or updates
autofs mounts to bring the /etc/mnttab up to date with the
/etc/auto_master. At boot time, it installs all
autofs mounts from the master map. Subsequently,
it may be run to install
autofs mounts for new entries in the master map or a direct map, or to perform
unmounts for entries that have been removed.
If the first field specifies the directory as /-, automount treats the second field as the name of a direct
map. In a direct map, each entry associates the full path name of a mount point with a remote file system
to mount.
If the first field is a path name, the second field names an indirect map or a special map (described below).
An indirect map contains a list of the subdirectories within the indicated directory. With an indirect map,
it is these subdirectories that are mounted automatically.
The automounter maps, including the auto_master map, may be distributed by NIS, NIS+, or LDAP. The
Name Service Switch configuration file,
/etc/nsswitch.conf
, determines where the automount
command will look for the maps.
Options
-f master-file Specify a local master file for initialization.
When the -f option is used and the master file specified is not found, then
automount
defaults to /etc/auto_master and then to the NIS auto_master map.
-t duration Specify a duration, in seconds, that a file system is to remain mounted when not in use.
The default is 600 (10 minutes).
-v Verbose mode. Notify of autofs mounts, unmounts, or other non-essential information.
Messages are written to standard error.
Map Entry Format
A simple map entry (mapping) takes the form:
key [-mount-options] location...
where key is the full path name of the directory to mount when used in a direct map, or the simple name of
a subdirectory in an indirect map. mount-options is a comma-separated list of mount options, and location
specifies a file system from which the directory may be mounted. In the case of a simple NFS mount, the
options that can be used are as specified in mount_nfs(1M), and location takes the form:
host
:pathname
86 Hewlett-Packard Company 1 HP-UX 11i Version 2: December 2007 Update