HP-UX Reference (11i v1 00/12) - 1M System Administration Commands A-M (vol 3)
__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man1m/!!!intro.1m
________________________________________________________________
___ ___
a
automount(1M) automount(1M)
(automounter)
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
automount
automatically mounts /usr/local, /usr/local/bin
, and /usr/local/man,as
needed, from either
shasta or ranier, whichever host responded first.
Direct Maps
A direct map contains mappings for any number of directories. Each directory listed in the map is
automatically mounted as needed. The direct map as a whole is not associated with any single directory.
Indirect Maps
An indirect map allows specifying mappings for the subdirectories to be mounted under the directory indi-
cated on the command line. It also obscures local subdirectories for which no mapping is specified. In an
indirect map, each directory field consists of the basename of a subdirectory to be mounted as needed.
Included Maps
The contents of another map can be included within a map with an entry of the form:
+mapname
mapname can either be a file name, or the name of an NIS/NIS+ map, or one of the special maps described
below. If mapname begins with a slash then it is assumed to be the pathname of a local file. Otherwise the
location of the map is determined by the policy of the name service switch according to the entry for the
automounter 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
Three special maps, -hosts, -passwd, and -null, are currently available: The -hosts map uses
the
gethostbyname() map to locate a remote host when the hostname is specified (see
gethostent(3N)). This map specifies mounts of all exported file systems from any host. For example, if the
following
automount command is already in effect:
automount /net -hosts
a reference to /net/hermes/usr initiates an automatic mount of all file systems from hermes that
automount can mount, and any subsequent references to a directory under /net/hermes refer to the
corresponding directory on hermes. The -passwd map uses the passwd(4) database to attempt to
locate a user’s home directory. For example, if the following automount command is already in effect:
automount /homes -passwd
if the home directory for a user has the form /dir/server/username, and server matches the host system
on which that directory resides, automount mounts the user’s home directory as:
/homes /username.
For this map, the tilde character (
˜) is recognized as a synonym for username.
Section 1M−−94 − 3 − HP-UX Release 11i: December 2000
___
___