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
HP-UX 11i December 2002 Release Notes: HP-UX Servers and Workstations > Chapter 11 New and Changed Disk and File Management Features

Mounting and Unmounting NFS File Systems Automatically Using AutoFS

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

HP-UX 11i provides a daemon that mounts and unmounts NFS file systems automatically. This feature is known as AutoFS.

AutoFS coexists with automount and performs the same functions as automount, but has a new, more reliable design. Additionally, AutoFS supports the NFS PV3 protocol whereas the automounter does not. The automount command has been replaced with a shell script that will either invoke the old automount daemon or the new AutoFS automount command, depending on the variable AUTOFS in /etc/rc.config.d/nfsconf.

  • AUTOFS=1 causes /sbin/init.d/nfs.client to start the AutoFS daemon (automountd) and run the AutoFS automount command.

  • AUTOFS=0 starts the old automount daemon. This is the default on newly installed or updated systems.

The old automount executable is located at:

/usr/lib/netsvc/fs/automount/automount

The new AutoFS executables are located at:

/usr/lib/netsvc/fs/autofs/automountd /usr/lib/netsvc/fs/autofs/automount

When AutoFS is executed, a process used by its kernel code for kernel thread support is also started. The autofs_proc process cannot be killed, except by a shutdown of the system.

Impact

From an operational standpoint, AutoFS functions comparably to the old automounter and returns the same values.

From the system administrator's standpoint, however, AutoFS is started, stopped, and updated differently than its predecessor. The nfs.client start-script automatically starts and stops the correct daemons depending on the value of AUTOFS in /etc/rc.config.d/nfsconf.

NOTE: If you do not use this script, you need to remember which implementation of automatic NFS file mounting you are using. Starting both AutoFS and automounter can lead to problems accessing the remote file system. You must reboot to switch between AutoFS and the old automounter.

Other Operational Differences

Any user-written scripts that expect the automount command to remain running as a daemon will have to be updated either to not expect this behavior or to check explicitly that automountd is running. AutoFS can no longer be shut down by killing the automount process; instead, you must shut it down by executing the following command:

/sbin/init.d/nfs.client stop

This will unmount all mounted AutoFS filesystems and then kill the automountd process.

To stop AutoFS without using the /sbin/init.d/nfs.client script, you must enter the following:

/usr/sbin/umountall -F autofs

kill automounted_pid

The automount -n, -M, and -tw options are not supported in AutoFS. The -m and -tm options are also not supported, but their behavior can be configured in different ways:

  • by modifying the nsswitch.conf file to get the -m behavior

  • by modifying the automount map entries to specify the time-out for the -tm option. The -tl option is accessed using -t.

Another difference between automounter and AutoFS is that AutoFS no longer uses symbolic links to access the mount points. Applications that depend on this explicit behavior will no longer work as expected.

Additional Information

The existing 11.0 automounter can be re-enabled, if desired, by setting the AUTOFS variable to 0 or by removing the AUTOFS variable from /etc/rc.config.d/nfsconf. In this configuration, automounter will not mount file systems via the NFS version 3 protocol.

For more information on how to migrate to AutoFS, see Chapter 2 in the Installing and Administering NFS Services manual.

Configuration

To enable AutoFS, you must add or set the AUTOFS variable to 1 in /etc/rc.config.d/nfsconf. Here is an example of this change:

#autofs configuration. See autofs(1m) 
#
#For the 11.0 Release line both AUTOFS and the old Automount
#are delivered. In order to invoke the AUTOFS instead of
#you must set the AUTOFS flag to 1.
#
#/usr/sbin/automount is now a script that sources in this file
#Depending on the variable AUTOFS, either AUTOFS or the old
#automount process will execute. The nfs.client start script
#will also use this variable to start the appropriate process
#during the boot sequence.
#AUTOFS= 0 - use the old automount process.
# 1 - use the new AutoFS.
#AUTOMOUNT_OPTIONS= - options to the AutoFS automount command
#AUTOMOUNTD_OPTIONS= - options to the AutoFS automountd daemon
#
#The AUTOMOUNT flag still needs to be set for either the old
#automount or new AutoFS to be started by the nfs.client script.
#
AUTOFS=1
AUTOMOUNT_OPTIONS=""
AUTOMOUNTD_OPTIONS=""

Documentation Change

A new manpage, automountd(1M), describes the AutoFS automount daemon. The automountd(1M) manpage has been modified to describe both the old automount daemon and the new AutoFS command.

Obsolescence

Although all 11.0 patch bundles contain both AutoFS and automounter, AutoFS will replace automounter in a future release of HP-UX.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2002 Hewlett-Packard Development Company, L.P.