Enhanced AutoFS Administrator's Guide, September 2005
Configuring and Administering AutoFS
Automounting Multiple Directories
Chapter 344
Automounting Multiple Directories
AutoFS enables you to automount multiple directories simultaneously
(hierarchical mounts).
Use an editor to create an entry with the following format in a direct or
indirect AutoFS map:
local_dir
/
local_subdirectory
[-options] \
server:
remote_directory
\
/
local_subdirectory
[-
options
]
server
:
remote_directory
\..
(Create the map, if necessary, and add it to the AutoFS master map.)
AutoFS ignores line breaks if lines end with the backslash (\) character.
Therefore, the previous entry is effectively a one-line entry. Map entries
with this format cause all the remote directories on the line to be
mounted at the same time.
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; they are mounted for on-demand mounting.
/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
In this example, the same mount option (nosuid) applies to all three
automounted directories.