NFS Services Administrator's Guide

Configuring and Administering NFS
Configuring and Administering the NFS Automounter
Chapter 2 77
The automounter reads this entry as one line. The line has been
broken for readability, and the backslash (\) tells the
automounter that the line continues after the line break.
If the remote directory has the same name on every server, use a
syntax like the following example from an indirect map:
man -ro broccoli,cabbage,cauliflower:/usr/share/man
Directories with multiple servers should be mounted read-only to ensure
that the versions remain the same on all the servers.
When a user requests access to a directory with multiple servers
configured, the automounter polls all the servers simultaneously and
mounts the directory from the server that responds first. Multiple
servers give users reliable access to a mounted directory, because if one
server is down, the directory can be mounted from another. Also,
multiple servers provide some load balancing across the network; a
server that is not busy will respond more quickly to the automounters
poll than one that is heavily loaded, so the directory will be mounted
from the server that is not busy.
If you configure multiple servers on both sides of a gateway, the servers
on the same side of the gateway as the NFS client will always be used,
because they will always respond to the client’s poll before the servers on
the other side of the gateway.
To Use Environment Variables as Shortcuts in
Automounter Maps
1. Use an environment variable anywhere in a direct or indirect
automounter map except the first field, which specifies the local
mount point. An environment variable must be preceded by a dollar
sign ($) or enclosed in curly braces {}. The following direct map uses
a variable called HOST:
/private_files sage:/export/private_files/$HOST
2. Add the -D option to the AUTO_OPTIONS variable in the
/etc/rc.config.d/nfsconf file to assign a value to the variable, as
in the following example:
AUTO_OPTIONS=”-f $AUTO_MASTER -D HOST='hostname'”