| United States-English |
|
|
|
![]() |
NFS Services Administrator’s Guide: HP-UX 11i version 3 > Chapter 3 Configuring and Administering AutoFSConfiguring AutoFS Direct and Indirect Mounts |
|
A direct map is an automount mount-point. It creates a direct association between a mount-point on the client and a directory on the server. Direct maps have the absolute path name. The automounts configured in a direct map can be mounted in various places in the local filesystem; they need not be located under the same parent directory. An indirect map uses the key to establish a connection between a mount-point on the client and a directory on the server. Indirect maps are useful for accessing specific file systems, such as home directories. The automounts configured in an indirect map are mounted under the same local parent directory. Figure 3-4 shows the difference between direct mounts and indirect mounts on an NFS client. In the Mounts in a Direct Map figure, mounts are configured in various places in the local filesystem and not located under the same parent directory. In the Mounts in an Indirect Map figure, all the mounts are configured under the same parent directory.
This section describes how to automount a remote directory using a direct map. To mount a remote directory using a direct map, follow these steps:
The mount options that you can specify in the AutoFS maps are the same options that you use for the type of filesystems 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 more information on the different mount options, see “Changing the Default Mount Options”. You cannot use the bg option for an automounted directory. The mount options configured in the direct map override the ones in the master map, if there is a conflict. You can configure all the direct automounts in the same map. Most users use the file name, /etc/auto_direct, for their direct map. Following is the syntax for a direct map:
where:
If you plan to use NIS or LDAP to manage maps, there can be only one direct map in your configuration. If the direct map name in the master map begins with a slash (/), AutoFS considers it to be a local file. If it does not contain a slash, AutoFS uses the NSS to determine whether it is a file, LDAP, or an NIS map. For more information on using NSS, see nsswitch.conf(4). Following are sample entries from the AutoFS master map on the NFS client, sage:
Following are sample entries from an AutoFS direct map on the NFS client, sage. The hash (#) symbol indicates a commented line.
Figure 3-5 illustrates how AutoFS sets up direct mounts. 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:
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. Indirect maps are usually called /etc/auto_name, where name helps you remember what is configured in the map. Following is the syntax of the indirect map:
where:
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). The local_subdirectory specified in an indirect map is the lowest-level subdirectory in the local directory path name. For example, if you are mounting a remote directory on /nfs/apps/draw, draw is the local_subdirectory specified in the indirect map. 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.
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, /nfs/apps is the local_parent_directory specified in the master map. 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. Following are sample lines from an AutoFS indirect map on the NFS client, sage. The hash (#) symbol indicates a commented line.
Figure 3-6 illustrates how AutoFS sets up indirect mounts. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||