DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Configuring the NFS automounter

Direct and indirect mounting

automount provides two styles of automounting: direct and indirect. The two styles are similar, but have the following differences:


directory structure
While the mount point in a direct mount is to a real directory, a mount point in an indirect mount must be attached under a virtual parent directory that is created and managed by automount and does not really exist on any disk. ``An example of direct mounting using automount'', and ``An example of indirect mounting using automount'', illustrate this difference.

altering mount points
Because of the virtual parent directory, indirect mount points can be changed without restarting automount; changes to direct mount points require restarting automount. See ``Understanding map modifications'' for a further description of this difference.

mount table cost
Direct mounts use more mount table slots than indirect mounts do, so use indirect mounts wherever possible.

automount knows what direct mounts to make by reading direct maps. It knows what indirect mounts to make by reading indirect maps. See ``About automount maps'' for more information.

Direct mounting example

To illustrate a direct mount, let's assume that automount was configured to mount the remote filesystem london:/usr/man on the local directory /usr/man (see ``An example of direct mounting using automount''). The first user to issue a command that accesses a directory or file under /usr/man causes automount to mount it automatically. A typical command that would trigger a mount is man rpcinfo, which accesses the file ../cat.NADM/rpcinfo.NADM in the /usr/man directory. These are the steps automount takes to complete the mount:

  1. mkdir /tmp_mnt/usr/man

    If the /tmp_mnt or /tmp_mnt/usr directories do not exist at the time, automount creates them as well.

    automount also verifies that /usr and /usr/man exist. If they do not exist, automount creates them, if possible.

  2. mount -f NFS london:/usr/man /tmp_mnt/usr/man

    automount performs a conventional NFS mount.

  3. ln -s /tmp_mnt/usr/man /usr/man

    The ln -s command shows a symbolic link operation associating /usr/man and /tmp_mnt/usr/man. Remember, however, that automount does not really create symbolic links. Rather, it acts as a symbolic link server, in this case redirecting access requests destined for /usr/man to /tmp_mnt/usr/man.


As a result, london:/usr/man appears to the user to be directly NFS-mounted on the local /usr/man directory. The mounting of the remote /usr/man hides (that is, makes unavailable) any subdirectories under the pre-existing /usr/man.

An example of direct mounting using automount

Indirect mounting example

``An example of indirect mounting using automount'', illustrates how indirect mounting allows you to have resources residing on different hosts or devices and yet have it appear to the user that all these resources are conveniently located together in the same filesystem on her or his machine. (You can also use direct mounting; the differences are discussed in ``Using multiple direct mounts''.) For example, a user may want access to a number of documentation tools, including layout tools, fonts, and spell checkers. The system administrator can use automount to make it appear that all these resources are available in the /doc_tools directory of the user's home machine, even though each resource is actually on a different device or host.

In this example, automount is configured such that the remote filesystems madrid:/doc.stuff/spellers and oslo:/doc/bin/roff appear to be mounted on the local directory /doc_tools. When a user issues the commands /doc_tools/spellers/mspell and /doc_tools/roff/nroff, it causes automount to perform the equivalent of:

  1. mkdir /tmp_mnt/doc_tools/spellers
    mkdir /tmp_mnt/doc_tools/roff

    If the /tmp_mnt or /tmp_mnt/doc_tools directories do not exist at the time, automount creates them as well.

  2. mount -f NFS madrid:/doc.stuff/spellers /tmp_mnt/doc_tools/spellers
    mount -f NFS oslo:/doc/bin/roff /tmp_mnt/doc_tools/roff

    automount performs conventional NFS mounts.

  3. ln -s /tmp_mnt/doc_tools/spellers /doc_tools/spellers
    ln -s /tmp_mnt/doc_tools/roff /doc_tools/roff

    Again, automount does not really create symbolic links. Rather, it acts as a symbolic link server, in this case redirecting access requests destined for /doc_tools to /tmp_mnt/doc_tools.


NOTE: The /doc.stuff/spellers and /doc/bin/roff directories are mounted in separate operations. If the user issues only the command /doc_tools/spellers/mspell, only /doc.stuff/spellers from madrid is mounted; /doc/bin/roff will not be mounted until a file or directory under /doc_tools/roff is accessed.

The directory /doc_tools in this example is created and managed by automount; it does not exist on any disk. It may not contain any directories or files but those managed by automount. If a directory /doc_tools existed on the client, its contents would be covered (that is, hidden and unavailable) while the virtual parent /doc_tools was mounted.


An example of indirect mounting using automount


Next topic: About automount maps
Previous topic: The mount table

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