Before you automount a remote directory, decide whether you
want to use a direct or an indirect AutoFS map. Table 3-3 “Direct Versus Indirect AutoFS Map” lists the advantages and disadvantages
of each type of map.
An indirect map is better than a direct map because it is
easier to modify while AutoFS is running. In addition, it does not
cause mount storms in directories
with many AutoFS mount points.
However, if your automounted directory must share the same
parent directory with local or standard-mounted directories, you
need to choose a direct map.
Table 3-3 “Direct Versus Indirect AutoFS Map” lists the advantages
and disadvantages of direct and indirect AutoFS maps.
Table 3-3 Direct Versus Indirect AutoFS Map
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 mounted, ls causes them to mount. | Advantage: Enhanced
AutoFS allows a user to view the available mount points for indirect
maps, without having to actually mount each file system when browsability
is enabled by default. |
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. |
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 have to force AutoFS
to reread its maps. | Advantage: If
you modify an indirect map, the changes are visible when AutoFS
mounts the directory next time. Therefore, you do not have to force
AutoFS to reread its maps. |
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. | 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 directories
are actually mounted. The mount table does not occupy unnecessary space
because only mounted directories appear in it. |
How
AutoFS Sets Up Direct and Indirect Mounts |
 |
The automounts configured in a direct map may be mounted in
various places in the local file system; they do not have to be
located under the same parent directory.
The automounts configured in an indirect map are all mounted
under the same local parent directory.
Figure 3-5 “Difference
Between Direct Mounts and Indirect Mounts” shows the difference
between direct mounts and indirect mounts on an NFS client.