Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
NFS Services Administrator’s Guide: HP-UX 11i version 3 > Chapter 3 Configuring and Administering AutoFS

Overview

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

AutoFS is a client-side service that automatically mounts remote filesystems. During system startup, AutoFS is initialized by the automount command. The automount daemon, automountd, runs continuously and mounts and unmounts remote directories as required.

When a client running automountd attempts to access a remote file or a remote directory, automountd mounts it, if it has been configured. If the mounted remote filesystem is not accessed for a certain period of time, it is automatically unmounted.

AutoFS uses maps to navigate the network. Maps define the mount-points that AutoFS will mount. AutoFS can mount both directories and files. For more information on AutoFS maps, see “Maps Overview”.

Following sections describe the different components of AutoFS that work together to automatically mount and unmount filesystems, in detail.

AutoFS Filesystem

The AutoFS filesystem is a virtual filesystem that provides a directory structure to enable automatic mounting of filesystems. It includes autofskd, a kernel-based process that periodically cleans up mounts. The filesystem interacts with the automount command and the automountd daemon to mount filesystems automatically.

The automount Command

This command installs the AutoFS mount-points, and associates an automount map with each mount-point. The AutoFS filesystem monitors attempts to access directories within it and notifies the automountd daemon. The daemon locates a filesystem using the map, and then mounts this filesystem at the point of reference within the AutoFS filesystem. The automount map specifies the location of all the AutoFS mount-points.

NOTE: You must run the automount command whenever the master map or the direct maps are updated.

The automountd Daemon

The automountd daemon is a stateless, multi-threaded daemon that mounts or unmounts directories and filesystems by accepting Remote Procedure Calls (RPC) requests.

Figure 3-1 illustrates how the AutoFS components interact.

Figure 3-1 Interaction between AutoFS Components

Interaction between AutoFS Components

The automount command reads the AutoFS master map to create the initial set of AutoFS mount-points in the internal mount table, /etc/mnttab. The automounted filesystems are not mounted automatically at startup. The automounted filesystems are points under which the filesystems are mounted when the clients request access to them.

When AutoFS receives a request to mount a filesystem, it calls the automountd daemon, which mounts the requested filesystem. AutoFS mounts the filesystems at the configured mount-points.

The automountd daemon is independent of the automount command. This separation enables you to add, delete, or modify the AutoFS map information, without stopping and restarting the automountd daemon. You can modify the set of mount-points by modifying the AutoFS maps and by running the automount command to read them and update the mount table.

If an automounted filesystem remains idle for a specified period of time (the default is 10 minutes), AutoFS unmounts it. To change the duration, in seconds, for which a file system is to remain mounted when not in use, use the -t option of the automount command. For more information on the different options supported by automount, see automount(1M) and automountd(1M).

CAUTION: You must maintain filesystems managed by AutoFS, by using the automountd and automount utilities. Manually mounting and unmounting file systems managed by AutoFS can cause disruptive or unpredictable results, including but not limited to commands hanging or not returning expected results. Applications can also fail because of their dependencies on these mounted filesystems.
Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2008 Hewlett-Packard Development Company, L.P.