NFS Services Administrator's Guide (5900-1632, August 2011)

IMPORTANT: Ensure that local_parent_directory and local_subdirectory are not
already created. AutoFS creates them when it mounts the remote directory. If these directories exist,
their files and directories in them are hidden when the remote directory is mounted.
Ensure that the local mount-point specified in the AutoFS map entry is different from the exported
directory on the NFS server. If it is the same, and the NFS server also acts as an NFS client and
uses AutoFS with these map entries, the exported directory might attempt to mount over itself. This
can result in unexpected behavior. A directory might also attempt to mount over itself if you use a
single set of AutoFS maps that are distributed using NIS or LDAP, or are in a High Availability
environment.
Notes on Indirect Maps
The mount options that you can specify in the AutoFS maps are the same ones that you use for the
type of filesystem you attempt to automount. For example, if the filesystem type is NFS, then the
mount options you use are identical to the ones used for standard NFS mounted directories. For a
list of mount options, see “Changing the Default Mount Options” (page 38). You cannot use the
bg option for an automounted directory. The mount options configured in the indirect map override
the ones in the master map if there is a conflict.
Indirect maps are usually called /etc/auto_name, where name helps you remember what is
configured in the map. Following is the syntax of the indirect map:
local mount-point mount options remote server:directory
where:
local mount-point Simple name in the indirect map
mount options Options you want to apply to this mount.
remote server:directory Location of the directory, on the server, that is to be mounted.
If the indirect map name in the AutoFS master map begins with a slash (/), AutoFS assumes that
it is a local file. If it does not contain a slash, AutoFS uses the Name Service Switch to determine
whether it is a file, LDAP, or an NIS map. For more information on configuring the Name Service
Switch, see nsswitch.conf(4).
Sample File Entries for NFS Indirect Automounts
The local_subdirectory specified in an indirect map is the lowest-level subdirectory in the
local directory path name. For example, if you are mounting a remote directory on
/nfs/apps/draw, draw is the local_subdirectory specified in the indirect map.
Following are sample lines from the AutoFS master map on the NFS client, sage. The master map
also includes an entry for the /etc/auto_direct direct map.
# /etc/auto_master file
# local mount-point map name mount options
/- /etc/auto_direct
/nfs/desktop /etc/auto_desktop
The local_parent_directory specified in the master map consists of directories, except the
lowest-level subdirectory in the local directory pathname. For example, if you are mounting a
remote directory on /nfs/apps/draw, /nfs/apps is the local_parent_directory specified
in the master map.
You can configure indirect automounts in the same indirect map only if their
local_parent_directory, as specified in the master map, is the same. For example, indirect
mounts with the local mount-points, /nfs/apps/draw and /nfs/apps/word, can be configured
in the same indirect map.
Following are sample lines from an AutoFS indirect map on the NFS client, sage. The hash (#)
symbol indicates a commented line.
Configuring AutoFS Direct and Indirect Mounts 63