HP-UX Reference (11i v1 05/09) - 1M System Administration Commands A-M (vol 3)

a
automount(1M) automount(1M)
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 pathname
of an
autofs mount point. The direct map as a whole is not associated with any single directory.
Since each direct map entry results in a new autofs mount, such maps should be kept short.
If a directory contains direct map mount points, then an ls -l in the directory will force all the direct
map mounts to occur.
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.
New entries added to a master map or direct map will not be useful until the automount
command is run
to install them as new
autofs mount points. New entries added to an indirect map may be used immedi-
ately.
An autofs directory associated with an indirect map shows only currently-mounted entries unless
Enhanced AutoFS is being used. This is a deliberate policy to avoid inadvertent mounting of every entry in
a map via an ls -l of the directory. However, if Enhanced AutoFS and its browsability feature are being
used, all autofs directories of an indirect map will be displayed with an ls -l without any mounting side-
effect as mentioned above.
Included Maps
The contents of another map can be included within a map with an entry of the form:
+mapname
If mapname begins with a slash then it is assumed to be the pathname of a local file. Otherwise the loca-
tion of the map is determined by the policy of the name service switch according to the entry for the auto-
mounter in /etc/nsswitch.conf
, such as
automount: nis files
If the name service is files then the name is assumed to be that of a local file in
/etc. If the key being
searched for is not found in the included map, the search continues with the next entry.
Special Maps
There are two special maps available:
-hosts and -null. The -hosts map is used with the /net
directory and assumes that the map key is the hostname of an NFS server. The automountd daemon
dynamically constructs a map entry from the server’s list of exported filesystems. For instance, a reference
to /net/hermes/usr would initiate an automatic mount of all exported file systems from hermes that
are mountable by the client unless Enhanced AutoFS is being used. With Enhanced AutoFS and its on-
demand mounting feature, only exported file systems from
hermes that are being accessed are automati-
cally mounted by the client. References to a directory under /net/hermes will refer to the correspond-
ing directory relative to hermes root.
The -hosts map must mount all of the exported NFS filesystems from a server unless Enhanced AutoFS
is being used. If frequent access to just a single filesystem is required without Enhanced AutoFS, it is more
efcient to access the filesystem with a map entry that is tailored to mount just the filesystem of interest.
The -null map cancels a map for the directory indicated. This is most useful in the
/etc/auto_master map for cancelling entries that would otherwise be inherited from the
Section 1M92 Hewlett-Packard Company 4 HP-UX 11i Version 1: September 2005