automount.1m (2010 09)

a
automount(1M) automount(1M)
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.
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
immediately.
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 path name 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. References to a direc-
tory under
/net/hermes will refer to the corresponding directory relative to
hermes root.
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
+auto_master include entry. To be effective, the -null entries must be inserted before the included
map entry.
Executable Maps
Local maps that have the execute bit set in their file permissions will be executed by the automounter and
provided with a key to be looked up as an argument. The executable map is expected to return the con-
tent of an automounter map entry on its standard output or no output if the entry cannot be determined.
A direct map cannot be made executable.
Configuration and the auto_master Map
When initiated without arguments,
automount consults the master map for a list of autofs mount
points and their maps. It mounts any autofs mounts that are not already mounted, and unmounts
autofs mounts that have been removed from the master map or direct map.
The master map is assumed to be called
auto_master and its location is determined by the name ser-
vice switch policy. Normally the master map is located initially as a local file, /etc/auto_master.
Browsing
Browsing of indirect maps allows all of the potential mount points to be visible for that map regardless of
whether they are mounted or not. The
-nobrowse option can be added to any indirect autofs map to
disable browsing. For example:
/net -hosts -nosuid,soft,nobrowse
In this case, any host names would only be visible in /net after they are mounted. The -browse option
enables browsing of autofs file systems. This is the default for all indirect maps, although it is sug-
gested that the -hosts entry contain the -nobrowse option.
Note that, although a listing of the
autofs directory associated with an indirect map shows all potential
mountable entries, the attributes associated with those entries are temporary until the actual filesystem
attributes can be retrieved once the filesystem has been mounted.
4 Hewlett-Packard Company 4 HP-UX 11i Version 3: September 2010