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

a
automount(1M) automount(1M)
Variable Substitution
Client specific variables can be used within an
automount map. For instance, if $HOST appeared within
a map,
automount would expand it to its current value for the client’s host name. Supported variables
are:
CPU The processor type. The possible values are:
IA64, PA10, PA11, PA20.
HOST The output of uname -n
. The host name. For example, rowboat.
OSNAME The output of uname -s
. The OS name. For example, HP-UX.
OSREL The output of uname -r. The OS release name. For example,
B.11.00.
OSVERS The output of uname -v. The OS version. For example,
C.
If a reference needs to be protected from neighboring characters, you can surround the variable name with
braces (
{}).
Multiple Mounts
A multiple mount entry takes the form:
key [-mount-options][[mountpoint][
-mount-options] location]...
The initial
/[mountpoint] is optional for the first mount and mandatory for all subsequent mounts. The
optional mountpoint is taken as a path name relative to the directory named by key.Ifmountpoint is omit-
ted in the first occurrence, a mountpoint of
/ (root) is implied.
Given an entry in the indirect map for /src:
beta -ro \
/ svr1,svr2:/export/src/beta \
/1.0 svr1,svr2:/export/src/beta/1.0 \
/1.0/man svr1,svr2:/export/src/beta/1.0/man
All offsets must already exist on the server under beta. automount would automatically mount
/src/beta, /src/beta/1.0, and
/src/beta/1.0/man, as needed, from either svr1 or svr2,
whichever host is nearest and responds first.
The
autofs mount points must not be hierarchically related.
automount does not allow an autofs
mount point to be created within another autofs mount.
Other Filesystem Types
The automounter assumes NFS mounts as a default filesystem type. Other filesystem types can be
described using the -fstype mount option. Other mount options specific to this filesystem type can be
combined with the -fstype option. The location field must contain information specific to the filesystem
type. If the location field begins with a slash, a colon character must be prepended, for instance, to mount
a CD filesystem:
cdrom -fstype=hsfs,ro :/dev/sr0
or to perform an autofs mount:
src -fstype=autofs auto_src
Mounts using CacheFS are most useful when applied to an entire map as map defaults (see cfsadmin(1M)).
The following entry in the master map describes cached home directory mounts. It assumes the default
location of the cache directory, /cache.
/home auto_home -fstype=cachefs,backfstype=nfs
Indirect Maps
An indirect map allows you to specify mappings for the subdirectories you wish to mount under the direc-
tory indicated in the /etc/auto_master map. In an indirect map, each key consists of a simple name
that refers to the subdirectory of one or more filesystems that are to be mounted as needed.
Entries in both direct and indirect maps can be modified at any time. The new information is used when
automountd next uses the map entry to do a mount.
Direct Maps
Entries in a direct map are associated directly with autofs mount points. Each key is the full path name
of an autofs mount point. The direct map as a whole is not associated with any single directory.
88 Hewlett-Packard Company 3 HP-UX 11i Version 2: December 2007 Update