Using the NFS automounter

Specifying multiple mounts

You can specify multiple mounts using a single entry in a direct or indirect map, where the mounts can be from different locations and with different mount options. In the sample map, as follows

   /usr/local \
                     /bin     -ro,soft   ivy:/export/local/sun3 \
                     /share   -ro,soft   ivy:/export/local/share \
                     /src     -ro,soft   ivy:/export/local/src
   /usr/man                   -ro,soft   oak:/usr/man \
                                         rose:/usr/man \
   /usr/fun                   -ro,soft   peach:/usr/games
   /var/spool/news            -ro,soft   pine:/var/spool/news
   /usr/frame                 -ro,soft   redwood:/usr/frame1.3 \
the first entry (which is actually one long entry whose readability has been improved by splitting it into three lines) mounts /usr/local/bin, /usr/local/share and /usr/local/src from the server ivy, with the options ``read-only'' and ``soft.'' The entry could also read:
   /usr/local \
                  /bin     -ro,soft     ivy:/export/local/sun3 \
                  /share   -rw,secure   willow:/usr/local/share \
                  /src     -ro,intr     oak:/home/jones/src
where the options are different and more than one server is used.

Multiple mounts can be hierarchical. When resources are mounted hierarchically, each resource is mounted on a subdirectory within another resource. When the root of the hierarchy is referenced, the automounter mounts the entire hierarchy. The concept of root here is very important. In the case of a single mount, there is no need to specify the root of the mount point, because it is assumed that the location of the mount point is at the mount root or /. When mounting a hierarchy, however, the automounter must have a mount point for each mount within the hierarchy. Refer to ``Example: hierarchical mounting'' for an illustration of a true hierarchical mounting.

NOTE: A true hierarchical mount can be a problem if the server for the root of the hierarchy goes down; any attempt to unmount the lower branches will fail, since the unmounting has to proceed through the mount root, which also cannot be unmounted while its server is down.

Example: hierarchical mounting

The following code shows a true hierarchical mounting.

   /usr/local \
                  /        -rw,intr     peach:/export/local \
                  /bin     -ro,soft     ivy:/export/local/sun3 \
                  /share   -rw,secure   willow:/usr/local/share \
                  /src     -ro,intr     oak:/home/jones/src
The mount points used here for the hierarchy are /, /bin, /share, and /src. Note that these mount point paths are relative to the mount root, not the host's filesystem root. The first entry in the example above has / as its mount point. It is mounted at the mount root. There is no requirement that the first mount of a hierarchy be at the mount root. The automounter will issue mkdir commands to build a path to the first mount point if it is not at the mount root.
Next topic: Specifying multiple locations
Previous topic: Example: indirect map

© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 - 01 June 2005