Previous Table of Contents Next


Indirect Maps

In an indirect map, you can specify a simple name as the mount point (no slashes). The auto_home map is a good example of an indirect map that mounts a resource from a single server. You can create as many other indirect maps as you like so that you can provide users access to files exported from one or more servers.

The simple syntax for indirect maps is the same as for the auto_home map:

key   [mount-options]   server:pathname

The simple pathname is key, which is used as the mount point for the resource. An optional, comma-separated list of options, [mount-options], controls the mounting of the resource. If no options are specified, the resource is mounted read-write. The name of the server and the path to the resource is server:pathname.

Map entries can describe any number of resources—from different locations and with different mount options. For example, in this auto_local file, FrameMaker and OpenWindows are made available from different servers:

# Indirect map for executables: auto_local
#
openwin     -ro  oak:/usr/openwin
frame-3.1   ash:/usr/local/frame.3.1

You could include an integer in parentheses to specify more than one server location, use shortcuts and wildcard characters to shorten entries with similar characteristics, and set weighting factors for each server named. The most likely to be selected is (0); progressively higher values decrease the chance of being selected. For more information, see “Syntax and Shortcuts for Map Entries”on page 143.

Direct Maps

In direct maps, you can specify an absolute pathname as the mount point. Use a direct map only if you cannot create the map indirectly.

The simple syntax for a direct map is as follows:

key   [mount-options]   server:pathname

The absolute pathname, key, is to be used as the mount point. An optional, comma-separated list of options, [mount-options], controls the mounting of the resource. If no options are specified, the resource is mounted read-write. The name of the server and the path to the resource are server:pathname.

By convention, create only one direct map, named auto_direct, and use it for all of the file systems you want to mount using an absolute pathname.

Manual pages are a good example of an entry you might want to automount in a direct map. To show you the difference between indirect and direct maps for manual pages, let’s first see how an indirect map would look. If you created an indirect map named auto_man to automount man pages from a server named oak on mount point /usr/man, it would look like this:

# Indirect map for man pages: auto_man

#
man1     oak:/usr/share/man/man1
man1b    oak:/usr/share/man/man1b
man1c    oak:/usr/share/man/man1c
man1f    oak:/usr/share/man/man1f
man1m    oak:/usr/share/man/man1m
man1s    oak:/usr/share/man/man1s
man2     oak:/usr/share/man/man2
man3     oak:/usr/share/man/man3
man3b    oak:/usr/share/man/man3b
man3c    oak:/usr/share/man/man3c
man3e    oak:/usr/share/man/man3e
man3g    oak:/usr/share/man/man3g
man3i    oak:/usr/share/man/man3i
man3k    oak:/usr/share/man/man3k
man3m    oak:/usr/share/man/man3m
man3n    oak:/usr/share/man/man3n
man3r    oak:/usr/share/man/man3r
man3s    oak:/usr/share/man/man3s
man3x    oak:/usr/share/man/man3x
man4     oak:/usr/share/man/man4
man4b    oak:/usr/share/man/man4b
man5     oak:/usr/share/man/man5
man6     oak:/usr/share/man/man6
man7     oak:/usr/share/man/man7
man9     oak:/usr/share/man/man9
man9e    oak:/usr/share/man/man9e
man9f    oak:/usr/share/man/man9f
man9s    oak:/usr/share/man/man9s
manl     oak:/usr/share/man/manl
mann     oak:/usr/share/man/mann

You must also create a corresponding entry named auto_man in the NIS+ auto_master map so that the automounter knows to look for the auto_man map.

If you do not want to create directories for each manual group, you can instead create a direct map with a single entry to automount manual pages. The manual page direct map entry might look like this:

# Direct map: auto_direct
      #
# Entry for automounting manual pages
#
/usr/man    oak:/usr/share/man

This map creates a direct association between the shared directory and the mount point.

You must also create a corresponding entry with the mount point /- and the auto_man map name in the NIS+ auto_master map so that the automounter knows to look for the auto_man map and to use as the mount point the absolute pathname from the direct map. In this case, you can clearly see the benefits of using a direct map.


CAUTION! Be sparing in your use of direct maps. Using direct maps can generate a lot of network traffic because of unnecessary mounting. For example, in the preceding manual page example, all of the manual pages are mounted from the direct map any time any manual page is accessed. From the indirect map, only the individual section containing the manual page is mounted.

Syntax and Shortcuts for Map Entries

These sections describe the syntax and shortcuts you can use for map entries. The examples show indirect maps, but you can also use these same shortcuts for the mount-options and server:pathname fields of direct maps.


Previous Table of Contents Next