NFS Services Administrator's Guide
Configuring and Administering NFS
Configuring and Administering AutoFS
Chapter 2 101
The -hosts map is an indirect map. It uses the hosts database (the
/etc/hosts file, the NIS hosts map, or BIND [DNS]) to find a host on
the network. The Name Service Switch configuration determines which
name services will be searched for host information. See “Configuring
the Name Service Switch” on page 267.
To Decide Between Direct and Indirect NFS
Automounts
• Before you automount a remote directory, decide whether you want
to use a direct or indirect automounter map. Table 2-6 lists the
advantages and disadvantages of each type of map.
In general, an indirect map is better than a direct map, because it is
easier to modify while AutoFS is running, and because it does not cause
“mount storms” in directories with many automount points.
However, if your automounted directory must share the same parent
directory with local or standard-mounted directories, or if users must
always get a complete list of available files and directories when they
issue the ls command, you should choose a direct map.
Table 2-6 lists the advantages and disadvantages of direct and indirect
automounter maps.
Table 2-6 Direct vs. Indirect Automounter Map Types
Direct Map Indirect Map
Advantage: A user can see the
contents of a direct-mounted
directory with the ls command. If
the contents are not currently
mounted, ls causes them to be
mounted.
Disadvantage: If a user types ls to
see the contents of an
indirect-mounted directory, it
appears empty unless its
subdirectories are currently
mounted. The user must cd to a
subdirectory or type ls
subdirectory to cause it to be
mounted.
Advantage: Direct-mounted
automounted directories can
share the same parent directory
with local or standard-mounted
files and directories.
Disadvantage: An indirect map
hides any local, standard-mounted,
or direct-mounted files or directories
underneath the mount point for the
map.