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

Troubleshooting AutoFS

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

This section describes the tools and procedures for troubleshooting AutoFS.

AutoFS Logging

AutoFS logs messages through /usr/sbin/syslogd. By default, syslogd writes messages to the file /var/adm/syslog/syslog.log. For more information on the syslog daemon, see syslogd(1M).

To Start AutoFS Logging

To start AutoFS Logging, follow these steps:

  1. Log in as superuser to the NFS client.

  2. Enter the following command to obtain a list of all the automounted directories on the client:

    for FS in $(grep autofs /etc/mnttab | awk ‘{print $2}’) do   grep ‘nfs’ 
    /etc/mnttab | awk ‘{print $2}’ | grep ^${FS}   done
  3. For every automounted directory listed by the grep command, enter 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 who are using the mounted directory.

  4. Warn users to exit the directory, and kill any processes that are using the directory, or wait until the processes terminate. Enter the following command to kill all the processes using the mounted directory:

    /usr/sbin/fuser -ck local_mount_point
  5. Enter the following command to stop AutoFS:

    /sbin/init.d/autofs stop 
  6. Add-v to AUTOMOUNTD_OPTIONS variable in the /etc/rc.config.d/nfsconffile, as follows:

    AUTOMOUNTD_OPTIONS = “-v”

    This change enables AutoFS logging.

  7. Enter the following commands to start AutoFS:

    /sbin/init.d/autofs start

To Stop AutoFS Logging

To stop AutoFS logging, stop AutoFS and restart it after removing “-v”option from AUTOMOUNTD_OPTIONS.

AutoFS Tracing

AutoFS supports the following Trace levels:

Detailed (level 3)

Includes traces of all the AutoFS requests and replies, mount attempts, timeouts, and unmount attempts. You can start level 3 tracing while AutoFS is running.

Basic (level 1)

Includes traces of all the AutoFS requests and replies. You must restart AutoFS to start level 1 tracing.

To Start and Stop AutoFS Detailed Tracing

To start and stop the AutoFS tracing Level 3, follow these steps:

  1. Log in as superuser to the NFS client.

  2. Enter the following commands:

    ps -ef | grep automoutd
    kill -SIGUSR2 PID

where:

PID

Process ID returned by the ps command.

Level 3 tracing is appended to the /var/adm/automount.log file.

NOTE: The command, kill -SIGUSR2 PID, works only if tracing is not already on.

To stop level 3 tracing, enter the same commands listed above to send the SIGUSR2 signal to automountd. The SIGUSR2 signal is a toggle that turns tracing on or off depending on its current state.

If basic (level 1) tracing is turned on when you send the SIGUSR2 signal to automountd, the SIGUSR2 signal turns tracing off.

To Start AutoFS Basic Tracing

To start AutoFS tracing Level 1, follow these steps:

  1. Log in as superuser to the NFS client.

  2. Add -T to the AUTOMOUNTD_OPTIONS variable in the /etc/rc.config.d/nfsconf file, as follows:

    AUTOMOUNTD_OPTIONS=”-T” 

    This change appends AutoFS basic tracing messages into the /var/adm/automount.log file.

  3. Enter the following command to obtain a list of all the automounted directories on the client:

    for FS in $(grep autofs /etc/mnttab | awk ‘{print $2}’)
    do 
     grep ‘nfs’ /etc/mnttab | awk ‘{print $2}’ | grep ^${FS}
    done
  4. For each automounted directory listed by the grep command, enter 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 users who are using the mounted directory.

  5. Warn users to exit the directory, and kill processes that are using the directory, or wait until all the processes terminate. Enter the following command to kill all the processes using the mounted directory:

    /usr/sbin/fuser -ck local_mount_point
  6. Enter the following command to stop AutoFS:

    /sbin/init.d/autofs stop 
    CAUTION: Do not kill the automountddaemon with thekill command. It does not unmount AutoFS mount-points before it dies.
  7. Enter the following command to start AutoFS with tracing enabled:

    /sbin/init.d/autofs start 

To Stop AutoFS Basic Tracing

To stop AutoFS tracing, kill AutoFS and restart it only after removing -T from AUTOMOUNTD_OPTIONS.

AutoFS Tracing Output

Following is a sample tracing output of the mounting and unmounting of a filesystem.

Mount Event Tracing Output

The general format of a mount event trace is: MOUNT REQUEST: <time stamp>

    <mount information> <other tracing> ... <other tracing>

MOUNT REPLY: <status>=mount statusThe <mount information> trace has the following format (all on one line) :

name=<key>[<subdirectory>] <map>= map name <opts>=mount options <path>=mount path <other tracing>

where:

<key>= the key value from the map

<subdirectory> = subdirectory (may be blank)

<map> = name of map

<opts> = mount options

<path> = mount path

<other tracing> = other trace information

The mount status option in the mount reply contains 0 if the mount is successful; it has non-zero value when the mount is not successful.

The following is an example of a typical mount trace:

May 13 18:45:09 t5        MOUNT REQUEST:   Tue May 13 18:45:09 2003
May 13 18:45:09 t5        name=nfs127[/tmp] map=auto.indirect opts=path=/n2ktmp_8264/nfs127/tmp direct=1
May 13 18:45:09 t5        PUSH /etc/auto.indirect
May 13 18:45:09 t5        POP /etc/auto.indirect
May 13 18:45:09 t5        mapline:           hpnfs127:/         /tmp   hpnfs127:/tmp
May 13 18:45:09 t5        do_mount1:
May 13 18:45:09 t5        (nfs,nfs)     /n2ktmp_8264/nfs127/tmp                hpnfs127:/tmp   penalty=0
May 13 18:45:09 t5        nfsmount: input: hpnfs127[other]
May 13 18:45:09 t5        nfsmount: standard mount on/n2ktmp_8264/nfs127/tmp :
May 13 18:45:09 t5        hpnfs127:/tmpMay 13 18:45:09 t5        nfsmount: v3=1[0],v2=0[0] => v3.
May 13 18:45:09 t5        nfsmount: Get mount version: request vers=3min=3
May 13 18:45:09 t5        nfsmount: mount version=3
May 13 18:45:09 t5        Port numbers are 937, 937May 13 18:45:09 t5        Port match
May 13 18:45:09 t5        mount hpnfs127:/tmp /n2ktmp_8264/nfs127/tmp()
May 13 18:45:09 t5        nfs_args: hpnfs127, , 0x2004060, 0, 0, 0, 0,0, 0, 0, 0,
May 13 18:45:09 t5        args_temp: hpnfs127, , 0x3004060, 0, 0, 0, 0,0, 0, 0, 0, hpnfs127:/tmp
May 13 18:45:09 t5        mount hpnfs127:/tmp dev=44000004 rdev=0 OK
May 13 18:45:09 t5        MOUNT REPLY: status=0, AUTOFS_DONE
Unmount Event Tracing Output

The general format of an unmount event trace is:

UNMOUNT REQUEST:<time stamp>

   <other tracing>

         ...

<other tracing>

UNMOUNT REPLY: <status>=unmount status

The unmount status in the unmount reply contains 0 if the unmount is successful; it has a non-zero value when the unmount is not successful.

The following is an example of a typical unmount trace event:

May 13 18:46:27 t1      UNMOUNT REQUEST: Tue May 13 18:46:27 2003
May 13 18:46:27 t1      dev=44000004 rdev=0 direct
May 13 18:46:27 t1      ping: hpnfs127 request vers=3 min=2
May 13 18:46:27 t1      pingnfs OK: nfs version=3
May 13 18:46:27 t1      nfsunmount: umount /n2ktmp_8264/nfs127/tmp
May 13 18:46:27 t1      Port numbers are 937, 937
May 13 18:46:27 t1      Port match
May 13 18:46:27 t1      nfsunmount: umount /n2ktmp_8264/nfs127/tmp OK
May 13 18:46:27 t1      unmount /n2ktmp_8264/nfs127/tmp OK
May 13 18:46:27 t1      UNMOUNT REPLY: status=0



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