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
NFS Services Administrator's Guide: HP-UX 11i version 3 > Chapter 3 Configuring and Administering AutoFS

Automounting All Exported Directories from Any Host Using the -hosts Map

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

To automount all exported directories using the -hosts map, follow these steps:

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

    /net -host -nosuid,soft,nobrowse 
    NOTE: The nobrowse option in the local default master map file for a newly installed system is set for the /net map.

    If you are using NIS to manage AutoFS maps, add the previous entry to the master map file on the NIS master server. Rebuild the map and push it out to slave servers. For more information, see NIS Administrator’s Guide (5991-7656). If you are using LDAP, add the entry to the LDAP directory.

  2. On each host that uses the map you modified, enter the following command to force AutoFS to the modified map:

    /usr/sbin/automount

Notes on the -hosts Map

The -hosts map is a built-in AutoFS map; you need not create it. The -hosts map causes AutoFS to mount exported directories from any NFS server found in the hosts database, whenever a user or a process requests access to one of the exported directories from that server.

CAUTION: A user may inadvertently cause an NFS mount over X.25 or SLIP, which is unsupported, or through a slow router or gateway, because the -hosts map allows NFS access to any reachable remote system. Mounts over slow links can cause excessive retransmissions, and degrade the performance for all users.

When a user or a 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). AutoFS then mounts the exported or shared directories from that server. These exported or shared directories can now be accessed. Directories stay mounted until they remain left idle for 10 minutes. You can change the default value 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, LDAP, or BIND [DNS]) to find a host on the network. The Name Service Switch configuration determines which name services to search for host information. For more information on configuring the name service switch, see nsswitch.conf (4).

For example, if the server, sage exports /opt and /apps, and a user on your NFS client enters the following command:

cd /net/sage/opt/frame

the subdirectory /sage is created under /net, and /opt is mounted under /sage.

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

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

Automounted Directories from the -hosts Map—One Server

In the following example, the server, thyme exports or shares the directory /exports/proj1, and a user enters the following command:

more /net/thyme/exports/proj1/readme

For example, the following entry from a map mounts the source code and the data files for a project whenever anyone requests access to both of them. They are mounted for on-demand mounting. The subdirectory /thyme is created under /net, and /exports/proj1 is mounted under /thyme.

Figure 3-7 “Automounted Directories from the -hosts Map—Two Servers” shows the automounted directory structure after the user enters the second command.

Figure 3-7 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
© 2007 Hewlett-Packard Development Company, L.P.