NFS Services Administrator's Guide

Configuring and Administering NFS
Configuring and Administering AutoFS
Chapter 2118
AutoFS mounts /export/home/howard from server basil to the local
mount point /home/howard on the NFS client. Figure 2-16 illustrates
this configuration:
Figure 2-16 Home Directories Automounted with Wildcards
To Automount Multiple Directories Simultaneously
(Hierarchical Mounts)
Use an editor to create an entry with the following format in a direct
or indirect automounter map. (Create the map, if necessary, and add
it to the automounter master map.)
local_dir /local_subdirectory [-options]
server:remote_directory \
/local_subdirectory [-options]
server:remote_directory \ . . .
The backslash (\) characters tell AutoFS to ignore the line breaks, so
this entry is effectively all one line.
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 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,
NFS server "basil" local NFS client
/
/home
/howard
/
/home
/howard
/export
.profile mystuff
.profile mystuff