Enhanced AutoFS Administrator's Guide

Installing Enhanced AutoFS
Restarting Enhanced AutoFS
Chapter 2 15
Restarting Enhanced AutoFS
You rarely need to restart Enhanced AutoFS. If there is a need to restart
Enhanced AutoFS, use the following procedure:
1. To find a list of all the automounted directories on the client, issue
the following script:
for FS in $(grep autofs /etc/mnttab | awk ‘{print $2}’)
do
grep ‘nfs’ /etc/mnttab | awk ‘{print $2}’ | grep ^${FS}
done
2. 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.
3. Warn any user to cd out of the directory, and kill any process that is
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
4. To kill Enhanced 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.
5. To ensure that Enhanced AutoFS is no longer active, issue the ps
command as follows:
/usr/bin/ps -ef | grep automount