NFS Services Administrator's Guide
Configuring and Administering NFS
Configuring and Administering AutoFS
Chapter 2 99
To Automount All Exported Directories from Any
Host Using the -hosts Map
1. If you are using local files for your automounter maps, use an editor
to add the following line to the automounter master map file,
/etc/auto_master:
/net -hosts -nosuid
If you are using NIS to manage your automounter maps, add the line
to the master map file on the NIS master server, and then issue the
following commands to rebuild the map and push it out to slave
servers:
cd /var/yp
/usr/ccs/bin/make auto_master
2. On each host that will use the map you have just modified, issue the
following command to force AutoFS to read the modified map:
/usr/sbin/automount
The local mount point (/net) should not exist.
You must enable AutoFS before any directories can be automounted. See
“To Enable the NFS Automounter” on page 89.
The -hosts map is a “built-in” automounter map; you do not have to
create it. The -hosts map causes AutoFS to mount all the exported
directories from any NFS server on the network whenever a user or
process requests access to one of the exported directories from that
server.
CAUTION 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 automounter master map. (The
conventional mount point for the -hosts map is /net.) Then AutoFS
mounts all the exported directories from that server under the