Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
Enhanced AutoFS Administrator's Guide: HP-UX 11i v1 > Chapter 3 Configuring and Administering AutoFS

Automounting All Exported Directories Using the -hosts Map

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

To automount all exported directories from any host using the -hosts map, perform the following steps:

  1. If you are using local files for your AutoFS maps, use an editor to add the following line to the AutoFS master map file, /etc/auto_master:

    /net -host -nosuid,soft,nobrowse 

    If you are using NIS to manage your AutoFS maps, add the line to the master map file on the NIS master server. See the “Configuring and Administering NIS” chapter of NFS Services Administrator’s Guide.

    Next, issue the following commands to rebuild the map, and push it out to slave servers:

    cd /var/yp
    /usr/ccs/bin/make auto_master
    WARNING! HP recommends you to modify your /net map entry with the nobrowse option when you upgrade from the current AutoFS on HP-UX 11i to Enhanced AutoFS. By default, the local default master map file for a newly installed system has the nobrowse option set for the /net map entry.
  2. On each host that will use the map you have modified, issue the following command to force AutoFS to read the modified map:

    /usr/sbin/automount

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.

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.

Figure 3-3 “Automounted Directories from the -hosts Map—One Server” shows the automounted file structure after the user’s command.

Figure 3-3 Automounted Directories from the -hosts Map—One Server

Automounted Directories from the -hosts Map—One Server

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.

Figure 3-4 Automounted Directories from the -hosts Map—Two Servers

Automounted Directories from the -hosts Map—Two Servers
Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2004 Hewlett-Packard Development Company, L.P.