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 a Remote Directory Using an Indirect Map

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

This section describes how to automount a remote directory using an indirect map.

To automount a remote directory using an indirect map, follow these steps:

  1. If you are using local files for maps, use an editor to open or create the master map in the /etc directory. Name the master map /etc/auto_master. If you are using NIS, open the master map on the corresponding master server.

    If you are using LDAP, the map must be modified on the LDAP server. For information on how to modify the map, see LDAP-UX Client Services B.04.00 Administrator’s Guide (J4269-90064).

    If the indirect map you modified is not listed in the master map, add the following entry to the master map:

    local_parent_directory indirect_map_name [mount_options]
  2. If you are using local files for your AutoFS maps, use an editor to open or create an indirect map in the /etc directory. Add a line with the following syntax, to the indirect map:

    local_subdirectory [mount_options] server:remote_directory

    If you are using NIS or LDAP to manage maps, add an entry to an indirect map on the corresponding NIS master server or LDAP directory.

  3. If you are using NIS to manage maps, rebuild the maps and push them to the slave servers. For more information, see NIS Administrator’s Guide (5991-7656).

  4. If you modified the master map, enter the following command on each host that uses the map, to force AutoFS to read the modified master map:

    /usr/sbin/automount

Notes on Indirect Maps

The local_subdirectory specified in the indirect map is the lowest-level subdirectory in the local directory pathname. For example, if you are mounting a remote directory on /nfs/apps/draw, the local_subdirectory specified in the indirect map will be draw.

The local_parent_directory specified in the master map consists of directories, except the lowest-level subdirectory in the local directory pathname. For example, if you are mounting a remote directory on /nfs/apps/draw, the local_parent_directory specified in the master map will be /nfs/apps.

IMPORTANT: Ensure that local_parent_directory and local_subdirectory are not already created. AutoFS creates them when it mounts the remote directory. If these directories exist, their files and directories in them are hidden when the remote directory is mounted.

Ensure that the local mount point specified in the AutoFS map entry is different from the exported directory on the NFS server. If it is the same, and the NFS server also acts as an NFS client and uses AutoFS with these map entries, the exported directory might attempt to mount over itself. As a result, unexpected behavior can occur. A directory might also attempt to mount over itself if you use a single set of AutoFS maps that are distributed using NIS or LDAP, or are in a high availability environment.

The mount options that you can specify in the AutoFS maps are the same ones that you use for the type of filesystem you attempt to automount. For example, if the filesystem type is NFS, then the mount options you use are identical to the ones used for standard NFS mounted directories. For a list of mount options, see “Changing the Default Mount Options”. You cannot use the bg option for an automounted directory. The mount options configured in the indirect map override the ones in the master map if there is a conflict.

You can configure indirect automounts in the same indirect map only if their local_parent_directory, as specified in the master map, is the same. For example, indirect mounts with the local mount points /nfs/apps/draw and /nfs/apps/word can be configured in the same indirect map.

Indirect maps are usually called /etc/auto_name, where name helps you remember what is configured in the map.

If the indirect map name in the AutoFS master map begins with a slash (/), AutoFS assumes that it is a local file. If it does not contain a slash, AutoFS uses the Name Service Switch to determine whether it is a file, LDAP, or an NIS map. For more information on configuring the name service switch, see nsswitch.conf (4).

Sample File Entries for NFS Indirect Automounts

Following are sample lines from the AutoFS master map on the NFS client, sage. The master map also includes an entry for the /etc/auto_direct direct map.

# /etc/auto_master file
# local mount point map name mount options

/- /etc/auto_direct
/nfs/desktop    /etc/auto_desktop

Following are sample lines from an AutoFS indirect map on the NFS client, sage. The hash (#) symbol indicates a commented line.

# /etc/auto_desktop file
# local mount point    mount options remote server:directory

draw -nosuid thyme:/export/apps/draw
write -nosuid           basil:/export/write

Figure 3-4 “How AutoFS Sets Up NFS Indirect Mounts” illustrates how AutoFS sets up indirect mounts.

Figure 3-4 How AutoFS Sets Up NFS Indirect Mounts

How AutoFS Sets Up NFS Indirect Mounts
Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2007 Hewlett-Packard Development Company, L.P.