This section describes how to automount a remote directory
using an indirect map.
Notes on
Indirect Maps |
 |
The local_subdirectory specified in the indirect map is the lowest-level
subdirectory in the local directory pathname. For example, if you
are mounting a remote directory on /nfs/apps/draw, the local_subdirectory specified in the indirect map will be draw.
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, the local_parent_directory specified in the master map will be /nfs/apps.
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”. 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.
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.
Indirect maps are usually called /etc/auto_name, where name helps you remember what is configured in the map.
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 |
 |
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 |
Following are sample lines from an AutoFS indirect map on
the NFS client, sage. The hash (#) symbol indicates a commented line.
# /etc/auto_desktop file # local mount point mount options remote server:directory draw -nosuid thyme:/export/apps/draw write -nosuid basil:/export/write |
Figure 3-4 “How AutoFS Sets Up NFS Indirect Mounts” illustrates how
AutoFS sets up indirect mounts.