NFS Services Administrator's Guide

Configuring and Administering AutoFS
Automounting a Remote Directory Using a Direct Map
Chapter 3 117
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 might attempt to mount over
itself. As a result, unexpected behavior can occur. 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 example entries in the
/etc/auto_master, /etc/auto_home and /etc/auto_direct maps:
# Contents of the /etc/auto_master sample map
/net -hosts -nosuid,soft,nobrowse
/- auto_direct
/home auto_home
# Contents of the /etc/auto_home sample map
Casey auto23:/home/Casey
# Contents of the /etc/auto_direct sample map:
/tmp/export auto23:/tmp/export
If the NFS server is also the NFS 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
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 more information, see “Changing the Default Mount
Options” on page 83.
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. If you plan to
use NIS or LDAP to manage maps, you can have only one direct map in
your configuration.