B5140-90030.book Page 1 Thursday, August 24, 2006 9:32 AM Serviceguard NFS Toolkit A.11.11.06 and A.11.23.05 Administrator’s Guide HP-UX 11i v1 and v2 Edition 9 Manufacturing Part Number: B5140-90030 E1006 United States © Copyright 2001-2006 Hewlett-Packard Development Company, L. P.
B5140-90030.book Page 2 Thursday, August 24, 2006 9:32 AM 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.
B5140-90030.book Page 3 Thursday, August 24, 2006 9:32 AM Contents 1. Overview of Serviceguard NFS Limitations of Serviceguard NFS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Overview of the NFS File Lock Migration Feature . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Overview of Serviceguard NFS with Serviceguard A.11.17 Support . . . . . . . . . . . . . . 13 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
B5140-90030.book Page 4 Thursday, August 24, 2006 9:32 AM Contents NFS Control Scripts for pkg02. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Package Configuration File for pkg03 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . NFS Control Scripts for pkg03. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Example Two - One Adoptive Node for Two Packages with File Lock Migration . . . .
B5140-90030.book Page 5 Thursday, August 24, 2006 9:32 AM Figures Figure 1-1. Simple Failover to an Idle NFS Server . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 1-2. Failover from One Active NFS Server to Another. . . . . . . . . . . . . . . . . . Figure 1-3. A Host Configured as Adoptive Node for Multiple Packages . . . . . . . . . Figure 1-4. Cascading Failover with Three Adoptive Nodes . . . . . . . . . . . . . . . . . . . Figure 1-5. Server-to-Server Cross Mounting. . . . . . . . . . . .
B5140-90030.
B5140-90030.
B5140-90030.book Page 8 Thursday, August 24, 2006 9:32 AM Overview of Serviceguard NFS Serviceguard NFS is a tool kit that enables you to use Serviceguard to set up highly available NFS servers. You must set up a Serviceguard cluster before you can set up Highly Available NFS. For instructions on setting up a Serviceguard cluster, see the Managing Serviceguard manual. Serviceguard NFS is a separately purchased set of configuration files and control scripts, which you customize for your specific needs.
B5140-90030.book Page 9 Thursday, August 24, 2006 9:32 AM Overview of Serviceguard NFS Limitations of Serviceguard NFS Limitations of Serviceguard NFS The following limitations apply to Serviceguard NFS: • Applications lose their file locks when an NFS server package moves to a new node. Therefore, any application that uses file locking must reclaim its locks after an NFS server package fails over. An application that loses its file lock due to an NFS package failover does not receive any notification.
B5140-90030.book Page 10 Thursday, August 24, 2006 9:32 AM Overview of Serviceguard NFS Limitations of Serviceguard NFS NOTE 10 You cannot use Serviceguard NFS for an NFS diskless cluster server.
B5140-90030.book Page 11 Thursday, August 24, 2006 9:32 AM Overview of Serviceguard NFS Overview of the NFS File Lock Migration Feature Overview of the NFS File Lock Migration Feature Serviceguard NFS introduced the “File Look Migration” feature beginning with versions A.11.11.03 and A.11.23.02. The detailed information on this feature is as follows: • Each HA/NFS package designates a unique holding directory located in one of the filesystems associated with the package.
B5140-90030.book Page 12 Thursday, August 24, 2006 9:32 AM Overview of Serviceguard NFS Overview of the NFS File Lock Migration Feature NOTE • Any client that holds NFS file locks against files residing in the HA/NFS package (transitioned between servers) sends reclaim requests to the adoptive node (where the exported filesystems currently reside) and reclaims its locks. • After rpc.
B5140-90030.book Page 13 Thursday, August 24, 2006 9:32 AM Overview of Serviceguard NFS Overview of Serviceguard NFS with Serviceguard A.11.17 Support Overview of Serviceguard NFS with Serviceguard A.11.17 Support Serviceguard NFS Toolkit A.11.23.05 can work with Serviceguard A.11.17. Serviceguard A.11.17 supports Veritas Cluster File System (CFS) which allows a file system to be created that can be mounted by all nodes in a cluster environment.
B5140-90030.book Page 14 Thursday, August 24, 2006 9:32 AM Overview of Serviceguard NFS Overview of Serviceguard NFS with Serviceguard A.11.17 Support Limitations The following is a list of limitations when using Serviceguard NFS Toolkit A.11.23.05 with Serviceguard A.11.17: • Serviceguard A.11.17 introduces a new MULTI_NODE package type which is not supported by Serviceguard NFS Toolkit. The only supported package type is FAILOVER. • Serviceguard A.11.
B5140-90030.book Page 15 Thursday, August 24, 2006 9:32 AM Overview of Serviceguard NFS Supported Configurations Supported Configurations Serviceguard NFS supports the following configurations: • Simple failover from an active NFS server node to an idle NFS server node. • Failover from one active NFS server node to another active NFS server node, where the adoptive node supports more than one NFS package after the failover. • A host configured as an adoptive node for more than one NFS package.
B5140-90030.book Page 16 Thursday, August 24, 2006 9:32 AM Overview of Serviceguard NFS Supported Configurations Simple Failover to an Idle NFS Server Figure 1-1 shows a simple failover from an active NFS server node to an idle NFS server node. Figure 1-1 Simple Failover to an Idle NFS Server Before Failover: Node_A Node_B Pkg_1 disks After Failover: Node_A Node_B Pkg_1 disks Node_A is the primary node for NFS server package Pkg_1. When Node_A fails, Node_B adopts Pkg_1.
B5140-90030.book Page 17 Thursday, August 24, 2006 9:32 AM Overview of Serviceguard NFS Supported Configurations Failover from One Active NFS Server to Another Figure 1-2 shows a failover from one active NFS server node to another active NFS server node.
B5140-90030.book Page 18 Thursday, August 24, 2006 9:32 AM Overview of Serviceguard NFS Supported Configurations A Host Configured as Adoptive Node for Multiple Packages Figure 1-3 shows a three-node configuration where one node is the adoptive node for packages on both of the other nodes. If either Node_A or Node_C fails, Node_B adopts the NFS server package from that node.
B5140-90030.book Page 19 Thursday, August 24, 2006 9:32 AM Overview of Serviceguard NFS Supported Configurations Cascading Failover with Three Adoptive Nodes A package may be configured with up to three adoptive nodes. Figure 1-4 shows this configuration. If Node_A fails, Pkg_1 is adopted by Node_B. However, if Node_B is down, Pkg_1 is adopted by Node_C, and if Node_C is down, Pkg_1 is adopted by Node_D. The adoptive nodes are listed in the package configuration file, /etc/cmcluster/nfs/nfs.
B5140-90030.book Page 20 Thursday, August 24, 2006 9:32 AM Overview of Serviceguard NFS Supported Configurations Server-to-Server Cross Mounting Two NFS server nodes may NFS-mount each other’s file systems and still act as adoptive nodes for each other’s NFS server packages. Figure 1-5 illustrates this configuration.
B5140-90030.book Page 21 Thursday, August 24, 2006 9:32 AM Overview of Serviceguard NFS Supported Configurations The advantage of server-to-server cross-mounting is that every server has an identical view of the file systems. The disadvantage is that, on the node where a file system is locally mounted, the file system is accessed through an NFS mount, which has poorer performance than a local mount. Each node NFS-mounts the file systems for both packages.
B5140-90030.book Page 22 Thursday, August 24, 2006 9:32 AM Overview of Serviceguard NFS How the Control and Monitor Scripts Work How the Control and Monitor Scripts Work As with all Serviceguard packages, the control script starts and stops the NFS package and determines how the package operates when it is available on a particular node. The 11i v1 and 11i v2 control script (hanfs.
B5140-90030.book Page 23 Thursday, August 24, 2006 9:32 AM Overview of Serviceguard NFS How the Control and Monitor Scripts Work • Halts the rpc.statd and rpc.lockd daemons to release file locks so that file systems can be unmounted. If the server is also an NFS client, it loses the NFS file locks obtained by client-side processes when these daemons are killed. • Restarts the rpc.statd and rpc.lockd daemons so that these daemons can manage file locks for other NFS packages running on the server.
B5140-90030.book Page 24 Thursday, August 24, 2006 9:32 AM Overview of Serviceguard NFS How the Control and Monitor Scripts Work Monitoring the NFS Services The monitor script /etc/cmcluster/nfs/nfs.mon works by periodically checking the status of NFS services using the rpcinfo command. If any service fails to respond, the script exits, causing a switch to an adoptive node. The monitor script provides the ability to monitor the rpc.statd, rpc.lockd, nfsd, rpc.mountd, rpc.pcnfsd, and nfs.flm processes.
B5140-90030.book Page 25 Thursday, August 24, 2006 9:32 AM Overview of Serviceguard NFS How the Control and Monitor Scripts Work AUTO_RUN YES and LOCAL_LAN_FAILOVER YES (the defaults), the package switches to the next adoptive node or to a standby network interface in the event of a node or network failure. However, if one of the NFS services goes down while the node and network remain up, you need the NFS monitor script to detect the problem and to switch the package to an adoptive node.
B5140-90030.
B5140-90030.
B5140-90030.book Page 28 Thursday, August 24, 2006 9:32 AM Installing and Configuring Serviceguard NFS This chapter explains how to configure Serviceguard NFS. You must set up your Serviceguard cluster before you can configure Serviceguard NFS. For instructions on setting up an Serviceguard cluster, see the Managing Serviceguard manual.
B5140-90030.book Page 29 Thursday, August 24, 2006 9:32 AM Installing and Configuring Serviceguard NFS Installing Serviceguard NFS Installing Serviceguard NFS NOTE Serviceguard NFS Toolkit requires Serviceguard A.11.13 (or above). To enable the File Lock Migration feature (available with 11i v1 and 11i v2), you need Serviceguard A.11.15 or above.
B5140-90030.book Page 30 Thursday, August 24, 2006 9:32 AM Installing and Configuring Serviceguard NFS Installing Serviceguard NFS To run the toolkit, you need the following files, which are part of Serviceguard: nfs.cntl The control script that runs and halts the package nfs.conf The package configuration file You can create these two files by running the cmmakepkg command.
B5140-90030.book Page 31 Thursday, August 24, 2006 9:32 AM Installing and Configuring Serviceguard NFS Monitoring NFS/TCP Services with Serviceguard NFS Toolkit Monitoring NFS/TCP Services with Serviceguard NFS Toolkit In addition to monitoring NFS/UDP services, you can monitor NFS/TCP services with Serviceguard NFS Toolkit on HP-UX 11.x. For HP-UX 11.0, you need at least Serviceguard NFS Toolkit A.11.00.03 to monitor NFS/TCP services.
B5140-90030.book Page 32 Thursday, August 24, 2006 9:32 AM Installing and Configuring Serviceguard NFS Monitoring NFS/TCP Services with Serviceguard NFS Toolkit Step 2. Stop the NFS client with /sbin/init.d/nfs.client stop Step 3. Stop the NFS server with /sbin/init.d/nfs.server stop Step 4. Start the NFS server with /sbin/init.d/nfs.server start Step 5. Start the NFS client with /sbin/init.d/nfs.client start After completing the preceding procedure, NFS will establish only UDP connections on HP-UX 11.0.
B5140-90030.book Page 33 Thursday, August 24, 2006 9:32 AM Installing and Configuring Serviceguard NFS Before Creating a Serviceguard NFS Package Before Creating a Serviceguard NFS Package Before creating a Serviceguard NFS package, perform the following tasks: 1. Set up your Serviceguard cluster according to the instructions in the Managing Serviceguard manual. 2. On the primary node and all adoptive nodes for the NFS package, set the NFS_SERVER variable to 1 in the /etc/rc.config.d/nfsconf file.
B5140-90030.book Page 34 Thursday, August 24, 2006 9:32 AM Installing and Configuring Serviceguard NFS Before Creating a Serviceguard NFS Package the START_MOUNTD variable is set to 1, and you run the NFS monitor script, your NFS package will fail over to an adoptive node if rpc.mountd fails. 5. On the primary node and all adoptive nodes for the NFS package, set the NUM_NFSD variable in the /etc/rc.config.
B5140-90030.book Page 35 Thursday, August 24, 2006 9:32 AM Installing and Configuring Serviceguard NFS Before Creating a Serviceguard NFS Package between the primary and adoptive nodes, the client’s file handle would no longer point to the correct file location after movement of the package to a different node. It is recommended that filesystems used for NFS be created as journalled file systems (FStype vxfs). This ensures the fastest recovery time in the event of a package switch to another node. 9.
B5140-90030.book Page 36 Thursday, August 24, 2006 9:32 AM Installing and Configuring Serviceguard NFS Before Creating a Serviceguard NFS Package mount -o nointr relocatable_ip:/usr/src /usr/src where relocatable_ip is the IP address of the package, and /usr/src represents the mount points of the server and the client, respectively.
B5140-90030.book Page 37 Thursday, August 24, 2006 9:32 AM Installing and Configuring Serviceguard NFS Configuring a Serviceguard NFS Package Configuring a Serviceguard NFS Package To configure a Serviceguard NFS package, complete the following tasks, included in this section: Chapter 2 • “Copying the Template Files” • “Editing the Control Script (nfs.cntl)” • “Editing the NFS Control Script (hanfs.sh)” • “Editing the File Lock Migration Script (nfs.flm)” • “Editing the NFS Monitor Script (nfs.
B5140-90030.book Page 38 Thursday, August 24, 2006 9:32 AM Installing and Configuring Serviceguard NFS Configuring a Serviceguard NFS Package Copying the Template Files If you will run only one Serviceguard NFS package in your Serviceguard cluster, you do not have to copy the template files. However, if you will run multiple Serviceguard NFS packages, each package must have its own package configuration file and control script. NOTE Serviceguard NFS Toolkit requires Serviceguard A.11.13 (or above).
B5140-90030.book Page 39 Thursday, August 24, 2006 9:32 AM Installing and Configuring Serviceguard NFS Configuring a Serviceguard NFS Package Editing the Control Script (nfs.cntl) The control script, nfs.cntl, is different as of the A.11.11.02 and A.11.00.05 releases. For Serviceguard NFS Toolkit A.11.00.04 or lower for HP-UX 11.0 or Serviceguard NFS Toolkit A.11.11.01 or lower for HP-UX 11i v1 using Serviceguard A.11.09 (or below) framework, see “Editing nfs.cntl for NFS Toolkit A.11.00.04 and A.11.11.
B5140-90030.book Page 40 Thursday, August 24, 2006 9:32 AM Installing and Configuring Serviceguard NFS Configuring a Serviceguard NFS Package LV[0]="/dev/vx/dsk/dg01/vol01"; FS[0]="/pkg1a"; FS_M OUNT_OPT[0]="-o rw" LV[1]="/dev/vx/dsk/dg01/vol02"; FS[1]="/pkg1b"; FS_M OUNT_OPT[1]="-o rw" 4. Specify the IP address for the package and the address of the subnet to which the IP address belongs: IP[0]=15.13.114.243 SUBNET[0]=15.13.112.0 The IP address you specify is the relocatable IP address for the package.
B5140-90030.book Page 41 Thursday, August 24, 2006 9:32 AM Installing and Configuring Serviceguard NFS Configuring a Serviceguard NFS Package command to run in the background. It must run in the background to allow the control script to finish bringing up the package. The cmmodpkg command will hang until the package is up, so it must run in the background to allow the control script to complete.
B5140-90030.book Page 42 Thursday, August 24, 2006 9:32 AM Installing and Configuring Serviceguard NFS Configuring a Serviceguard NFS Package XFS[0]=”/ha_root” XFS[1]=”/users/scaf” XFS[2]=”-o ro /ha_data” 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 cannot boot properly.
B5140-90030.book Page 43 Thursday, August 24, 2006 9:32 AM Installing and Configuring Serviceguard NFS Configuring a Serviceguard NFS Package 6. If you run the NFS monitor script, set the NFS_SERVICE_CMD variable to the full path name of the NFS monitor script. NFS_SERVICE_CMD[0]=/etc/cmcluster/nfs/nfs.mon The path name for the executable script does not have to be unique to each package. Every package can use the same script.
B5140-90030.book Page 44 Thursday, August 24, 2006 9:32 AM Installing and Configuring Serviceguard NFS Configuring a Serviceguard NFS Package There is a short time, after one package has failed over but before the cmmodpkg command has executed, when the other package can fail over and the host will adopt it. In other words, if two packages fail over at approximately the same time, a host may adopt both packages, even though the package control option is specified.
B5140-90030.book Page 45 Thursday, August 24, 2006 9:32 AM Installing and Configuring Serviceguard NFS Configuring a Serviceguard NFS Package Editing the NFS Control Script (hanfs.sh) The hanfs.sh control script contains NFS specific control variables and functions. The sample steps are as follows: 1. Create a separate XFS[n] variable for each NFS directory to be exported. Specify the directory name and any export options. The directories must be defined in the above mounted file system FS list.
B5140-90030.book Page 46 Thursday, August 24, 2006 9:32 AM Installing and Configuring Serviceguard NFS Configuring a Serviceguard NFS Package # NFS_SERVICE_NAME[0]=nfs.monitor # NFS_SERVICE_CMD[0]=/etc/cmcluster/nfs/nfs.mon By default, the NFS_SERVICE_NAME and NFS_SERVICE_CMD variables are commented out, and the NFS monitor script is not run. NOTE The Serviceguard A.11.13 configuration file includes the following changes: • AUTO_RUN replaces obsolete PKG_SWITCHING_ENABLED.
B5140-90030.book Page 47 Thursday, August 24, 2006 9:32 AM Installing and Configuring Serviceguard NFS Configuring a Serviceguard NFS Package Editing the File Lock Migration Script (nfs.flm) The File Lock Migration script, nfs.flm, handles the majority of the work involved in maintaining file lock integrity that follows an HA/NFS failover. The nfs.
B5140-90030.book Page 48 Thursday, August 24, 2006 9:32 AM Installing and Configuring Serviceguard NFS Configuring a Serviceguard NFS Package this request generates the /var/statmon/sm file) to the HA/NFS server and having the package migrate within this same five seconds window are extremely unlikely. If you repeatedly experience a problem with this corner-case scenario, reduce the copy time interval by setting the PROPAGATE_INTERVAL parameter to a lower value.
B5140-90030.book Page 49 Thursday, August 24, 2006 9:32 AM Installing and Configuring Serviceguard NFS Configuring a Serviceguard NFS Package Editing the NFS Monitor Script (nfs.mon) The NFS monitor script, nfs.mon, contains NFS-specific monitor variables and functions. The nfs.mon script is an optional component of HA/NFS. The hanfs.sh file specifies whether the NFS monitor script is used. The following steps describe how to configure the NFS monitor script: 1.
B5140-90030.book Page 50 Thursday, August 24, 2006 9:32 AM Installing and Configuring Serviceguard NFS Configuring a Serviceguard NFS Package These arguments are passed using the NFS_SERVICE_CMD line in the hanfs.sh file. In order to set these optional arguments, all of the preceding arguments must also be specified in the NFS_SERVICE_CMD line.
B5140-90030.book Page 51 Thursday, August 24, 2006 9:32 AM Installing and Configuring Serviceguard NFS Configuring a Serviceguard NFS Package Editing the Package Configuration File (nfs.conf) 1. Serviceguard A.11.17 provides a new package configuration file template. The new package configuration file template introduces the following dependency variables: • DEPENDENCY_NAME • DEPENDENCY_CONDITION • DEPENDENCY_LOCATION The above parameters are not supported in Serviceguard NFS Toolkit A.11.23.05.
B5140-90030.book Page 52 Thursday, August 24, 2006 9:32 AM Installing and Configuring Serviceguard NFS Configuring a Serviceguard NFS Package Each package must have a unique service name. The SERVICE_NAME variable in the package configuration file must match the NFS_SERVICE_NAME variable in the NFS control script. If you do not want to run the NFS monitor script, comment out the SERVICE_NAME variable: # SERVICE_NAME nfs.monitor 6.
B5140-90030.book Page 53 Thursday, August 24, 2006 9:32 AM Installing and Configuring Serviceguard NFS Configuring a Serviceguard NFS Package Configuring Server-to-Server Cross-Mounts (Optional) Two NFS server nodes may NFS-mount each other’s file systems and still act as adoptive nodes for each other’s NFS server packages. Figure 2-1 illustrates this configuration.
B5140-90030.book Page 54 Thursday, August 24, 2006 9:32 AM Installing and Configuring Serviceguard NFS Configuring a Serviceguard NFS Package The advantage of server-to-server cross-mounting is that every server has an identical view of the file systems. The disadvantage is that, on the node where a file system is locally mounted, the file system is accessed through an NFS mount, which has poorer performance than a local mount.
B5140-90030.book Page 55 Thursday, August 24, 2006 9:32 AM Installing and Configuring Serviceguard NFS Configuring a Serviceguard NFS Package Hewlett-Packard recommends that you execute the nfs_xmnt script from the command line after the package is active on the primary node. However, you can configure the nfs_xmnt script to be executed by the NFS control script in the customer_defined_run_cmds function.
B5140-90030.book Page 56 Thursday, August 24, 2006 9:32 AM Installing and Configuring Serviceguard NFS Configuring a Serviceguard NFS Package Creating the Cluster Configuration File and Bringing Up the Cluster To create the cluster configuration file, verify the cluster and package configuration files, and run the cluster, perform the following steps: 1. Use the cmquerycl command in the following manner to create the cluster configuration file from your package configuration files.
B5140-90030.
B5140-90030.book Page 58 Thursday, August 24, 2006 9:32 AM Sample Configurations This chapter gives sample cluster configuration files, package configuration files, and control scripts for the following configurations: • Example One - Three-Server Mutual Takeover: This configuration has three servers and three Serviceguard NFS packages. Each server is the primary node for one package and an adoptive node for the other two packages.
B5140-90030.book Page 59 Thursday, August 24, 2006 9:32 AM Sample Configurations Example One - Three-Server Mutual Takeover Example One - Three-Server Mutual Takeover This configuration has three servers and three Serviceguard NFS packages. Each server is the primary node for one package and an adoptive node for the other two packages. Figure 3-1 illustrates this configuration. Dotted lines indicate which servers are adoptive nodes for the packages.
B5140-90030.book Page 60 Thursday, August 24, 2006 9:32 AM Sample Configurations Example One - Three-Server Mutual Takeover Figure 3-2 shows the three-server mutual takeover configuration after host basil has failed and host sage has adopted pkg02. Dotted lines indicate which servers are adoptive nodes for the packages. Figure 3-2 Three-Server Mutual Takeover after One Server Fails thyme basil sage pkg01 IP VG[0] LV[0] FS[0] XFS[0] = = = = = 15.13.114.
B5140-90030.book Page 61 Thursday, August 24, 2006 9:32 AM Sample Configurations Example One - Three-Server Mutual Takeover Cluster Configuration File for Three-Server Mutual Takeover This section shows the cluster configuration file (cluster.conf) for this configuration example. The comments are not shown. CLUSTER_NAME MutTakOvr FIRST_CLUSTER_LOCK_VG /dev/nfsu01 NODE_NAME NETWORK_INTERFACE HEARTBEAT_IP NETWORK_INTERFACE FIRST_CLUSTER_LOCK_PV thyme lan0 15.13.119.
B5140-90030.book Page 62 Thursday, August 24, 2006 9:32 AM Sample Configurations Example One - Three-Server Mutual Takeover Package Configuration File for pkg01 This section shows the package configuration file (nfs1.conf) for the package pkg01 in this sample configuration. The comments are not shown.
B5140-90030.book Page 63 Thursday, August 24, 2006 9:32 AM Sample Configurations Example One - Three-Server Mutual Takeover NFS Control Scripts for pkg01 The nfs.cntl Control Script This section shows the NFS control script (nfs1.cntl) for the pkg01 package in this sample configuration. Only the user-configured part of the script is shown; the executable part of the script and most of the comments are omitted.
B5140-90030.book Page 64 Thursday, August 24, 2006 9:32 AM Sample Configurations Example One - Three-Server Mutual Takeover Package Configuration File for pkg02 This section shows the package configuration file (nfs2.conf) for the package pkg02 in this sample configuration. The comments are not shown.
B5140-90030.book Page 65 Thursday, August 24, 2006 9:32 AM Sample Configurations Example One - Three-Server Mutual Takeover NFS Control Scripts for pkg02 The nfs.cntl Control Script This section shows the NFS control script (nfs2.cntl) for the pkg02 package in this sample configuration. Only the user-configured part of the script is shown; the executable part of the script and most of the comments are omitted.
B5140-90030.book Page 66 Thursday, August 24, 2006 9:32 AM Sample Configurations Example One - Three-Server Mutual Takeover Package Configuration File for pkg03 This section shows the package configuration file (nfs3.conf) for the package pkg03 in this sample configuration. The comments are not shown.
B5140-90030.book Page 67 Thursday, August 24, 2006 9:32 AM Sample Configurations Example One - Three-Server Mutual Takeover NFS Control Scripts for pkg03 The nfs.cntl Control Script This section shows the NFS control script (nfs3.cntl) for the pkg03 package in this sample configuration. Only the user-configured part of the script is shown; the executable part of the script and most of the comments are omitted.
B5140-90030.book Page 68 Thursday, August 24, 2006 9:32 AM Sample Configurations Example Two - One Adoptive Node for Two Packages with File Lock Migration Example Two - One Adoptive Node for Two Packages with File Lock Migration This configuration has two packages, each owned by a different server. The adoptive node for both packages is the same host. This sample configuration uses the package control option, which prevents the adoptive node from adopting another package if it has already adopted one.
B5140-90030.book Page 69 Thursday, August 24, 2006 9:32 AM Sample Configurations Example Two - One Adoptive Node for Two Packages with File Lock Migration Figure 3-4 shows this sample configuration after host basil has failed. Host sage has adopted pkg02. The package control option prevents host sage from adopting another package, so host sage is no longer an adoptive node for pkg01.
B5140-90030.book Page 70 Thursday, August 24, 2006 9:32 AM Sample Configurations Example Two - One Adoptive Node for Two Packages with File Lock Migration Cluster Configuration File for Adoptive Node for Two Packages with File Lock Migration This section shows the cluster configuration file (cluster.conf) for this configuration example. The comments are not shown.
B5140-90030.book Page 71 Thursday, August 24, 2006 9:32 AM Sample Configurations Example Two - One Adoptive Node for Two Packages with File Lock Migration Package Configuration File for pkg01 This section shows the package configuration file (nfs1.conf) for the package pkg01 in this sample configuration. The comments are not shown.
B5140-90030.book Page 72 Thursday, August 24, 2006 9:32 AM Sample Configurations Example Two - One Adoptive Node for Two Packages with File Lock Migration NFS Control Scripts for pkg01 The nfs.cntl Control Script This section shows the NFS control script (nfs1.cntl) for the pkg01 package in this sample configuration. Only the user-configured part of the script is shown; the executable part of the script and most of the comments are omitted.
B5140-90030.book Page 73 Thursday, August 24, 2006 9:32 AM Sample Configurations Example Two - One Adoptive Node for Two Packages with File Lock Migration If you omit the cmmodpkg -d command from the NFS control script, host sage can adopt both pkg01 and pkg02 if their primary nodes fail. The hanfs.sh Control Script This section shows the NFS control script (hanfs1.sh) for the pkg01 package in this sample configuration.
B5140-90030.book Page 74 Thursday, August 24, 2006 9:32 AM Sample Configurations Example Two - One Adoptive Node for Two Packages with File Lock Migration NFS File Lock Migration and Monitor Scripts for pkg01 The nfs.flm Script This section shows the NFS File Lock Migration (nfs1.flm) script for the pkg01 package in this sample configuration. This example includes only the user-configured part of the script; the executable part of the script and comments are omitted.
B5140-90030.book Page 75 Thursday, August 24, 2006 9:32 AM Sample Configurations Example Two - One Adoptive Node for Two Packages with File Lock Migration Package Configuration File for pkg02 This section shows the package configuration file (nfs2.conf) for the package pkg02 in this sample configuration. The comments are not shown.
B5140-90030.book Page 76 Thursday, August 24, 2006 9:32 AM Sample Configurations Example Two - One Adoptive Node for Two Packages with File Lock Migration NFS Control Scripts for pkg02 The nfs.cntl Control Script This section shows the NFS control script (nfs2.cntl) for the pkg02 package in this sample configuration. Only the user-configured part of the script is shown; the executable part of the script and most of the comments are omitted.
B5140-90030.book Page 77 Thursday, August 24, 2006 9:32 AM Sample Configurations Example Two - One Adoptive Node for Two Packages with File Lock Migration If you omit the cmmodpkg -d command from the NFS control script, host sage can adopt both pkg01 and pkg02 if their primary nodes fail. The hanfs.sh Control Script This section shows the NFS control script (hanfs2.sh) for the pkg02 package in this sample configuration.
B5140-90030.book Page 78 Thursday, August 24, 2006 9:32 AM Sample Configurations Example Two - One Adoptive Node for Two Packages with File Lock Migration NFS File Lock Migration and Monitor Scripts for pkg02 The nfs.flm Script This section shows the NFS File Lock Migration (nfs2.flm) script for the pkg02 package in this sample configuration. This example includes only the user-configured part of the script; the executable part of the script and comments are omitted.
B5140-90030.book Page 79 Thursday, August 24, 2006 9:32 AM Sample Configurations Example Three - Three-Server Cascading Failover Example Three - Three-Server Cascading Failover This configuration has two packages and three servers. One server is the primary node for both packages. The other servers are adoptive nodes for the two packages. Figure 3-5 illustrates this configuration. Dotted lines indicate which servers are adoptive nodes for the packages.
B5140-90030.book Page 80 Thursday, August 24, 2006 9:32 AM Sample Configurations Example Three - Three-Server Cascading Failover Figure 3-6 shows the cascading failover configuration after host thyme has failed. Host basil is the first adoptive node configured for pkg01, and host sage is the first adoptive node configured for pkg02. Figure 3-6 Cascading Failover with Three Servers after One Server Fails thyme basil sage pkg01 IP VG[0] LV[0] FS[0] XFS[0] = = = = = 15.13.114.
B5140-90030.book Page 81 Thursday, August 24, 2006 9:32 AM Sample Configurations Example Three - Three-Server Cascading Failover Cluster Configuration File for Three-Server Cascading Failover This section shows the cluster configuration file (cluster.conf) for this configuration example. The comments are not shown. CLUSTER_NAME Cascading FIRST_CLUSTER_LOCK_VG /dev/nfsu01 NODE_NAME NETWORK_INTERFACE HEARTBEAT_IP NETWORK_INTERFACE FIRST_CLUSTER_LOCK_PV thyme lan0 15.13.119.
B5140-90030.book Page 82 Thursday, August 24, 2006 9:32 AM Sample Configurations Example Three - Three-Server Cascading Failover Package Configuration File for pkg01 This section shows the package configuration file (nfs1.conf) for the package pkg01 in this sample configuration. The comments are not shown.
B5140-90030.book Page 83 Thursday, August 24, 2006 9:32 AM Sample Configurations Example Three - Three-Server Cascading Failover NFS Control Scripts for pkg01 The nfs.cntl Control Script This section shows the NFS control script (nfs1.cntl) for the pkg01 package in this sample configuration. Only the user-configured part of the script is shown; the executable part of the script and most of the comments are omitted.
B5140-90030.book Page 84 Thursday, August 24, 2006 9:32 AM Sample Configurations Example Three - Three-Server Cascading Failover Package Configuration File for pkg02 This section shows the package configuration file (nfs2.conf) for the package pkg02 in this sample configuration. The comments are not shown.
B5140-90030.book Page 85 Thursday, August 24, 2006 9:32 AM Sample Configurations Example Three - Three-Server Cascading Failover NFS Control Scripts for pkg02 The nfs.cntl Control Script This section shows the NFS control script (nfs2.cntl) for the pkg02 package in this sample configuration. Only the user-configured part of the script is shown; the executable part of the script and most of the comments are omitted.
B5140-90030.book Page 86 Thursday, August 24, 2006 9:32 AM Sample Configurations Example Four - Two Servers with NFS Cross-Mounts Example Four - Two Servers with NFS Cross-Mounts This configuration has two servers and two packages. The primary node for each package NFS-mounts the file systems from its own package and the other package. Figure 3-7 illustrates this configuration. If one server fails, the other server adopts its package. The NFS mounts are not interrupted when a package fails over.
B5140-90030.book Page 87 Thursday, August 24, 2006 9:32 AM Sample Configurations Example Four - Two Servers with NFS Cross-Mounts Figure 3-8 shows two servers with NFS cross-mounted file systems after server thyme has failed. The NFS mounts on server basil are not interrupted.
B5140-90030.book Page 88 Thursday, August 24, 2006 9:32 AM Sample Configurations Example Four - Two Servers with NFS Cross-Mounts Cluster Configuration File for Two-Server NFS Cross-Mount This section shows the cluster configuration file (cluster.conf) for this configuration example. The comments are not shown. CLUSTER_NAME XMnt FIRST_CLUSTER_LOCK_VG /dev/nfsu01 NODE_NAME NETWORK_INTERFACE HEARTBEAT_IP NETWORK_INTERFACE FIRST_CLUSTER_LOCK_PV thyme lan0 15.13.119.
B5140-90030.book Page 89 Thursday, August 24, 2006 9:32 AM Sample Configurations Example Four - Two Servers with NFS Cross-Mounts Package Configuration File for pkg01 This section shows the package configuration file (nfs1.conf) for the package pkg01 in this sample configuration. The comments are not shown.
B5140-90030.book Page 90 Thursday, August 24, 2006 9:32 AM Sample Configurations Example Four - Two Servers with NFS Cross-Mounts NFS Control Scripts for pkg01 The nfs.cntl Control Script This section shows the NFS control script (nfs1.cntl) for the pkg01 package in this sample configuration. Only the user-configured part of the script is shown; the executable part of the script and most of the comments are omitted.
B5140-90030.book Page 91 Thursday, August 24, 2006 9:32 AM Sample Configurations Example Four - Two Servers with NFS Cross-Mounts The first line in the customer_defined_run_cmds function executes the nfs1_xmnt script locally on host thyme (the primary node for pkg01). The second line, beginning with remsh, executes the nfs1_xmnt script remotely on host basil. If pkg01 fails to come up, or if the remsh to host basil fails, the file system will not be mounted, and no error will be returned.
B5140-90030.book Page 92 Thursday, August 24, 2006 9:32 AM Sample Configurations Example Four - Two Servers with NFS Cross-Mounts Package Configuration File for pkg02 This section shows the package configuration file (nfs2.conf) for the package pkg02 in this sample configuration. The comments are not shown.
B5140-90030.book Page 93 Thursday, August 24, 2006 9:32 AM Sample Configurations Example Four - Two Servers with NFS Cross-Mounts NFS Control Scripts for pkg02 The nfs.cntl Control Script This section shows the NFS control script (nfs2.cntl) for the pkg02 package in this sample configuration. Only the user-configured part of the script is shown; the executable part of the script and most of the comments are omitted.
B5140-90030.book Page 94 Thursday, August 24, 2006 9:32 AM Sample Configurations Example Four - Two Servers with NFS Cross-Mounts The first line in the customer_defined_run_cmds function executes the nfs2_xmnt script locally on host basil (the primary node for pkg02). The second line, beginning with remsh, executes the nfs2_xmnt script remotely on host thyme. If pkg02 fails to come up, or if the remsh to host thyme fails, the file system will not be mounted, and no error will be returned.
B5140-90030.book Page 95 Thursday, August 24, 2006 9:32 AM Index A adoptive nodes, 15 configuring, 51 example of package control option, 68 for multiple packages, 15, 18, 40, 43 illustration of cascading failover, 19 automounter timeout, 25 C cascading failover, 15 example configuration, 79 illustration of, 19 client behavior, 8, 25 cluster configuration file (cluster.
B5140-90030.book Page 96 Thursday, August 24, 2006 9:32 AM Index internet address, for package, 22, 23, 40, 42 mapping to logical name, 35 interruptible NFS mounts, 35 IP address, for package, 22, 23, 40, 42 mapping to logical name, 35 IP variable, in hanfs.sh script, 40 IP variable, in nfs.
B5140-90030.book Page 97 Thursday, August 24, 2006 9:32 AM Index default values, 52 example, 62, 64, 66, 71, 75, 82, 84, 89, 92 package control option (cmmodpkg -d), 40, 43, 72, 76 package name, 35 PACKAGE_NAME, in nfs.conf, 51 PCNFS_SERVER variable, 33 pcnfsd, 24, 33 PKG_SWITCHING_ENABLED, 42, 46 R retry option, mount command, 25 rpc.lockd monitoring, 24 restarting, 23 stopping, 23 rpc.mountd, starting, 33 rpc.statd monitoring, 24 restarting, 23 stopping, 23 rpcinfo command, 24 RUN_SCRIPT, in nfs.