B5140-90017.book Page 1 Thursday, January 22, 2004 3:10 PM Managing MC/ServiceGuard NFS A.11.11.03 and A.11.23.02 Edition 5 Manufacturing Part Number: B5140-90017 E0304 United States © Copyright 2004 Hewlett-Packard Development Company L. P. All rights reserved.
B5140-90017.book Page 2 Thursday, January 22, 2004 3:10 PM 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-90017.book Page 3 Thursday, January 22, 2004 3:10 PM Contents 1. Overview of MC/ServiceGuard NFS Limitations of MC/ServiceGuard NFS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Overview of the NFS File Lock Migration Feature . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Supported Configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Simple Failover to an Idle NFS Server . . . . . . . . . . . .
B5140-90017.book Page 4 Thursday, January 22, 2004 3:10 PM Contents NFS Control Scripts for pkg03. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 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. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Package Configuration File for pkg01 . .
B5140-90017.book Page 5 Thursday, January 22, 2004 3:10 PM 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-90017.
B5140-90017.
B5140-90017.book Page 8 Thursday, January 22, 2004 3:10 PM Overview of MC/ServiceGuard NFS MC/ServiceGuard NFS is a tool kit that enables you to use MC/ServiceGuard to set up highly available NFS servers. You must set up an MC/ServiceGuard cluster before you can set up Highly Available NFS. For instructions on setting up an MC/ServiceGuard cluster, see the Managing MC/ServiceGuard manual.
B5140-90017.book Page 9 Thursday, January 22, 2004 3:10 PM Overview of MC/ServiceGuard NFS Limitations of MC/ServiceGuard NFS Limitations of MC/ServiceGuard NFS The following limitations apply to MC/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.
B5140-90017.book Page 10 Thursday, January 22, 2004 3:10 PM Overview of MC/ServiceGuard NFS Overview of the NFS File Lock Migration Feature Overview of the NFS File Lock Migration Feature MC/ServiceGuard NFS includes a new feature - File Lock Migration. 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-90017.book Page 11 Thursday, January 22, 2004 3:10 PM Overview of MC/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-90017.book Page 12 Thursday, January 22, 2004 3:10 PM Overview of MC/ServiceGuard NFS Supported Configurations Supported Configurations MC/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-90017.book Page 13 Thursday, January 22, 2004 3:10 PM Overview of MC/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-90017.book Page 14 Thursday, January 22, 2004 3:10 PM Overview of MC/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-90017.book Page 15 Thursday, January 22, 2004 3:10 PM Overview of MC/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-90017.book Page 16 Thursday, January 22, 2004 3:10 PM Overview of MC/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-90017.book Page 17 Thursday, January 22, 2004 3:10 PM Overview of MC/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-90017.book Page 18 Thursday, January 22, 2004 3:10 PM Overview of MC/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-90017.book Page 19 Thursday, January 22, 2004 3:10 PM Overview of MC/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-90017.book Page 20 Thursday, January 22, 2004 3:10 PM Overview of MC/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-90017.book Page 21 Thursday, January 22, 2004 3:10 PM Overview of MC/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-90017.book Page 22 Thursday, January 22, 2004 3:10 PM Overview of MC/ServiceGuard NFS How the Control and Monitor Scripts Work TIP You can specify the number of retry attempts for all these processes in the nfs.mon file. On the Client Side The client should NFS-mount a file system using the package name in the mount command. The package name is associated with the package’s relocatable IP address. On client systems, be sure to use a hard mount and set the proper retry values for the mount.
B5140-90017.
B5140-90017.book Page 24 Thursday, January 22, 2004 3:10 PM Installing and Configuring MC/ServiceGuard NFS This chapter explains how to configure MC/ServiceGuard NFS. You must set up your MC/ServiceGuard cluster before you can configure MC/ServiceGuard NFS. For instructions on setting up an MC/ServiceGuard cluster, see the Managing MC/ServiceGuard manual.
B5140-90017.book Page 25 Thursday, January 22, 2004 3:10 PM Installing and Configuring MC/ServiceGuard NFS Installing MC/ServiceGuard NFS Installing MC/ServiceGuard NFS NOTE MC/ServiceGuard NFS Toolkit requires MC/ServiceGuard A.11.13 (or above). To enable the File Lock Migration feature (available with 11i v1 and 11i v2), you need MC/ServiceGuard A.11.15.
B5140-90017.book Page 26 Thursday, January 22, 2004 3:10 PM Installing and Configuring MC/ServiceGuard NFS Installing MC/ServiceGuard NFS To run the toolkit, you need the following files, which are part of MC/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-90017.book Page 27 Thursday, January 22, 2004 3:10 PM Installing and Configuring MC/ServiceGuard NFS Monitoring NFS/TCP Services with MC/ ServiceGuard NFS Toolkit Monitoring NFS/TCP Services with MC/ ServiceGuard NFS Toolkit In addition to monitoring NFS/UDP services, you can monitor NFS/TCP services with MC/ServiceGuard NFS Toolkit on HP-UX 11.x. For HP-UX 11.0, you need at least MC/ServiceGuard NFS Toolkit A.11.00.03 to monitor NFS/TCP services.
B5140-90017.book Page 28 Thursday, January 22, 2004 3:10 PM Installing and Configuring MC/ServiceGuard NFS Monitoring NFS/TCP Services with MC/ 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.
B5140-90017.book Page 29 Thursday, January 22, 2004 3:10 PM Installing and Configuring MC/ServiceGuard NFS Before Creating an MC/ServiceGuard NFS Package Before Creating an MC/ServiceGuard NFS Package Before creating an MC/ServiceGuard NFS package, perform the following tasks: 1. Set up your MC/ServiceGuard cluster according to the instructions in the Managing MC/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.
B5140-90017.book Page 30 Thursday, January 22, 2004 3:10 PM Installing and Configuring MC/ServiceGuard NFS Before Creating an MC/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-90017.book Page 31 Thursday, January 22, 2004 3:10 PM Installing and Configuring MC/ServiceGuard NFS Before Creating an MC/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.
B5140-90017.book Page 32 Thursday, January 22, 2004 3:10 PM Installing and Configuring MC/ServiceGuard NFS Before Creating an MC/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-90017.book Page 33 Thursday, January 22, 2004 3:10 PM Installing and Configuring MC/ServiceGuard NFS Configuring an MC/ServiceGuard NFS Package Configuring an MC/ServiceGuard NFS Package To configure a MC/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.
B5140-90017.book Page 34 Thursday, January 22, 2004 3:10 PM Installing and Configuring MC/ServiceGuard NFS Configuring an MC/ServiceGuard NFS Package Copying the Template Files If you will run only one MC/ServiceGuard NFS package in your MC/ServiceGuard cluster, you do not have to copy the template files. However, if you will run multiple MC/ServiceGuard NFS packages, each package must have its own package configuration file and control script.
B5140-90017.book Page 35 Thursday, January 22, 2004 3:10 PM Installing and Configuring MC/ServiceGuard NFS Configuring an MC/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 MC/ServiceGuard NFS Toolkit A.11.00.04 or lower for HP-UX 11.0 or MC/ServiceGuard NFS Toolkit A.11.11.01 or lower for HP-UX 11i v1 using MC/ServiceGuard A.11.09 (or below) framework, see “Editing nfs.cntl for NFS Toolkit A.11.00.
B5140-90017.book Page 36 Thursday, January 22, 2004 3:10 PM Installing and Configuring MC/ServiceGuard NFS Configuring an MC/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.
B5140-90017.book Page 37 Thursday, January 22, 2004 3:10 PM Installing and Configuring MC/ServiceGuard NFS Configuring an MC/ServiceGuard NFS Package See “Example Two - One Adoptive Node for Two Packages with File Lock Migration” on page 64 for a sample configuration using the package control option. NOTE The NFS specific variables have been moved to NFS specific control script in MC/ServiceGuard NFS Toolkit with the A.11.11.02 and A.11.00.05 releases. See section “Editing the NFS Control Script (hanfs.
B5140-90017.book Page 38 Thursday, January 22, 2004 3:10 PM Installing and Configuring MC/ServiceGuard NFS Configuring an MC/ServiceGuard NFS Package happens if the server is an adoptive node for a file system, and the file system is available on the server only after failover of the primary node. 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.
B5140-90017.book Page 39 Thursday, January 22, 2004 3:10 PM Installing and Configuring MC/ServiceGuard NFS Configuring an MC/ServiceGuard NFS Package The path name for the executable script does not have to be unique to each package. Every package can use the same script. Multiple instances of the monitor script can run on the same node without any problems, and if a package fails over, only the instance associated with that package is killed.
B5140-90017.book Page 40 Thursday, January 22, 2004 3:10 PM Installing and Configuring MC/ServiceGuard NFS Configuring an MC/ServiceGuard NFS Package See “Example Two - One Adoptive Node for Two Packages with File Lock Migration” on page 64 for a sample configuration using the package control option.
B5140-90017.book Page 41 Thursday, January 22, 2004 3:10 PM Installing and Configuring MC/ServiceGuard NFS Configuring an MC/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-90017.book Page 42 Thursday, January 22, 2004 3:10 PM Installing and Configuring MC/ServiceGuard NFS Configuring an MC/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 MC/ServiceGuard A.11.13 configuration file includes the following changes: • AUTO_RUN replaces obsolete PKG_SWITCHING_ENABLED.
B5140-90017.book Page 43 Thursday, January 22, 2004 3:10 PM Installing and Configuring MC/ServiceGuard NFS Configuring an MC/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-90017.book Page 44 Thursday, January 22, 2004 3:10 PM Installing and Configuring MC/ServiceGuard NFS Configuring an MC/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-90017.book Page 45 Thursday, January 22, 2004 3:10 PM Installing and Configuring MC/ServiceGuard NFS Configuring an MC/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-90017.book Page 46 Thursday, January 22, 2004 3:10 PM Installing and Configuring MC/ServiceGuard NFS Configuring an MC/ServiceGuard NFS Package Editing the Package Configuration File (nfs.conf) 1. Set the PACKAGE_NAME variable. PACKAGE_NAME pkg01 You can use the default package name if you will run only one MC/ServiceGuard NFS package on your MC/ServiceGuard cluster. Each package must have a unique name. 2. Create a NODE_NAME variable for each node that will run the package.
B5140-90017.book Page 47 Thursday, January 22, 2004 3:10 PM Installing and Configuring MC/ServiceGuard NFS Configuring an MC/ServiceGuard NFS Package You can use the default values for the rest of the variables in the package configuration file, or you can change them as needed. For instructions on modifying the default values, see the Managing MC/ServiceGuard manual, or read the comments in the /opt/cmcluster/nfs/nfs.conf template file.
B5140-90017.book Page 48 Thursday, January 22, 2004 3:10 PM Installing and Configuring MC/ServiceGuard NFS Configuring an MC/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-90017.book Page 49 Thursday, January 22, 2004 3:10 PM Installing and Configuring MC/ServiceGuard NFS Configuring an MC/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-90017.book Page 50 Thursday, January 22, 2004 3:10 PM Installing and Configuring MC/ServiceGuard NFS Configuring an MC/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-90017.book Page 51 Thursday, January 22, 2004 3:10 PM Installing and Configuring MC/ServiceGuard NFS Configuring an MC/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-90017.
B5140-90017.
B5140-90017.book Page 54 Thursday, January 22, 2004 3:10 PM 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 MC/ServiceGuard NFS packages. Each server is the primary node for one package and an adoptive node for the other two packages.
B5140-90017.book Page 55 Thursday, January 22, 2004 3:10 PM Sample Configurations Example One - Three-Server Mutual Takeover Example One - Three-Server Mutual Takeover This configuration has three servers and three MC/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-90017.book Page 56 Thursday, January 22, 2004 3:10 PM 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-90017.book Page 57 Thursday, January 22, 2004 3:10 PM 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-90017.book Page 58 Thursday, January 22, 2004 3:10 PM 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-90017.book Page 59 Thursday, January 22, 2004 3:10 PM 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-90017.book Page 60 Thursday, January 22, 2004 3:10 PM 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-90017.book Page 61 Thursday, January 22, 2004 3:10 PM 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-90017.book Page 62 Thursday, January 22, 2004 3:10 PM 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-90017.book Page 63 Thursday, January 22, 2004 3:10 PM 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-90017.book Page 64 Thursday, January 22, 2004 3:10 PM 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-90017.book Page 65 Thursday, January 22, 2004 3:10 PM 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-90017.book Page 66 Thursday, January 22, 2004 3:10 PM 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-90017.book Page 67 Thursday, January 22, 2004 3:10 PM 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-90017.book Page 68 Thursday, January 22, 2004 3:10 PM 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-90017.book Page 69 Thursday, January 22, 2004 3:10 PM 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-90017.book Page 70 Thursday, January 22, 2004 3:10 PM 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-90017.book Page 71 Thursday, January 22, 2004 3:10 PM 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-90017.book Page 72 Thursday, January 22, 2004 3:10 PM 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-90017.book Page 73 Thursday, January 22, 2004 3:10 PM 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-90017.book Page 74 Thursday, January 22, 2004 3:10 PM 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-90017.book Page 75 Thursday, January 22, 2004 3:10 PM 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-90017.book Page 76 Thursday, January 22, 2004 3:10 PM 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-90017.book Page 77 Thursday, January 22, 2004 3:10 PM 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-90017.book Page 78 Thursday, January 22, 2004 3:10 PM 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-90017.book Page 79 Thursday, January 22, 2004 3:10 PM 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-90017.book Page 80 Thursday, January 22, 2004 3:10 PM 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-90017.book Page 81 Thursday, January 22, 2004 3:10 PM 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-90017.book Page 82 Thursday, January 22, 2004 3:10 PM 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-90017.book Page 83 Thursday, January 22, 2004 3:10 PM 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-90017.book Page 84 Thursday, January 22, 2004 3:10 PM 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-90017.book Page 85 Thursday, January 22, 2004 3:10 PM 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-90017.book Page 86 Thursday, January 22, 2004 3:10 PM 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-90017.book Page 87 Thursday, January 22, 2004 3:10 PM 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-90017.book Page 88 Thursday, January 22, 2004 3:10 PM 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-90017.book Page 89 Thursday, January 22, 2004 3:10 PM 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-90017.book Page 90 Thursday, January 22, 2004 3:10 PM 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-90017.book Page 91 Thursday, January 22, 2004 3:10 PM Index A adoptive nodes, 12 configuring, 46 example of package control option, 64 for multiple packages, 12, 15, 36, 39 illustration of cascading failover, 16 automounter timeout, 22 C cascading failover, 12 example configuration, 75 illustration of, 16 client behavior, 8, 22 cluster configuration file (cluster.
B5140-90017.book Page 92 Thursday, January 22, 2004 3:10 PM Index internet address, for package, 19, 20, 36, 38 mapping to logical name, 31 interruptible NFS mounts, 31 IP address, for package, 19, 20, 36, 38 mapping to logical name, 31 IP variable, in hanfs.sh script, 36 IP variable, in nfs.
B5140-90017.book Page 93 Thursday, January 22, 2004 3:10 PM Index P package configuration file (nfs.conf) default values, 47 example, 58, 60, 62, 67, 71, 78, 80, 85, 88 package control option (cmmodpkg -d), 36, 39, 68, 72 package name, 31 PACKAGE_NAME, in nfs.conf, 46 PCNFS_SERVER variable, 29 pcnfsd, 21, 29 PKG_SWITCHING_ENABLED, 38, 42 R retry option, mount command, 22 rpc.lockd monitoring, 21 restarting, 20 stopping, 20 rpc.mountd, starting, 29 rpc.