System Administration Guide

Automounting Directories

You can mount file systems shared through NFS by using a method called automounting. Running in the background, the AutoFS program mounts and unmounts remote directories as they are needed. Whenever a user on a client system running AutoFS accesses a remote file or directory available through AutoFS, it mounts the file system on the user's system. The remote file system remains mounted as long as the user remains in the directory and is using a file. If the remote file system is not accessed for a certain period of time, it is automatically unmounted. AutoFS mounts and unmounts file systems as required without any intervention on the part of the user other than changing into or out of a directory.

You can mount some file hierarchies with AutoFS, and others using the /etc/vfstab file and the mount command. A diskless machine must have entries for root (/), /usr, and /usr/kvm in the /etc/vfstab file. Because shared file systems should always remain available, do not use AutoFS to mount /usr/share.

AutoFS works with the file systems specified in maps. These maps can be maintained as NIS, NIS+, or local /etc files.

The AutoFS maps can specify several remote locations for a particular file. This way, if one of the servers is down, AutoFS can try to mount from another machine. You can specify which servers are preferred for each resource in the maps by assigning each server a weighting factor.

AutoFS starts automatically when a system enters run level 3. You can also start it from a command line. See the NFS Administration Guide for complete information on how to set up and administer AutoFS.

By default, the Solaris system software automounts /home.