HP-UX Reference (11i v1 05/09) - 1M System Administration Commands A-M (vol 3)
a
automount(1M) automount(1M)
directory [-mount-options] location...
where directory is the full path name of the directory to mount, when used in a direct map, or the
basename of a subdirectory in an indirect map. mount-options is a comma-separated list of
mount options,
and location specifies a remote filesystem from which the directory may be mounted. In the simple case,
location takes the form:
host
:pathname
Multiple location fields can be specified, in which case
automount pings all servers in the list and then
selects the first host that responds to serve that mount point.
If location is specified in the form:
host
:path:subdir
host is the name of the host from which to mount the file system, path is the path name of the directory to
mount, and subdir, when supplied, is the name of a subdirectory to which the symbolic link is made. This
can be used to prevent duplicate mounts when multiple directories in the same remote file system might be
accessed. Assume a map for
/home resembling:
mike hpserver1:/home/hpserver1:mike
dianna hpserver1:/home/hpserver1:dianna
Attempting to access a file in /home/mike causes automount to mount
hpserver1:/home/hpserver1
and creates a symbolic link called /home/mike to the mike sub-
directory in the temporarily-mounted filesystem. A subsequent file access request in
/home/dianna
results in automount simply creating a symbolic link that points to the dianna subdirectory because
/home/hpserver1 is already mounted. Given the map:
mike hpserver1:/home/hpserver1/mike
dianna hpserver1:/home/hpserver1/dianna
automount
would have to mount the filesystem twice.
A mapping can be continued across input lines by escaping the newline character with a backslash (
\).
Comments begin with a number sign (
#) and end at the subsequent newline character.
Directory Pattern Matching
The ampersand (&) character is expanded to the value of the directory field for the entry in which it occurs.
Given an entry of the form:
mike hpserver1:/home/hpserver1:&
the & expands to mike.
The asterisk (*) character, when supplied as the directory field, is recognized as the catch-all entry. Such
an entry resolves to any entry not previously matched. For example, if the following entry appeared in the
indirect map for /home:
* &:/home/&
this would allow automatic mounts in /home of any remote file system whose location could be specified
as:
hostname :/home hostname
Hierarchical Mappings
A hierarchical mapping takes the form:
directory [/subdirectory][-mount-options] location...]...
The initial / within the /[subdirectory] is required; the optional subdirectory is taken as a file name rela-
tive to the directory.Ifsubdirectory is omitted in the first occurrence, the / refers to the directory itself.
Given the direct map entry:
/usr/local \
/ -ro,intr shasta:/usr/local ranier:/usr/local \
/bin -ro,intr ranier:/usr/local/bin shasta:/usr/local/bin \
/man -ro,intr shasta:/usr/local/man ranier:/usr/local/man
HP-UX 11i Version 1: September 2005 − 7 − Hewlett-Packard Company Section 1M−−95