NFS Services Administrator's Guide
Configuring and Administering AutoFS
Automounting Multiple Directories (Hierarchical Mounts)
Chapter 3 129
Automounting Multiple Directories
(Hierarchical Mounts)
If the map does not exist, create it, and add it to the AutoFS master map.
Use an editor to create an entry with the following format in a direct or
indirect map:
local_dir
/
local_subdirectory
[-options] \
server
:
remote_directory
\
/
local_subdirectory
[-
options
]
server
:
remote_directory
The backslash (\) characters instruct AutoFS to ignore the line breaks.
This entry is effectively all one line.
With this format, map entries cause the listed remote directories to be
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 broccoli:/opt/proj1/src \
/datafiles cauliflower:/opt/proj1/samples/data
The following is another example from an indirect map.
chap2 -nosuid /text sage:/our_book/chap2 \
/graphics basil:/our_book/artwork/chap2 \
/old sage:/our_book/oldfiles/chap2
The same mount option (nosuid) applies to all three automounted
directories.