How to enable/disable automount debugging in Solaris
The golden rule if you are having problems with an automounted directory, is you should always try and mount the remote file system by hand, to verify that the problem is related to automounter, and not NFS in general.
If you cannot manually mount the remote partition then the issue is not automount related related. But If the mount works then the problem is with automounter.
The Solaris automounter has a built-in debugging facility, which can be used to examine exactly what it is doing. Simply, kill automount and restart it with the debug flags, so that you can see everything from the start. I have outlined the steps necessary for enabling and disabling automount debugging for both Solaris 10 and 11 systems.
Solaris 10
To enable automount debug on Solaris 10, we simply uncomment the following lines in the /etc/default/autofsfile:
# Verbose mode. Notifies of autofs mounts, unmounts, or other # non-essential events. This equivalent to the “-v” argument. AUTOMOUNT_VERBOSE=TRUE # Verbose. Log status messagess to the console. # This is equivalent to the “-v” argument. AUTOMOUNTD_VERBOSE=TRUE # Trace. Expand each RPC call and display it on standard output. # This is equivalent to the “-T” argument. AUTOMOUNTD_TRACE=3
To disable automount debugging, revert /etc/default/autofs
entries back to default to shut off logging:
#AUTOMOUNT_VERBOSE=FALSE #AUTOMOUNTD_VERBOSE=FALSE #AUTOMOUNTD_TRACE=0
Solaris 11
To enable automount debugging in Solaris 11, alter the autofs debugging properties with sharectl
and restart the autofs service:
# sharectl get autofs timeout=600 automount_verbose=false automountd_verbose=false nobrowse=false trace=0 environment= # sharectl set -p automount_verbose=true autofs # sharectl set -p automountd_verbose=true autofs # sharectl set -p trace=3 autofs # svcadm restart autofs
Under Solaris 11 you can review the autofs log as follows:
# tail -f /var/svc/log/system-filesystem-autofs:default.log
You can now
To disable debugging in Solaris 11, simply restore the original values to the autofs debug properties and restart the autofs service:
# sharectl set -p automount_verbose=false autofs # sharectl set -p automount_verbose=false autofs # sharectl set -p automountd_verbose=false autofs # sharectl set -p trace=0 autofs # svcadm restart autofs