Previous Table of Contents Next


The Mount Table (/etc/mnttab)

The SunOS 5.x system software uses a mount table, which is maintained in the /etc/mnttab file, to keep track of currently mounted file systems. Whenever users mount or unmount a file system using either the mount/umount commands or the automounter, the system modifies the /etc/mnttab file to list the currently mounted file systems.

NIS+ Terminology

NIS+ is the SunOS 5.x enterprise naming service. Information used by NIS+ is stored in tables, also called databases, which can be administered using the nistbladm (NIS+ table administration) command. You can administer some of the NIS+ tables using Solstice AdminSuite’s Database Manager. NIS+ implementations of automount maps also are called databases or tables. For example, you administer the NIS+ Auto_home database using the Database Manager. You administer the NIS+ auto_master table, and any other NIS+ auto_variable tables you create, using the nistbladm command.

Automount Terminology

This section describes terms that are specific to the automounter.

Automounter

The automounter (also referred to as the automount program and AutoFS), a daemon that is started at boot time by the rc2 script, runs in the background. It automatically mounts and unmounts NFS file systems as needed. Information provided in maps in the /etc directory have the prefix auto_ and are used to mount and unmount directories and subdirectories that are listed in the automount maps. The term automounter in this context refers to the automount program and the functionality that it provides, and the term automounting describes the activities of the automount program.

Since the Solaris 2.3 system software release, the automount program has split into two programs: an automount daemon and a separate automount program. Both are run when the system is booted. See "How the Automounter Works" later in this chapter for more information.

Automount Maps

The automounter uses maps to determine which file systems to mount and where to mount them. There are three kinds of automount maps: master, indirect, and direct. Map names must always have auto_ as a prefix.


NOTE:  SunOS 4.x automount maps used the auto. prefix naming convention. You do not need to rename your SunOS 4.x automount maps for them to be compatible with the SunOS 5.x automounter. The SunOS 5.x automounter looks first for files with an auto_ prefix. If none are found, it looks for files with an auto. prefix.

The Master Map

The master map, named auto_master, is the master file consulted by the automounter when the system starts up. It contains the default mount points /net and /home and the names of the direct or indirect maps that the automounter consults.

Indirect and Direct Maps

The indirect and direct maps contain detailed information that the automounter uses to mount and unmount the file systems. You can specify indirect maps by using a simple pathname; you can specify direct maps by using an absolute pathname. See "Indirect Maps’ and “Direct Maps” for more information.

The most commonly used indirect map is the home directory map, which contains the mount point and the names of the home directories that are to be mounted automatically. You can use the AdminSuite’s Database Manager to administer the automounter’s home directory database.

Automount Maps and Mount Points

The following sections describe the syntax of automount maps, the auto_master default mount points, and the mount point required for direct maps.

The Default Automount Maps

SunOS 5.x system software provides you with two default automounter maps: auto_master and auto_home.

The Master Map

The master map is located in the /etc directory. As indicated earlier, this map contains the default mount points /net and /home. These default mount points are new with SVR4. Use them as a convenient way to maintain a consistent namespace.

The syntax of the entries in the auto_master map is:

mount-point   map-name   [mount-options]

The full pathname of a directory is mount-point. If the directory does not exist, the automounter creates it, if possible. The map used by the automounter to find the mount points and locations of the server’s file systems is named map-name. Finally, mount-options is an optional list of comma-separated options that control the mounting of the entries specified by map-name. Options specified in the map-name map take precedence over options specified in the auto_master map. The mount-options used by the automounter are the same mount-options used in the /etc/vfstab file. Table 7-1 shows the most common mount options. See the mount_nfs(1M) manual page for a complete list of NFS mount options.

Table 7-1 Mount Options

Option Description
rw Resource is mounted read-write. If no option is specified, the resource is mounted rw.
ro Resource is mounted read-only.
suid Set user ID execution is allowed. If no option is specified, the resource is mounted suid.
nosuid Set user ID is not allowed.
soft Return an error if the server does not respond.
hard Continue retrying the mount request until the server responds.
intr Allow keyboard interrupts to kill a process that is hung while waiting for a response on a hard-mounted file system. The default is intr.
nointr Do not allow keyboard interrupts to kill a process that is hung while waiting for a response on a hard-mounted file system.

Here is the default auto_master map:

# Master map for automounter
#
+auto_master
/net     -hosts   -nosuid,nobrowse
/home      auto_home  -nobrowse
/xfn     -xfn


Previous Table of Contents Next