Enhanced AutoFS Administrator's Guide

Configuring and Administering AutoFS
Automounting All Exported Directories Using the -hosts Map
Chapter 330
WARNING Because the -hosts map allows NFS access to any reachable
remote system, a user may inadvertently cause an NFS mount
over X.25 or SLIP, which is unsupported, or through a slow
router or gateway. Mounts over slow links may cause excessive
retransmissions and degrade performance for all users.
When a user or process requests a directory from an NFS server, AutoFS
creates a subdirectory, named after the NFS server, under the local
mount point you configured in the AutoFS master map. (The
conventional mount point for the -hosts map is /net.) Then, AutoFS
mounts the exported directories (that are accessed with on-demand
mounting) from that server.
Directories will stay mounted until they are left idle for 10 minutes. You
can change the 10-minute default time by adding the -t
duration
option to the AUTOMOUNT_OPTIONS variable in the
/etc/rc.config.d/nfsconf file or by running the automount
command with the -t option from the command line.
The -hosts map is an indirect map. It uses the hosts database (the
/etc/hosts file, the NIS hosts map, or BIND [DNS]) to find a host on
the network. The Name Service Switch configuration determines which
name services will be searched for the host information. See the
“Configuring the Name Service Switch” chapter of NFS Services
Administrator’s Guide.
For example, if the sage server exports /opt and /apps, and a user on
your NFS client types the following command:
cd /net/sage/opt/frame
the /sage subdirectory is created under /net, and /opt is mounted
under /sage using on-demand mounting.