Chapter 19. Network File System (NFS)
Replace <options> with a comma separated list of options for the NFS file system (refer to
Section 19.4, "Common NFS Mount Options"
information.
19.3. autofs
One drawback to using /etc/fstab is that, regardless of how infrequently a user accesses the NFS
mounted file system, the system must dedicate resources to keep the mounted file system in place.
This is not a problem with one or two mounts, but when the system is maintaining mounts to many
systems at one time, overall system performance can be affected. An alternative to /etc/fstab is to
use the kernel-based automount utility. An automounter consists of two components. One is a kernel
module that implements a file system, while the other is a user-space daemon that performs all of the
other functions. The automount utility can mount and unmount NFS file systems automatically (on
demand mounting) therefore saving system resources. The automount utility can be used to mount
other file systems including AFS, SMBFS, CIFS and local file systems.
autofs uses /etc/auto.master (master map) as its default primary configuration file. This can
be changed to use another supported network source and name using the autofs configuration (in /
etc/sysconfig/autofs) in conjunction with the Name Service Switch mechanism. An instance
of the version 4 daemon was run for each mount point configured in the master map and so it could
be run manually from the command line for any given mount point. This is not possible with version 5
because it uses a single daemon to manage all configured mount points, so all automounts must be
configured in the master map. This is in line with the usual requirements of other industry standard
automounters. Mount point, hostname, exported directory, and options can all be specified in a set of
files (or other supported network sources) rather than configuring them manually for each host. Please
ensure that you have the autofs package installed if you wish to use this service.
19.3.1. What's new in autofs version 5?
Direct map support
Autofs direct maps provide a mechanism to automatically mount file systems at arbitrary points
in the file system hierarchy. A direct map is denoted by a mount point of "/-" in the master map.
Entries in a direct map contain an absolute path name as a key (instead of the relative path names
used in indirect maps).
Lazy mount and unmount support
Multimount map entries describe a hierarchy of mount points under a single key. A good example
of this is the "-hosts" map, commonly used for automounting all exports from a host under "/net/
<host>" as a multi-mount map entry. When using the "-hosts" map, an 'ls' of "/net/<host>"
will mount autofs trigger mounts for each export from <host> and mount and expire them as they
are accessed. This can greatly reduce the number of active mounts needed when accessing a
server with a large number of exports.
Enhanced LDAP support
The Lightweight Directory Access Protocol, or LDAP, support in autofs version 5 has been
enhanced in several ways with respect to autofs version 4. The autofs configuration file (/etc/
sysconfig/autofs) provides a mechanism to specify the autofs schema that a site implements,
thus precluding the need to determine this via trial and error in the application itself. In addition,
authenticated binds to the LDAP server are now supported, using most mechanisms supported
by the common LDAP server implementations. A new configuration file has been added for this
support: /etc/autofs_ldap_auth.conf. The default configuration file is self-documenting,
and uses an XML format.
242
for details). Refer to the fstab man page for additional
Need help?
Do you have a question about the ENTERPRISE LINUX 5 - DEPLOYMENT and is the answer not in the manual?
Questions and answers