Enhanced AutoFS Administrator's Guide

Troubleshooting AutoFS
AutoFS Tracing
Chapter 468
1. Log on as root to the NFS client.
2. Add -T to the AUTOMOUNTD_OPTIONS variable in the
/etc/rc.config.d/nfsconf file, as in the following example:
AUTOMOUNTD_OPTIONS=”-T”
This change puts AutoFS basic tracing messages into the
/var/adm/automount.log file.
3. To get a list of all the automounted directories on the client, issue the
following command:
for FS in $(grep autofs /etc/mnttab | awk ‘{print $2}’)
do
grep ‘nfs’ /etc/mnttab | awk ‘{print $2}’ | grep ^${FS}
done
4. For every automounted directory listed by the grep command, issue
the following command to determine whether the directory is
currently in use:
/usr/sbin/fuser -cu
local_mount_point
This command lists the process IDs and user names of all the users
using the mounted directory.
5. Warn the users to cd out of the directory, and kill the processes that
are using the directory, or wait until the processes terminate. You
can issue the following command to kill all the processes using the
mounted directory:
/usr/sbin/fuser -ck
local_mount_point
6. To kill AutoFS, issue the following command:
/sbin/init.d/nfs.client stop
WARNING Do not kill the automountd daemon with the kill command
because it does not die gracefully. Moreover, it does not
unmount AutoFS mount points before it dies. Use the
nfs.client stop script to make sure automountd dies cleanly.
7. To start AutoFS with tracing enabled, issue the following command:
/abin/init.d/nfs.client start