NFS Services Administrator's Guide (762805-001, March 2014)

/- direct_map_name [mount_options]
2. If you are using local files for maps, use an editor to open or create a direct map in the /etc
directory. The direct map is commonly called /etc/auto_direct. Add an entry to the
direct map with the following syntax:
local_directory [mount_options] server:remote_directory
If you are using NIS or LDAP to manage maps, add an entry to the direct map on the NIS
master server or the LDAP directory.
3. If you are using NIS to manage maps, rebuild the maps and push them to the slave servers.
For more information on management of NIS maps, see the NIS Administrator’s Guide
(5991-2187).
4. On each host that uses the map you have modified, enter the following command to force
AutoFS to read the modified map:
/usr/sbin/automount
IMPORTANT: Do not automount a remote directory on a local directory, which is a symbolic link.
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 can 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.
Consider the following sample entries in the /etc/auto_master, and /etc/auto_direct
maps:
# Contents of the /etc/auto_master sample map
/net -hosts -nosuid,soft,nobrowse
/- auto_direct
# Contents of the /etc/auto_direct sample map:
/tmp/export auto23:/tmp/export
If the NFS server also acts as an NFS client, for example auto23 acts as the NFS server and client,
and the AutoFS map references the NFS server and tries to overlay a VxFS path, it may result in
unexpected behavior.
Notes on Direct Maps
The mount options that you can specify in the AutoFS maps are the same options that you use for
the type of filesystems 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 more information on the different mount options, see “Changing the default mount options
(page 40).
You cannot use the bg option for an automounted directory. The mount options configured in the
direct map override the ones in the master map, if there is a conflict.
You can configure all the direct automounts in the same map. Most users use the file name,
/etc/auto_direct, for their direct map. Following is the syntax for a direct map:
local mount-point mount options remote server:directory
where:
local mount-point
The path name of the mount-point
mount options
Options you want to apply to this mount.
62 Configuring and administering AutoFS