|
|
automount provides two styles of automounting: direct and indirect. The two styles are similar, but have the following differences:
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.
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:
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.
automount performs a conventional NFS mount.
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.
An example of direct mounting using automount
``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:
If the /tmp_mnt or /tmp_mnt/doc_tools directories do not exist at the time, automount creates them as well.
automount performs conventional NFS mounts.
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.
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