This section includes information on using the new features
introduced with Enhanced AutoFS.
On-Demand
Mounting |
 |
In previous versions, AutoFS mounted an entire set of file
systems if they were hierarchically related. In contrast, Enhanced
AutoFS mounts only those file systems that users access; other file
systems that are hierarchically related to these file systems are
mounted when they are needed.
For example:
# /etc/auto_master file # local mount point map name mount options /- /etc/auto_direct |
# /etc/auto_direct file # local mount point mount options remote server:directory /auto/project/specs -nosuid thyme:/export/project/specs /auto/project/budget -nosuid basil:/export/FY99/proj1 |
If you have the preceding AutoFS master and direct maps on
the NFS client, sage, and if
a user on this NFS client types the following command:
Only /auto/project/specs subdirectories are mounted using on-demand mounting.
Figure 3-1 “Automounted
Directories for On-Demand Mounting” shows the automounted
file structure after the user’s command is issued.
Browsability
for Indirect Maps |
 |
Enhanced AutoFS allows a user to view the potential mount
points for indirect maps, without having to actually mount each
file system.
By default, browsing is enabled for all indirect AutoFS maps.
To disable browsing, you can specify the -nobrowse option for each indirect map that you do not want
to be browseable. The automountd command with -n option is used to disable browsing for all indirect
maps without having to specify the -nobrowse option for each indirect map.
Consider the following example:
# /etc/auto_master file # local mount point map name mount options /nfs/desktop /etc/auto_indirect |
# /etc/auto_indirect file # local mount point mount options remote server:directory /test -nosuid thyme:/export/project/test /apps -nosuid basil:/export/apps |
Considering that you have the preceding AutoFS master and
indirect maps on the NFS client, sage, issue the following commands:
The output of the last command (ls) is as follows:
The ls command displays this output because the test and apps subdirectories are the potential mount points (browsability),
but are not mounted currently. However, if you issue the following
commands, both the test and apps subdirectories are mounted.
cd /nfs/desktop/test cd /nfs/desktop/apps |
NFS
Loopback Mount |
 |
By default, AutoFS uses LOFS mounts for locally mounted file
systems. Enhanced AutoFS provides an option to enable loopback NFS
mounts for the local mount.
You can use the automountd command with the -L option to enable the loopback NFS mounts for locally
mounted file systems. You need to use this option in the High Availability
NFS environments.