Direct Autofs Maps

A direct map is an automount point. With a direct map, a direct association exists between a mount point on the client and a directory on the server. Direct maps have a full path name and indicate the relationship explicitly. The following example shows a typical /etc/auto_direct map:

/usr/local          -ro \
   /bin                   system1:/export/local/sun4 \
   /share                 system1:/export/local/share \
   /src                   system1:/export/local/src
/usr/man            -ro   system2:/usr/man \
                          system3:/usr/man \
                          system4:/usr/man 
/usr/games          -ro   system5:/usr/games 
/usr/spool/news     -ro   system6:/usr/spool/news \
                          system4:/var/spool/news 

Lines in direct maps have the following syntax:

key [mount-options] location
key

Path name of the mount point in a direct map.

mount-options

Options that you want to apply to this particular mount. These options are required only if the options differ from the map default. Options for each specific type of file system are listed in the mount man page for that file system. For information about NFS specific mount options, see the mount_nfs(8) man page.

location

Location of the file system. One or more file systems are specified as server:pathname for NFS file systems.

Note:

The path name should not include an automounted mount point. The path name should be the actual absolute path to the file system. For instance, the location of a home directory should be listed as server :/export/home/ username, not as server :/home/ username.

As in the master map, a line that begins with # is a comment. All the text that follows until the end of the line is ignored. Put a backslash at the end of the line to split long lines into shorter ones.

Of all the maps, the entries in a direct map most closely resemble the corresponding entries in /etc/vfstab. An entry might appear in /etc/vfstab as follows:

dancer:/usr/local - /usr/local/tmp nfs - yes ro 

The equivalent entry appears in a direct map as follows:

/usr/local/tmp     -ro     dancer:/usr/local

Note:

No concatenation of options occurs between the automounter maps. Any options that are added to an automounter map override all options that are listed in maps that are searched earlier. For instance, options that are included in the auto_master map would be overridden by corresponding entries in any other map.

For information about the features of direct autofs map, see How Autofs Selects the Nearest Read-Only Files for Clients.