NFS Services Administrator's Guide

Configuring and Administering NFS
Configuring and Administering the NFS Automounter
Chapter 286
same time. For example, the following entry from a direct map mounts
the source code and the data files for a project at the same time;
whenever anyone requests access to either one, they are both mounted.
/our_project /source -ro broccoli:/opt/proj1/src \
/datafiles cauliflower:/opt/proj1/samples/data
Because the directories are always mounted simultaneously, you can use
relative pathnames to move from one to another, for example,
cd ../source
Here is another example from an indirect map. In this example, the same
mount option (nosuid) applies to all three automounted directories.
chap2 -nosuid /text sage:/our_book/chap2 \
/graphics basil:/our_book/artwork/chap2 \
/old sage:/our_book/oldfiles/chap2
To Improve Automounter Performance with
Subdirectory Notation in Indirect Maps
1. Look for entries in your indirect maps that specify the same server
and remote pathname and differ only in the local mount point and
the deepest subdirectory on the remote system. For example, the
following entries in an indirect map are good candidates for
subdirectory notation:
terriers akcserver:/breeders/terriers
hunting_dogs akcserver:/breeders/retrievers
local_breeders akcserver:/breeders/SFbayarea
2. Replace the last slash (/) in the remote pathnames with a colon, as in
the following example:
terriers akcserver:/breeders:terriers
hunting_dogs akcserver:/breeders:retrievers
local_breeders akcserver:/breeders:SFbayarea
When the automounter encounters subdirectory notation, it mounts the
parent directory instead of mounting each subdirectory individually.
In the above example using subdirectory notation, the automounter
mounts akcserver:/breeders whenever one of the remote
subdirectories (terriers, retrievers, or SFbayarea) is requested.
Then, when another subdirectory is requested, it is already mounted,
and all the automounter has to do is create a symbolic link for it.