HP Serviceguard Toolkit for NFS on Linux User Guide Version A.03.03.10 Abstract This guide describes instructions to start, stop, and monitor a Network File System in a Serviceguard cluster environment.
© Copyright 2013 Hewlett-Packard Development Company, L.P. Confidential computer software. Valid license from HP required for possession, use or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor's standard commercial license. The information contained herein is subject to change without notice.
Contents 1 Overview..................................................................................................4 Advantages.............................................................................................................................4 Dependencies..........................................................................................................................4 Prerequisites...........................................................................................................
1 Overview The HP Serviceguard Toolkit for NFS on Linux allows you to start, stop, and monitor a Network File System in a Serviceguard cluster environment. This toolkit consists of a set of shell scripts used by the toolkit framework to start, stop, and monitor NFS daemons. The toolkit simplifies making NFS exports highly available by integrating NFS with Serviceguard for Linux (SG/LX). The latest version of the HP Serviceguard Toolkit for NFS on Linux is available for free download at: http://software.hp.
• ◦ system-config-nfs-x.y.z-a.b..arch.rpm ◦ procmail-a.b-x.y..arch.rpm The following RPMs must be available for the NFS toolkit to function properly in the SLES11 environment. The version of these RPMs must be the latest supported version from the SLES11 OS. ◦ yast2-nfs-common-a.b.c-x.y.z..rpm ◦ nfs-kernel-server-a.b.c-x.y.z..rpm ◦ yast2-nfs-server-x.y.z-a.b.c..rpm ◦ quota-nfs-a.b-x.y.z..rpm ◦ limal-nfs-server-a.b.c-x.y.z..
2 Supported configuration This section explains the supported configurations for NFS toolkit packages. The following are the supported configurations: • Failover of an NFS toolkit package from an NFS server node to an alternative node in a cluster. • Configuring two NFS toolkit packages using NFSv4 protocol. • Coexistence of NFS toolkit package configured to use NFSv3 and NFSv4 package on the same node.
Configuring two NFS toolkit packages using NFSv4 protocol Figure 2 Configuring two NFSv4 toolkit packages Figure 2 (page 7) shows a scenario where two NFS toolkit packages are using NFSv4 protocol. This configuration supports two NFSv4 packages. In this configuration, Node_A is the primary node for NFS server packages, Pkg1_v4 and NFS server package Pkg2_v4, which is configured to use NFSv4 protocol.
Coexistence of NFS toolkit packages configured to use NFSv3 and NFSv4 protocols on the same node Figure 3 Coexistence of NFS package configured to use NFSv3 and NFSv4 protocols on the same node Figure 3 (page 8) illustrates a co-existence scenario where NFS toolkit packages are configured to use NFSv3 and NFSv4 protocols on the same node.
3 Installing and uninstalling HP Serviceguard toolkit for NFS Perform the following steps to install or upgrade the NFS toolkit. This RPM must be installed on all the nodes of the cluster that are configured to run the NFS toolkit package. • For a fresh installation of the toolkit, run the following command: rpm -ivh serviceguard--toolkit-..noarch.rpm For example: rpm -ivh serviceguard-nfs-toolkit-A.03.03.10.sles11.noarch.
Table 2 Files for creating modular packages File Name Description Available in Directory nfs.1 This is the attribute definition file used $SGCONF/modules/tkit/nfs to generate the package ASCII template in modular style of packaging. tkit_module.sh This is the toolkit module script called $SGCONF/scripts/tkit/nfs by the master control script, and acts as an interface between the master control script and the toolkit interface script (toolkit.sh).
4 Using HP Serviceguard toolkit for NFS After installing the HP Serviceguard Toolkit for NFS on Linux, you can use this toolkit to: • Deploy NFS as a toolkit package in a Serviceguard environment on Linux. • Manage the NFS toolkit packages. Deploying NFS toolkit packages You can deploy NFS toolkit packages using either legacy or modular style of packaging. NOTE: • HP recommends that you configure HP Serviceguard toolkit for NFS as modular packages.
d. Attribute Example HALT_SCRIPT $SGCONF/NFS/pkg.cntl HALT_SCRIPT_TIMEOUT NO_TIMEOUT To run the NFS monitor script, set the SERVICE_NAME variable in the pkg.conf file. For example: SERVICE_NAME nfs1.monitor Each package must have a unique service name. If you set AUTO_RUN to YES in the package configuration file, the package switches to the next adoptive node in the event of a node or package failure. The NFS monitor script causes the package to fail over if any of the monitored NFS services fail.
g. Add the startup command under the function customer_defined_run_cmds: function customer_defined_run_cmds { # ADD customer defined start command $SGCONF/NFS/toolkit.sh start test_return 51 } h. Add package stop command under customer_defined_halt_cmds: function customer_defined_halt_cmds { # ADD customer defined halt command $SGCONF/NFS/toolkit.sh stop test_return 52 } i.
NOTE: b. • HP recommends that you specify the fsid for the directory on the file system that must be exported. This ensures that permanent device minor number is retained during the failover to the adoptive node. • Do not configure these exported directories in the /etc/exports file. When an NFS server boots up, it attempts to export all file systems in its /etc/exports file. If those file systems are not currently present on the NFS server node, the node does not boot properly.
Table 3 Modular NFS Package Attributes Description package_name This attribute refers to the package name in the cluster. The package name must be unique in the cluster. package_type This attribute refers to the type of the package. The value of this attribute must be "failover" package. node_name This attribute refers to the name of the cluster node on which the package runs. script_log_file This attribute refers to the absolute package log file name.
Table 3 Modular NFS Package (continued) Attributes Description NOTE: HP recommends that you specify the fsid for the directory on the file system that must be exported. This ensures that permanent device minor number is retained during the failover to the adoptive node. QUOTA_MON This parameter specifies whether the rpc.rquotad daemon needs to be started and monitored. If this parameter is set to YES, the toolkit starts rpc.rquotad (if not already running) and monitors the daemon.
Table 3 Modular NFS Package (continued) Attributes Description /export/v4recovery is a directory residing in a disk volume associated with this NFS package. NOTE: The status monitor directory /var/lib/nfs/ statd/sm is applicable for NFSv3 and /var/lib/ nfs/v4recovery is applicable for NFSv4 protocol. 5. NFS_FLM_MONITOR This variable indicates whether the file lock migration script, nfs.flm must be monitored by the monitoring script.
• Starts NFS service processes (including nfs.mon). • Starts NFS file lock migration process if the lock migration feature is enabled. To start the package, use either of the following commands: • # cmrunpkg • # cmrunpkg -n Stopping the package The Serviceguard package manager invokes the NFS toolkit script with stop as an input paramenter. This in turn does the following: • Unexports directory on the file system.
NOTE: The cluster verification for the NFS toolkit is supported on Serviceguard version A.11.20.20 and later. You can use either the cmcheckconf –v or cmcheckconf –P commands to initiate the cluster verification. Run the cmcheckconf –v command to perform cluster wide verification of resources. This command also verifies the packages that are presently deployed in the system. Run the cmcheckconf -v 2 command to display the ERROR, WARNING, or INFO messages during the package verification.
• Verify the presence of the NFS binaries that are required to start the following daemons for specific OS distribution: ◦ rpcbind ◦ rpc.statd ◦ rpc.mountd ◦ rpc.nfsd ◦ portmap ◦ rpc.idmapd if NFSv4 is used If the verification fails for the respective commands, the console displays the following error message: Error: does not exist. Solution: Install all the binaries specific to distributions, which provides the binaries required for the NFS server daemons to start.
NOTE: If you modify the unsupported attribute values, then appropriate error message is displayed when you run the execution of cmcheckconf -P command. • Use cmapplyconf command to add the new changes in the package configuration to the Serviceguard cluster environment. For example: #cmapplyconf –P <>. NOTE: Information related to package reconfiguration will be logged in the package log.
Rolling Upgrade Toolkit package nodes in a cluster can be upgraded with the new toolkit, on one node at a time as follows: 1. Backup the package directory and package control scripts if any. 2. Move the running NFS toolkit packages off the node being upgraded to another package node. 3. Upgrade the NFS toolkit using the following command: rpm -Uvh --noscripts serviceguard-nfs-toolkit..noarch.rpm 4.
5 File lock migration HP Serviceguard Toolkit for NFS on Linux provides file lock migration feature for the NFS directories that are exported to the client. You must provide a unique holding directory as part of the NFS package located on a shared file system. This implies that an empty directory is created on a shared filesystem that moves between servers as part of the package failover. The NFS_FLM_HOLDING_DIR parameter in the hanfs.
6 Troubleshooting This section explains some of the problem scenarios that you might encounter while working with the HP Serviceguard Toolkit for NFS on Linux in a Serviceguard cluster. Problem scenario Possible cause Recommended action The package log contains the following message: The parameter LOCK_MIGRATION is not set. NFS client locks will not be migrated. Lock migration feature is not enabled for the NFS package.
Problem scenario Possible cause Recommended action up any rpc.idmapd process. The /var/log/syslog log file indicates /var/lib/nfs/rpc_pipefs directory is not found. to start. When all the required NFS command rpc.idmapd as root. For RPM's are installed on the system, this example: #rpc.idmapd directory must be created. If for some reason this directory is not created, the rpc.idmapd does not start.
7 Support and other resources Information to collect before contacting HP Ensure that the following information is available before you contact HP: • Software product name • Hardware product model number • Operating system type and version • Applicable error message • Third-party hardware or software • Technical support registration number (if applicable) How to contact HP Use the following methods to contact HP technical support: • In the United States, see the Customer Service / Contact HP Un
Ctrl+x or Ctrl-x A key sequence that indicates you must hold down the keyboard key labeled Ctrl while you press the letter x. ENVIRONMENT VARIABLE The name of an environment variable, for example, PATH. Key The name of a keyboard key. Return and Enter both refer to the same key. Term A term or phrase that is defined in the body text of the document, not in a glossary. User input Indicates commands and text that you type exactly as shown.
A Sample configuration file for legacy style of packaging Sample package configuration file: pkg.conf PACKAGE_NAME PACKAGE_TYPE NODE_NAME NODE_NAME AUTO_RUN NODE_FAIL_FAST_ENABLED RUN_SCRIPT HALT_SCRIPT RUN_SCRIPT_TIMEOUT HALT_SCRIPT_TIMEOUT SUCCESSOR_HALT_TIMEOUT SCRIPT_LOG_FILE FAILOVER_POLICY FAILBACK_POLICY PRIORITY MONITORED_SUBNET MONITORED_SUBNET_ACCESS SERVICE_NAME SERVICE_FAIL_FAST_ENABLED SERVICE_HALT_TIMEOUT nfs_legacy FAILOVER mgr-kit1 mgr-kit2 YES NO $SGCONF/nfs_legacy/pkg.
B Sample configuration file for modular style of packaging package_name package_description package_type node_name auto_run node_fail_fast_enabled run_script_timeout halt_script_timeout successor_halt_timeout script_log_file failover_policy failback_policy tkit/nfs/nfs/TKIT_DIR tkit/nfs/nfs/XFS tkit/nfs/nfs/QUOTA_MON tkit/nfs/nfs/LOCK_MIGRATION tkit/nfs/nfs/NFS_FLM_HOLDING_DIR tkit/nfs/nfs/PROPAGATE_INTERVAL tkit/nfs/nfs/NFS_FLM_MONITOR tkit/nfs/nfs/NFS_FLM_RESTART tkit/nfs/nfs/MAINTENANCE_FLAG tkit/nfs/nfs
Glossary $SGCONF /usr/local/cmcluster/conf for RHEL. /opt/cmcluster/conf for SLES11. $SGROOT /usr/local/cmcluster for RHEL. /opt/cmcluster for SLES11. ADF Attribute definition file. ASCII American Standard Code for Information Interchange. NFS Network File System. NFSv4 way of exporting The directory on the file system is bounded with the virtual route directory and it will be exported. Package A grouping of application services (individual Linux processes) under Serviceguard .
Index C Cluster verification of NFS Toolkit, 18 D Deploying NFS toolkit packages, 11 Configuring a legacy NFS package, 11 Configuring a modular NFS package, 14 F File lock migration, 23 I Installation uninstallation, 9 M Managing the NFS toolkit package, 17 Maintaining the package, 18 Mounting NFS shares at client node, 21 Starting the package, 17 Stopping the package, 18 N NFS Toolkit Advantages, 4 Dependecies, 4 Overview, 4 Prerequisites, 4 NFS toolkit troubleshooting, 24 NFS toolkit after Installati