Enhanced AutoFS Administrator’s Guide HP-UX 11i v1 Edition 1 Manufacturing Part Number: 5990-7199 March 2004 United States © Copyright 2004 Hewlett-Packard Development Company, L.P.
Legal Notices The information in this document is subject to change without notice. Hewlett-Packard makes no warranty of any kind with regard to this manual, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. Hewlett-Packard shall not be held liable for errors contained herein or direct, indirect, special, incidental, or consequential damages in connection with the furnishing, performance, or use of this material.
© Copyright 1986 Digital Equipment Corporation © Copyright 1990 Motorola, Inc. © Copyright 1990, 1991, 1992 Cornell University © Copyright 1989-1991 The University of Maryland © Copyright 1988 Carnegie Mellon University Trademark Notices UNIX is a registered trademark in the United States and other countries, licensed exclusively through The Open Group. X Window System is a trademark of the Massachusetts Institute of Technology. OSF/Motif is a trademark of the Open Software Foundation, Inc. in the U.S.
iv
Contents About This Document 1. An Introduction to AutoFS Overview of AutoFS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . How AutoFS Works. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . New Features of AutoFS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Comparing AutoFS with Automounter. . . . . . . . . . . . . . . . . . . . . . . . .
Contents Executable Maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Automounting Multiple Directories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Configuring Multiple Servers for an AutoFS Directory. . . . . . . . . . . . . . . . . . . . . . . . . Modifying or Removing an Automounted Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . Shortcuts for AutoFS Maps . . . . . . . . . . . . . . . . .
Tables Table 1. HP-UX 11i Releases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi Table 2. Publishing History Details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xii Table 3. Document Organization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xii Table 2-1. Old automount Command-Line Options . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Table 3-1. Automount Command-Line Options . . . . .
Tables viii
Figures Figure 1-1. Interaction Among AutoFS Components . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Figure 3-1. Automounted Directories for On-Demand Mounting . . . . . . . . . . . . . . . 22 Figure 3-2. Home Directories Automounted with Wildcards. . . . . . . . . . . . . . . . . . . 28 Figure 3-3. Automounted Directories from the -hosts Map—One Server. . . . . . . . . 31 Figure 3-4. Automounted Directories from the -hosts Map—Two Servers. . . . . . . . 31 Figure 3-5.
Figures x
About This Document This document describes how to install, configure, and troubleshoot the AutoFS product on HP-UX platforms. The latest version of this document is available at http://docs.hp.com. The document printing date and part number indicate the document’s current edition. The printing date will change when a new edition is printed. Minor changes may be made at reprint without changing the printing date. The document part number will change when extensive changes are made.
Publishing History The publishing details of the document for various HP-UX releases are as follows: Table 2 Publishing History Details Document Manufacturing Part Number 5990-7199 Operating Systems Supported 11i version 1 Publication Date March 2004 What Is in This Document This manual describes how to install, configure, and troubleshoot the AutoFS product.
Typographical Conventions This document uses the following conventions: Italics Identifies titles of documents, filenames, and paths. Bold Identifies the strongly emphasized text. monotype Identifies program/script, command names, parameters, or display. HP Welcomes Your Comments HP welcomes your comments and suggestions on this manual. You can send your comments in the following ways: • Internet electronic mail: netinfo_feedback@cup.hp.
xiv
1 An Introduction to AutoFS This chapter provides an overview of the AutoFS product. In addition, it provides information on the new features of AutoFS and the differences between AutoFS and Automounter.
An Introduction to AutoFS This chapters includes the following topics: 2 • “Overview of AutoFS” on page 3 • “New Features of AutoFS” on page 6 • “Comparing AutoFS with Automounter” on page 7 Chapter 1
An Introduction to AutoFS Overview of AutoFS Overview of AutoFS AutoFS is a client-side service that supports automatic mounting and unmounting of file systems. This process is nearly transparent to the user. AutoFS is implemented as a virtual file system (VFS). It supports automounting by instructing the user-space daemon, automountd, to mount and unmount the directories it manages.
An Introduction to AutoFS Overview of AutoFS Figure 1-1 illustrates the interaction among the components of AutoFS. Figure 1-1 Interaction Among AutoFS Components The automount command is invoked at the system startup. It reads the AutoFS master map to create the initial set of AutoFS mount points in the internal mount table, /etc/mnttab. The automounted file systems are not mounted automatically at startup.
An Introduction to AutoFS Overview of AutoFS The automountd daemon is completely independent from the automount command. Because of this separation, it is possible to add, delete, or change the AutoFS map information without having to stop and restart the automountd daemon. After system startup, when the AutoFS mount points are set up, you can modify the set of mount points by modifying AutoFS maps and running the automount command to read them and modify the mount table accordingly.
An Introduction to AutoFS New Features of AutoFS New Features of AutoFS AutoFS has been enhanced to provide the features of the SUN ONC+ version 2.3 AutoFS product. This version of AutoFS is known as Enhanced AutoFS. The new features introduced with Enhanced AutoFS are as follows: 6 • On-demand mounting – In previous versions, AutoFS mounted an entire set of file systems if they were hierarchically related.
An Introduction to AutoFS Comparing AutoFS with Automounter Comparing AutoFS with Automounter Starting with the HP-UX Extension Pack release, August 1998 (for HP-UX 11.0), the new automounting utility, AutoFS, was available. Now, AutoFS has been enhanced to include the features of the SUN ONC+ 2.3 AutoFS. Automounter will become obsolete from the HP-UX release 11i version 2. AutoFS mounts directories automatically when users or processes request access to them.
An Introduction to AutoFS Comparing AutoFS with Automounter 8 Chapter 1
2 Installing Enhanced AutoFS This chapter includes information on how to install, enable, disable, and restart Enhanced AutoFS. In addition, it includes information on how to update from the Automounter configuration to Enhanced AutoFS.
Installing Enhanced AutoFS This chapter includes the following topics: 10 • “Installation and Verification” on page 11 • “Enabling Enhanced AutoFS” on page 13 • “Disabling Enhanced AutoFS” on page 14 • “Restarting Enhanced AutoFS” on page 15 • “Updating from Automounter to Enhanced AutoFS” on page 17 Chapter 2
Installing Enhanced AutoFS Installation and Verification Installation and Verification This section provides information on installing Enhanced AutoFS and verifying the Enhanced AutoFS installation. Installing Enhanced AutoFS To install Enhanced AutoFS on your system, perform the following steps: 1. Download the software depot to a directory, for example, /tmp/EnhancedAuto.depot. 2. Use swinstall to install Enhanced AutoFS; run the following command: swinstall -x autoreboot=true -s /tmp/EnhancedAuto.
Installing Enhanced AutoFS Installation and Verification NOTE After installing Enhanced AutoFS, you can specify the maximum data segment size for an executing process using the maxdsiz kernel variable. The value for this variable should be at least 256 MB. It is necessary to change the value of the maxdsiz kernel variable because automountd requires a larger data segment size in a large map configuration.
Installing Enhanced AutoFS Enabling Enhanced AutoFS Enabling Enhanced AutoFS To enable Enhanced AutoFS, perform the following steps: 1. In the /etc/rc.config.d/nfsconf file, make sure the values for the NFS_CLIENT, AUTOMOUNT, and AUTOFS variables are set to 1; see the following: NFS_CLIENT=1 AUTOMOUNT=1 AUTOFS=1 2. If you want to use a local file as your AutoFS master map, make sure the value for the AUTO_MASTER variable in /etc/rc.config.d/nfsconf is set to the name of your AutoFS master map.
Installing Enhanced AutoFS Disabling Enhanced AutoFS Disabling Enhanced AutoFS To disable Enhanced AutoFS, perform the following steps: 1. To stop AutoFS, issue the following command: /sbin/init.d/nfs.client stop 2. In the /etc/rc.config.d/nfsconf file, make sure the NFS_CLIENT variable is set to 1 and the AUTOFS variable is set to 0; see the following: NFS_CLIENT=1 AUTOFS=0 WARNING Do not kill the automountd daemon with the kill command because the daemon does not terminate gracefully.
Installing Enhanced AutoFS Restarting Enhanced AutoFS 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.
Installing Enhanced AutoFS Restarting Enhanced AutoFS If the ps command indicates that Enhanced AutoFS is still active, make sure all users are out of the automounted directories, and then try again. Do not restart Enhanced AutoFS until all automount processes have terminated. 6. To start Enhanced AutoFS, issue the following command: /sbin/init.d/nfs.
Installing Enhanced AutoFS Updating from Automounter to Enhanced AutoFS Updating from Automounter to Enhanced AutoFS This section includes information on how to update from the Automounter configuration to Enhanced AutoFS. To update from Automounter to Enhanced AutoFS, perform the following steps: 1. In the /etc/rc.config.d/nfsconf file, set the AUTOFS variable to 1. 2. Copy the options specified in the AUTO_OPTIONS variable to the AUTOMOUNT_OPTIONS or AUTOMOUNTD_OPTIONS variable.
Installing Enhanced AutoFS Updating from Automounter to Enhanced AutoFS Table 2-1 Old automount Command-Line Options (Continued) Old automount Option Equivalent AutoFS Command Option Purpose -n Obsolete with AutoFS. Allow automounts of previously mounted target file systems only. -T automountd -T Enable automount tracing. -tl duration automount -t duration Specify time before unmounting idle directories. -tm interval Obsolete with AutoFS. Specify interval between mount attempts.
3 Configuring and Administering AutoFS This chapter includes information on the tasks involved in configuring AutoFS.
Configuring and Administering AutoFS Indirect NFS Automounts” on page 32.
Configuring and Administering AutoFS Using the New Features Using the New Features This section includes information on using the new features introduced with Enhanced AutoFS. On-Demand Mounting In previous versions, AutoFS mounted an entire set of file systems if they were hierarchically related. In contrast, Enhanced AutoFS mounts only those file systems that users access; other file systems that are hierarchically related to these file systems are mounted when they are needed.
Configuring and Administering AutoFS Using the New Features Figure 3-1 shows the automounted file structure after the user’s command is issued.
Configuring and Administering AutoFS Using the New Features # /etc/auto_indirect file # local mount point mount options /test /apps -nosuid -nosuid remote server:directory thyme:/export/project/test basil:/export/apps Considering that you have the preceding AutoFS master and indirect maps on the NFS client, sage, issue the following commands: cd /nfs/desktop ls The output of the last command (ls) is as follows: test apps The ls command displays this output because the test and apps subdirectories are
Configuring and Administering AutoFS Command-Line Options Command-Line Options This section includes information on the command-line options available for Enhanced AutoFS. Automount Command-Line Options Table 3-1 lists the automount command-line options available for Enhanced AutoFS. Table 3-1 Automount Command-Line Options Option 24 Purpose -f master file Specify a local master file for initialization.
Configuring and Administering AutoFS Command-Line Options Automountd Command-Line Options Table 2-6 lists the automountd command-line options available for Enhanced AutoFS. Table 3-2 Automountd Command-Line Options Option Chapter 3 Purpose -D variable = value Assign value to the indicated AutoFS map substitution variable. You cannot use these assignments to substitute variables in the master map. -n Turn off browsing for all AutoFS mount points.
Configuring and Administering AutoFS Automounting Home Directories Automounting Home Directories To automount home directories, you need to perform the following steps: 1. Make sure the machines where users’ home directories are located are set up as NFS servers. In addition, make sure the machines are exporting the home directories. See the “Configuring and Administering an NFS Server” section of NFS Services Administrator’s Guide. 2.
Configuring and Administering AutoFS Automounting Home Directories 6. To force AutoFS to reread the maps, issue the following command on each NFS client that will use these AutoFS maps: /usr/sbin/automount Before you can automount home directories, you must enable AutoFS. See “Enabling Enhanced AutoFS” on page 13. Example of Automounting a User’s Home Directory User Howard’s home directory is located on the NFS server, basil, where it is called /export/home/howard.
Configuring and Administering AutoFS Automounting Home Directories AutoFS mounts /export/home/howard from the basil server to the local mount point /home/howard on the NFS client. Figure 3-2 illustrates this configuration. Figure 3-2 Home Directories Automounted with Wildcards NFS server "basil" / /export /home /home /howard /howard .profile 28 local NFS client / .
Configuring and Administering AutoFS Automounting All Exported Directories Using the -hosts Map Automounting All Exported Directories Using the -hosts Map To automount all exported directories from any host using the -hosts map, perform the following steps: 1.
Configuring and Administering AutoFS Automounting All Exported Directories Using the -hosts Map WARNING Because the -hosts map allows NFS access to any reachable remote system, a user may inadvertently cause an NFS mount over X.25 or SLIP, which is unsupported, or through a slow router or gateway. Mounts over slow links may cause excessive retransmissions and degrade performance for all users.
Configuring and Administering AutoFS Automounting All Exported Directories Using the -hosts Map Figure 3-3 shows the automounted file structure after the user’s command. Figure 3-3 Automounted Directories from the -hosts Map—One Server /net /sage /opt If the thyme server exports the /exports/proj1 directory, and a user types the following command: more /net/thyme/exports/proj1/readme the /thyme subdirectory is created under /net, and /exports/proj1 is mounted under /thyme using on-demand mounting.
Configuring and Administering AutoFS Deciding Between Direct and Indirect NFS Automounts Deciding Between Direct and Indirect NFS Automounts Before you automount a remote directory, decide whether you want to use a direct or an indirect AutoFS map. Table 3-3 lists the advantages and disadvantages of each type of map. An indirect map is better than a direct map because it is easier to modify while AutoFS is running. In addition, it does not cause mount storms in directories with many AutoFS mount points.
Configuring and Administering AutoFS Deciding Between Direct and Indirect NFS Automounts Table 3-3 Direct Versus Indirect AutoFS Map (Continued) Direct Map Indirect Map Disadvantage: If you add or remove mounts in a direct map, or if you change the local mount point for an existing mount in a direct map, you have to force AutoFS to reread its maps. Advantage: If you modify an indirect map, the changes are visible when AutoFS mounts the directory next time.
Configuring and Administering AutoFS Deciding Between Direct and Indirect NFS Automounts Figure 3-5 shows the difference between direct mounts and indirect mounts on an NFS client.
Configuring and Administering AutoFS Mounting a Remote Directory Mounting a Remote Directory This section provides detailed information on how to mount a remote directory using both the direct and indirect AutoFS maps. Using a Direct AutoFS Map To mount a remote directory using a direct AutoFS map, perform the following steps: 1. If you are using local files for your AutoFS maps, use an editor to open or create a direct map in the /etc directory. The direct map is commonly called /etc/auto_direct.
Configuring and Administering AutoFS Mounting a Remote Directory /usr/sbin/automount The local directory that you configure as the mount point should be empty or non-existent. AutoFS creates the non-existent directories between the root directory and the configured mount point. If the local directory that you configured as the mount point is not empty, the local files or directories in it are hidden and inaccessible while the automounted file system is mounted over it.
Configuring and Administering AutoFS Mounting a Remote Directory Before you can mount a remote directory on your system, ensure that you configure the remote system where the directory is located as an NFS server. In addition, ensure that you export the directory. You must enable AutoFS before any directory is automounted. Automounted directories stay mounted until they are idle for 10 minutes.
Configuring and Administering AutoFS Mounting a Remote Directory The following example contains sample lines from the AutoFS master map on the NFS client, sage. # /etc/auto_master file # local mount point map name /- /etc/auto_direct mount options Figure 3-6 illustrates how AutoFS sets up the direct mounts for this configuration.
Configuring and Administering AutoFS Mounting a Remote Directory For CIFS file system mount entries in AutoFS indirect map files, you must set the mount option for the fstype file system type to cifs.The remote server must be a CIFS server, and the remote directory must be a CIFS share. If you are using NIS to manage your AutoFS maps, add the line to an indirect map on the NIS master server. See the "Configuring and Administering NIS" chapter of NFS Services Administrator’s Guide. 2.
Configuring and Administering AutoFS Mounting a Remote Directory WARNING The local_subdirectory and local_parent_directory must not be symbolic links. If you are using NIS to manage your AutoFS maps, make sure the local mount point is different from the exported directory on the server. If they are same, the server may attempt to mount its exported directory over itself, and the directory will become unavailable.
Configuring and Administering AutoFS Mounting a Remote Directory Automounted directories stay mounted until they are idle for ten minutes. You can change the ten-minute default time by adding the -t duration option to the AUTOMOUNT_OPTIONS variable in the /etc/rc.config.d/nfsconf file or by running the automount command with the -t option from the command line. You must enable AutoFS before any directory is automounted. See “Enabling Enhanced AutoFS” on page 13.
Configuring and Administering AutoFS Mounting a Remote Directory The following example contains sample lines from the AutoFS master map on the NFS client, sage. The master map also includes an entry for the direct map, /etc/auto_direct. # /etc/auto_master file # local mount point //nfs/desktop map name mount options /etc/auto_direct /etc/auto_desktop Figure 3-7 illustrates how AutoFS sets up the indirect mounts for this configuration.
Configuring and Administering AutoFS Executable Maps Executable Maps An executable map has its entries generated dynamically by a program or a script. AutoFS determines whether a map is executable by checking whether the execute bit is set in its permissions string. If a map is not executable, make sure its execute bit is not set.
Configuring and Administering AutoFS Automounting Multiple Directories Automounting Multiple Directories AutoFS enables you to automount multiple directories simultaneously (hierarchical mounts). Use an editor to create an entry with the following format in a direct or indirect AutoFS map: local_dir /local_subdirectory [-options] \ server:remote_directory \ /local_subdirectory [-options] server:remote_directory \ .. (Create the map, if necessary, and add it to the AutoFS master map.
Configuring and Administering AutoFS Configuring Multiple Servers for an AutoFS Directory Configuring Multiple Servers for an AutoFS Directory To configure multiple (replicated) servers for an AutoFS directory, perform the following steps: 1. Follow the instructions mentioned in “Using a Direct AutoFS Map” on page 35 or “Using an Indirect AutoFS Map” on page 38. 2. In the direct or indirect map, modify the line that mounts the remote directory so that multiple servers are listed.
Configuring and Administering AutoFS Configuring Multiple Servers for an AutoFS Directory 3. AutoFS needs the /etc/netmasks file to determine the local client’s subnets in the replicated servers environment. You must manually create and configure the /etc/netmasks file for the replicated servers functionality to work properly. The /etc/netmasks file contains Internet Protocol (IP) address masks with IP network numbers.
Configuring and Administering AutoFS Configuring Multiple Servers for an AutoFS Directory The server chosen for the mount is the one with the strongest preference based on a sorting order. The sorting order used gives strongest preference to servers on the same local subnet; servers on the local net are given the second strongest preference. Therefore, if you configure multiple servers on both sides of a gateway, a server on the same side of the gateway as the NFS client is always used.
Configuring and Administering AutoFS Modifying or Removing an Automounted Directory Modifying or Removing an Automounted Directory If you are planning to remove an automounted directory, 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.
Configuring and Administering AutoFS Shortcuts for AutoFS Maps Shortcuts for AutoFS Maps This section includes information on the elements that you can use as shortcuts in AutoFS maps. You can use environment variables and wildcard characters as shortcuts in AutoFS maps. Environment Variables You can use an environment variable anywhere in a direct or indirect AutoFS map, except the first field, which specifies the local mount point.
Configuring and Administering AutoFS Shortcuts for AutoFS Maps Wildcard Characters You can use asterisk (*) in an indirect map as a wildcard character to represent the local subdirectory when you want the local subdirectory to be the same as the remote system name or the remote subdirectory. You can use ampersand (&) in a direct or indirect map as the remote system name or the remote subdirectory. Whatever is in the local directory name field replaces the ampersand character.
Configuring and Administering AutoFS Shortcuts for AutoFS Maps You can use the ampersand character to represent both the remote server and the remote subdirectory in the same line of the indirect map.
Configuring and Administering AutoFS Including an AutoFS Map in Another AutoFS Map Including an AutoFS Map in Another AutoFS Map To include the contents of an AutoFS map in another AutoFS map, add a plus sign (+) before the map name; see the following example: # /etc/auto_home file # local mount point mount options remote server:directory basil -nosuid +auto_home basil:/export/home/basil Assume that the /etc/auto_home map is listed in the master map with the following line: /home /etc/auto_home This ex
Configuring and Administering AutoFS Creating a Hierarchy of AutoFS Maps Creating a Hierarchy of AutoFS Maps An organization made up of many departments may want to organize a shared automounted directory structure. In the following example, the shared top-level directory is called /org. The /org directory contains several subdirectories, listed in the auto_org AutoFS map. Each department administers its own AutoFS map for its subdirectory. The AutoFS master map needs only a single entry for /org.
Configuring and Administering AutoFS Creating a Hierarchy of AutoFS Maps Hierarchical AutoFS maps provide a framework within which large shared file systems can be organized. Together with NIS, which allows you to share information across administrative domains, the maintenance of the shared namespace can be effectively decentralized.
Configuring and Administering AutoFS Turning Off an AutoFS Map Turning Off an AutoFS Map To turn off an AutoFS map using the -null map, perform the following steps: 1. Add a line with the following syntax to the AutoFS master map: local_directory -null 2. If AutoFS is running, and you want to force it to reread its maps, issue the following command on each client that will use the map: /usr/sbin/automount The -null option turns off the map that is mounted on local_directory.
Configuring and Administering AutoFS Support for HP CIFS Client Support for HP CIFS Client To enable the automatic mounting and unmounting of CIFS file systems, Enhanced AutoFS supports integration with HP CIFS Client. To enable this feature, you must install and configure HP CIFS Client on the system along with Enhanced AutoFS. For more information on the CIFS Client installation and configuration, see HP CIFS Client Administrator’s Guide.
Configuring and Administering AutoFS Support for HP CIFS Client Example File Entries for CIFS Direct Map Automounts The following example includes sample lines from an AutoFS direct map on the CIFS client, mammoth. The sharp sign (#) indicates a comment line.
Configuring and Administering AutoFS Support for HP CIFS Client Example File Entries for CIFS Indirect Map Automounts The following example includes sample lines from an AutoFS indirect map on the CIFS client, mammoth. The sharp sign (#) indicates a comment.
Configuring and Administering AutoFS Support for HP CIFS Client Figure 3-9 illustrates how AutoFS sets up the indirect mounts for this configuration.
Configuring and Administering AutoFS Verifying the AutoFS Configuration Verifying the AutoFS Configuration To verify that AutoFS has been configured correctly, perform the following steps: 1. To change the current working directory to an automounted directory, issue the following command: /usr/bin/cd local_directory In the preceding command, local_directory is the configured mount point in the AutoFS map. 2.
Configuring and Administering AutoFS Verifying the AutoFS Configuration The ls command displays this output because the draw and write subdirectories are the potential mount points (browsability), but not mounted currently. However, if you issue the following commands, both the draw and write subdirectories are mounted (on-demand mounting): cd /nfs/desktop/write cd /nfs/desktop/draw If AutoFS does not mount your configured directories, see “Troubleshooting AutoFS” on page 63.
Configuring and Administering AutoFS Verifying the AutoFS Configuration 62 Chapter 3
4 Troubleshooting AutoFS This chapter describes the tools and procedures for troubleshooting AutoFS.
Troubleshooting AutoFS This chapter includes the following sections: 64 • “AutoFS Logging” on page 65 • “AutoFS Tracing” on page 67 Chapter 4
Troubleshooting AutoFS AutoFS Logging AutoFS Logging AutoFS logs messages through /usr/sbin/syslogd. By default, syslogd writes messages to the /var/adm/syslog/syslog.log file. For more information, see the syslogd (1M) man page. Starting AutoFS Logging To start AutoFS logging, perform the following steps: 1. Log on as root to the NFS client. 2.
Troubleshooting AutoFS AutoFS Logging 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. 6. Add -v to the AUTOMOUNTD_OPTIONS variable in the /etc/rc.config.d/nfsconf file, as shown in the following example: AUTOMOUNTD_OPTIONS = “-v” This change enables AutoFS logging. 7.
Troubleshooting AutoFS AutoFS Tracing AutoFS Tracing Two levels of AutoFS tracing are available: Detailed (level 3) Includes traces of all 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 AutoFS requests and replies. You must restart AutoFS to start level 1 tracing. Starting AutoFS Detailed Tracing To start detailed (level 3) tracing, perform the following steps: 1.
Troubleshooting AutoFS AutoFS Tracing 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.
Troubleshooting AutoFS AutoFS Tracing Stopping AutoFS Basic Tracing To stop basic tracing, kill AutoFS and restart it (as described in the preceding section) by removing -T from the AUTOMOUNTD_OPTIONS variable. AutoFS Tracing Output The most interesting events to users are the tracing output when mounting and unmounting of file systems occur. Mount Event Tracing Output The general format of a mount event trace is as follows: MOUNT REQUEST:
Troubleshooting AutoFS AutoFS Tracing May 13 18:45:09 t5 May 13 18:45:09 t5 _8264/nfs127/tmp direct=1 May 13 18:45:09 t5 May 13 18:45:09 t5 May 13 18:45:09 t5 mp May 13 18:45:09 t5 May 13 18:45:09 t5 penalty=0 May 13 18:45:09 t5 May 13 18:45:09 t5 May 13 18:45:09 t5 May 13 18:45:09 t5 May 13 18:45:09 t5 May 13 18:45:09 t5 May 13 18:45:09 t5 May 13 18:45:09 t5 May 13 18:45:09 t5 May 13 18:45:09 t5 0, May 13 18:45:09 t5 0, hpnfs127:/tmp May 13 18:45:09 t5 May 13 18:45:09 t5 MOUNT REQUEST: Tue May 13 18:45:09
Troubleshooting AutoFS AutoFS Tracing May May May May May May 13 13 13 13 13 13 18:46:27 18:46:27 18:46:27 18:46:27 18:46:27 18:46:27 Chapter 4 t1 t1 t1 t1 t1 t1 nfsunmount: umount /n2ktmp_8264/nfs127/tmp Port numbers are 937, 937 Port match nfsunmount: umount /n2ktmp_8264/nfs127/tmp OK unmount /n2ktmp_8264/nfs127/tmp OK UNMOUNT REPLY: status=0 71
Troubleshooting AutoFS AutoFS Tracing 72 Chapter 4
Index Symbols & (ampersand) AutoFS maps, 50 * (asterisk) AutoFS maps, 50 + (plus sign) AutoFS maps, 52 A ampersand (&) AutoFS maps, 50 asterisk (*) AutoFS maps, 50 auto_direct map, 36 auto_master map, 29, 35, 39 AUTO_MASTER variable, 13 AutoFS components, 3 direct vs.
Index environment variables, 49 examples, 41, 58 modifying, 41 wildcard characters, 26, 50 installing Enhanced AutoFS, 11 L logging AutoFS, 65, 66 ls AutoFS, 60 M master map, 35, 39 mount options changing, 37, 41, 57 nosuid, 29 mounting directories with AutoFS, 36, 39 multiple mounts, AutoFS, 45 multiple servers, for automounted directories, 45 N Name Service Switch, 30, 36, 40, 52 /net directory, 29 NFS starting, 13 nfs.