NFS Services Administrator's Guide (B.11.31.03) August 2008

Advanced AutoFS Administration
This section presents advanced AutoFS concepts that enable you to improve mounting
efficiency and also help make map building easier. This section addresses:
Automounting Multiple Directories (Hierarchical Mounts)” (page 97)
“Configuring Replicated Servers for an AutoFS Directory” (page 97)
“Including a Map in Another Map” (page 99)
“Creating a Hierarchy of AutoFS Maps” (page 100)
Automounting Multiple Directories (Hierarchical Mounts)
AutoFS enables you to automount multiple directories simultaneously.
Use an editor to create an entry with the following format in a direct or indirect map,
and if needed, create the auto_master entry:
local_dir /local_subdirectory
[-options] \ server:remote_directory \
/local_subdirectory [-options]
server:remote_directory \
...
Adding these map entries does not automatically mount them. The listed remote
directories are mounted only when referenced. For example, the following entry from
a direct map mounts the source code and the data files for a project whenever anyone
requests access to both of them:
/our_project /source -ro basil:/opt/proj1/src \
/datafiles thyme:/opt/proj1/samples/data
The following is another example from an indirect map.
chap2 -nosuid /text thyme:/our_book/chap2 \
/graphics basil:/our_book/artwork/chap2 \
/old thyme:/our_book/oldfiles/chap2
The nosuid mount option applies to all three automounted directories. For more
information on the nosuid mount option, see automount(1M).
Configuring Replicated Servers for an AutoFS Directory
This section describes how to configure multiple replicated servers for an AutoFS
directory.
Modify the entry that mounts the remote directory to list multiple servers in the
appropriate map, as follows:
If the remote directories have the same name on every server, use a syntax such
as the following from an indirect map:
man -ro broccoli,cabbage,cauliflower:/usr/share/man
You can assign a weighting factor to the servers by specifying a number in
parentheses after each server name. If the server has a lower weighting number
Advanced AutoFS Administration 97