|Previous||Table of Contents||Next|
These sections provide an overview of how the automounter works. When a system is booted, the automounter daemon is started from the /etc/init.d/nfs.client script. With Solaris 2.3 system software and later, the boot procedure is split into two programs: an automount command and an automountd daemon. The startup script for Solaris 2.3 system software is /etc/init.d/autofs.
The automounter checks for the local auto_master map. When the first entry in the local auto_master map is +auto_master, the automounter consults the NIS+ auto_master table, builds a list of the specified mount points, and consults the auto_variable maps it finds listed there. When the first entry in the local auto_master map is not +auto_master, the automounter consults the local auto_variable maps. The startup procedure for Solaris 2.0, 2.1, and 2.2 system software is shown in Figure 7-1. If no NIS+ auto_master map is found, NIS+ searches for an NIS auto.master map.
Figure 7-1 Starting the automounter.
When a user changes to a directory that has a mount point controlled by the automounter, the automounter intercepts the request and mounts the remote file system in the /tmp_mnt directory if it is not already mounted.
On the other hand, when a user changes out of a directory controlled by the automounter, the automounter waits a predetermined amount of time (the default is 5 minutes) and unmounts the file system if it has not been accessed during that time. Figure7-2 shows how the automounter works.
Figure 7-2 How the automounter works.
In Figure 7-2, when the user types cd, the automounter looks in the table that was created at boot time from the NIS+ auto_master map and NIS+ auto_home map and mounts the users home directory from the server named oak. When the user types man lp, the automounter looks in the table that was created at boot time, mounts the manual pages on /usr/man, and displays the manual page for the lp command. After 5 minutes of inactivity, the manual pages are unmounted. When the user types maker&, the automounter looks in the table that was created at boot time and mounts the executable for FrameMaker on /bin/frame3.1.
In these discussions about the automounter, it is assumed that you are administering a network of systems running SunOS 4.x and SunOS 5.x system software and that you are using NIS on the 4.x systems and NIS+ on the 5.x systems. This configuration provides you with a global namespace so that you can mount file systems that are exported from any server on the network. It also creates host-independent resources so that you can specify a list of servers from which file systems can be mounted, and it allows you to relocate resources from one server to another without disrupting the user environment.
NOTE: Although you can set up the automounter using local maps (auto_master files on a local system instead of on an NIS+ root master server), SunSoft strongly recommends that you do not do so. Decentralized and local maps are more complicated and expensive to maintain, and they are difficult to update consistently. SunSoft is implementing many new automount features in future versions of Solaris system software. Some of these new features will work only with maps stored in NIS+.
Before you begin planning your automounting, review the list of recommended policies in the following sections. They may affect how you set up your automount maps.
CAUTION! You should never change the SunOS 4.x auto.master map name; this name is required by the SunOS 4.x automounter.
These sections describe the prerequisites for using the automounter. Before creating automount maps, the network should be up and running NIS+ on SunOS 5.x systems and NIS on SunOS 4.x systems.
Each system on the network should have the default auto_master and auto_home maps in its local /etc directory. These maps are automatically installed with the system software.
|Previous||Table of Contents||Next|