NFS Services Administrator's Guide (B.11.31.05) September 2009

If the first field specifies the directory as /-, then the second field is the name of the direct map.
The master map file, like any other map file, may be distributed by NIS or LDAP by modifying
the appropriate configuration files and removing any existing /etc/auto_master master map
file.
NOTE: If the same mount-point is used in two entries, the first entry is used by the automount
command. The second entry is ignored.
You must run the automount command after you modify the master map or a direct map.
Following is a sample auto_master file:
# Master map for AutoFS
#
#auto_master
#mount-point map-name [mount-options]
/net -hosts -nosuid,nobrowse #Special Map
/home auto_home -nobrowse #Indirect Map
/- /etc/auto_direct #Direct Map
/nfs /etc/auto_indirect #Indirect Map
The master map is a primary map that defines all other maps. In this sample, auto_master,
the master map, contains a single entry each for a direct map and a special map. It also contains
a single entry for each top-level indirect map.
Deciding Between Direct and Indirect Automounts
Before you automount a remote directory, you must decide if you want to use a direct or indirect
AutoFS map.
Table 3-4 lists the advantages and disadvantages of direct and indirect AutoFS maps.
Table 3-4 Direct Versus Indirect AutoFS Map Types
Indirect MapDirect Map
Advantage: AutoFS enables you to view the available
mount-points for indirect maps without actually mounting
each filesystem when browsability is enabled by default.
Advantage: You can view the contents of a direct-mounted
directory using the ls command. If the contents are not
currently mounted, the ls command mounts them.
Disadvantage: An indirect map hides any local,
standard-mounted, or direct-mounted files or directories
under the mount-point for the map.
Advantage: Direct-mounted automounted directories can
export the same parent directory with local, or
standard-mounted files and directories.
Advantage: If you modify an indirect map, AutoFS will
view the changes the next time it mounts the directory.
You need not force AutoFS to reread its maps.
Disadvantage: If you add or remove mounts in a direct
map, or if you change the local mount-point for an
existing mount in a direct map, you must force AutoFS
to reread its maps.
Advantage: When automount reads an indirect map, it
creates only one entry for the entire map in the internal
mount table, /etc/mnttab. Additional entries are
created when the directories are actually mounted. The
mount table takes up no more space than necessary,
because only mounted directories appear in it.
Disadvantage: When automount reads a direct map, it
creates an entry for each automounted directory in the
internal mount table, /etc/mnttab. This can cause the
mount table to become very large.
Configuring AutoFS Direct and Indirect Mounts
A direct map is an automount mount-point. It creates a direct association between a mount-point
on the client and a directory on the server. Direct maps have the absolute path name. The
automounts configured in a direct map can be mounted in various places in the local filesystem;
they need not be located under the same parent directory.
An indirect map uses the key to establish a connection between a mount-point on the client and
a directory on the server. Indirect maps are useful for accessing specific file systems, such as
Deciding Between Direct and Indirect Automounts 61