| United States-English |
|
|
|
![]() |
Enhanced AutoFS Administrator's Guide: HP-UX 11i v1 > Chapter 3 Configuring
and Administering AutoFSAutomounting All Exported Directories Using the -hosts Map |
|
To automount all exported directories from any host using the -hosts map, perform the following steps:
You must enable AutoFS before any directory is automounted. The -hosts map is a built-in AutoFS map; you do not have to create it. The -hosts map causes AutoFS to mount exported directories from any NFS server found in the hosts database whenever a user or process requests access to one of the exported directories from that server.
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. Figure 3-3 “Automounted Directories from the -hosts Map—One Server” shows the automounted file structure after the user’s command. If the thyme server exports the /exports/proj1 directory, and a user types the following command: more /net/thyme/exports/proj1/readme the /thyme subdirectory is created under /net, and /exports/proj1 is mounted under /thyme using on-demand mounting. Figure 3-4 “Automounted Directories from the -hosts Map—Two Servers” shows the automounted directory structure after the user’s second command. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||