Managing Linux SG
Managing Linux SG
2
Trademark Notices
HP ServiceGuard® is a registered trademark of Hewlett-Packard
Company, and is protected by copyright.
NIS™ is a trademark of Sun Microsystems, Inc.
UNIX® is a registered trademark of The Open Group.
Linux® is a registered trademark of Linus Torvalds.
Red Hat® is a registered trademark of Red Hat Software, Inc.
3
4
Contents
1. ServiceGuard for Linux at a Glance
What is ServiceGuard on Linux? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Failover . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Viewing ServiceGuard Clusters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Configuration Roadmap. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
5
Contents
What Makes a Package Run? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Before the Control Script Starts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
During Run Script Execution. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Normal and Abnormal Exits from the Run Script . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Service Startup with cmrunserv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Disk Monitor Services. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
While Services are Running . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
When a Service or Subnet Fails . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
When a Package is Halted with a Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
During Halt Script Execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Normal and Abnormal Exits from the Halt Script . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
How the Network Manager Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Stationary and Relocatable IP Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Adding and Deleting Relocatable IP Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Bonding of LAN Interfaces. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Bonding for Load Balancing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Remote Switching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
ARP Messages after Switching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Volume Managers for Data Storage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Examples of Storage on Smart Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Examples of Storage on Disk Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Monitoring Disks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
More Information on LVM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Responses to Failures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Transfer of Control (TOC) When a Node Fails . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Responses to Hardware Failures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Responses to Package and Service Failures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
6
Contents
Disk I/O Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Hardware Configuration Worksheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Power Supply Planning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Power Supply Configuration Worksheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
Quorum Server Planning. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Quorum Server Worksheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Volume Manager Planning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Multipath Device Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Volume Groups and Physical Volume Worksheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Cluster Configuration Planning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Quorum Server Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Lock LUN Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Cluster Configuration Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Cluster Configuration Worksheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Package Configuration Planning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Logical Volume and File System Planning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Planning for Expansion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Choosing Switching and Failover Behavior. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Package Configuration File Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Package Control Script Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Package Configuration Worksheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
7
Contents
Restarting Networking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
Viewing the Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
Implementing Channel Bonding (UnitedLinux 1.0) . . . . . . . . . . . . . . . . . . . . . . . . . . 139
Creating the Logical Volume Infrastructure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
Displaying Disk Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
Creating Partitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
Defining Multiple MD Paths for LUNs in Disk Arrays . . . . . . . . . . . . . . . . . . . . . . 147
Building Volume Groups for Use with Smart Array Cluster Storage . . . . . . . . . . . 148
Building Volume Groups and Logical Volumes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
Distributing the Shared Configuration to all Nodes. . . . . . . . . . . . . . . . . . . . . . . . . 153
Testing the Shared Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
Storing Volume Group Configuration Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
Setting up Disk Monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
Configuring the Cluster . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
Modifying /etc/fstab. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
Specifying a Quorum Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
Specifying a Lock LUN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
Cluster Configuration Template File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
Specifying Maximum Number of Configured Packages . . . . . . . . . . . . . . . . . . . . . 161
Modifying Cluster Timing Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
Adding or Removing Nodes While the Cluster is Running . . . . . . . . . . . . . . . . . . . 162
Verifying the Cluster Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
Cluster Lock Configuration Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
Distributing the Binary Configuration File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
Managing the Running Cluster. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
Checking Cluster Operation with ServiceGuard Manager . . . . . . . . . . . . . . . . . . . 165
Checking Cluster Operation with ServiceGuard Commands. . . . . . . . . . . . . . . . . . 165
Setting up Autostart Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
Changing the System Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
Managing a Single-Node Cluster . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
Deleting the Cluster Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
8
Contents
Customizing the Package Control Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
Optimizing for Large Numbers of Storage Units . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
Configuring Disk Monitoring Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
Package Control Script Template File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
Adding Customer Defined Functions to the Package Control Script . . . . . . . . . . . 184
Adding or Removing Packages on a Running Cluster . . . . . . . . . . . . . . . . . . . . . . . 185
Verifying the Package Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
Applying and Distributing the Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
Copying Package Control Scripts with Linux commands. . . . . . . . . . . . . . . . . . . . . 187
Testing Cluster and Package Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
Creating a Disk Monitor Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
Configuring All Disks for Monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
Configuring Disks on a Single Node for Monitoring . . . . . . . . . . . . . . . . . . . . . . . . . 191
9
Contents
Deleting Nodes from the Configuration While the Cluster is Running . . . . . . . . . 229
Managing Packages and Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
Starting a Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
Halting a Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
Moving a Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
Reconfiguring a Package on a Halted Cluster . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
Reconfiguring a Package on a Running Cluster . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
Adding a Package to a Running Cluster . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
Deleting a Package from a Running Cluster . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
Changing Package Switching Behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
Resetting the Service Restart Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
Allowable Package States During Reconfiguration . . . . . . . . . . . . . . . . . . . . . . . . . 236
Responding to Cluster Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
Single-Node Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
Removing ServiceGuard from a System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
10
Contents
ServiceGuard Command Hangs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258
Cluster Re-formations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258
System Administration Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
Package Movement Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262
Node and Network Failures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262
Quorum Server Messages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
Lock LUN Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
A. ServiceGuard Commands
11
Contents
Providing Online Application Reconfiguration . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
Documenting Maintenance Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313
12
Printing History
Table 1
The last printing date and part number indicate the current edition,
which applies to the A.11.15 version of HP ServiceGuard for Linux.
The printing date changes when a new edition is printed. (Minor
corrections and updates which are incorporated at reprint do not cause
the date to change.) The part number is revised when extensive technical
changes are incorporated.
New editions of this manual will incorporate all material updated since
the previous edition.
HP Printing Division:
Business Critical Computing
Hewlett-Packard Co.
19111 Pruneridge Ave.
Cupertino, CA 95014
13
14
Preface
This guide describes how to configure ServiceGuard on Linux to run on
HP ProLiant and HP Integrity servers under the Linux operating
system. This guide is written for experienced Linux system
administrators. Refer to your Linux documentation for Linux specific
information.
The contents are as follows:
15
• Appendix C, “Integrating HA Applications with ServiceGuard,”
presents suggestions for integrating your existing applications with
ServiceGuard for Linux.
• Appendix D, “Blank Planning Worksheets,” contains a set of empty
worksheets for preparing a ServiceGuard configuration.
Problem Reporting If you have any problems with the software or documentation, please
contact your local Hewlett-Packard Sales Office or Customer Service
Center.
16
ServiceGuard for Linux at a Glance
Chapter 1 17
ServiceGuard for Linux at a Glance
What is ServiceGuard on Linux?
18 Chapter 1
ServiceGuard for Linux at a Glance
What is ServiceGuard on Linux?
In the figure, node 1 (one of two SPU's) is running package A, and node 2
is running package B. Each package has a separate group of disks
associated with it, containing data needed by the package's applications,
and a copy of the data. Note that both nodes are physically connected to
disk arrays. However, only one node at a time may access the data for a
given group of disks. In the figure, node 1 is shown with exclusive access
to the top two disks (solid line), and node 2 is shown as connected
without access to the top disks (dotted line). Similarly, node 2 is shown
with exclusive access to the bottom two disks (solid line), and node 1 is
shown as connected without access to the bottom disks (dotted line).
Disk arrays provide redundancy in case of disk failures. In addition, a
total of four data buses are shown for the disks that are connected to
node 1 and node 2. This configuration provides the maximum
redundancy and also gives optimal I/O performance, since each package
is using different buses.
Note that the network hardware is cabled to provide redundant LAN
interfaces on each node. ServiceGuard uses TCP/IP network services for
reliable communication among nodes in the cluster, including the
transmission of heartbeat messages, signals from each functioning
node which are central to the operation of the cluster. TCP/IP services
also are used for other types of inter-node communication. (The
heartbeat is explained in more detail in the chapter “Understanding
ServiceGuard Software.”)
Failover
Under normal conditions, a fully operating ServiceGuard cluster simply
monitors the health of the cluster's components while the packages are
running on individual nodes. Any host system running in the
ServiceGuard cluster is called an active node. When you create the
package, you specify a primary node and one or more adoptive nodes.
Chapter 1 19
ServiceGuard for Linux at a Glance
What is ServiceGuard on Linux?
After this transfer, the package typically remains on the adoptive node
as long the adoptive node continues running. If you wish, however, you
can configure the package to return to its primary node as soon as the
primary node comes back online. Alternatively, you may manually
transfer control of the package back to the primary node at the
appropriate time.
Figure 1-2 does not show the power connections to the cluster, but these
are important as well. In order to remove all single points of failure from
the cluster, you should provide as many separate power circuits as
needed to prevent a single point of failure of your nodes, disks and disk
mirrors. Each power circuit should be protected by an uninterruptible
power source. For more details, refer to the section on “Power Supply
Planning” in Chapter 4, “Planning and Documenting an HA Cluster.”
ServiceGuard is designed to work in conjunction with other high
availability products, such as disk arrays, which use various RAID levels
for data protection; and HP-supported uninterruptible power supplies
(UPS), such as HP PowerTrust, which eliminates failures related to
power outage. These products are highly recommended along with
ServiceGuard to provide the greatest degree of availability.
20 Chapter 1
ServiceGuard for Linux at a Glance
Viewing ServiceGuard Clusters
Chapter 1 21
ServiceGuard for Linux at a Glance
Configuration Roadmap
Configuration Roadmap
This manual presents the tasks you need to perform in order to create a
functioning HA cluster using ServiceGuard. These tasks are shown in
Figure 1-4.
22 Chapter 1
Understanding Hardware Configurations for ServiceGuard on Linux
2 Understanding Hardware
Configurations for
ServiceGuard on Linux
This chapter gives a broad overview of how the Net Server hardware
components operate with ServiceGuard on Linux. The following topics
are presented:
Chapter 2 23
Understanding Hardware Configurations for ServiceGuard on Linux
Redundancy of Cluster Components
24 Chapter 2
Understanding Hardware Configurations for ServiceGuard on Linux
Redundant Network Components
Chapter 2 25
Understanding Hardware Configurations for ServiceGuard on Linux
Redundant Disk Storage
Disk Monitoring
You can configure monitoring for disks configured as multiple devices
and configure packages to be dependent on the monitor. For each
package, you define a package service that monitors the disks that are
activated by that package. If a disk failure occurs on one node, the
monitor will cause the package to fail, with the potential to fail over to a
different node on which the same disks are available.
26 Chapter 2
Understanding Hardware Configurations for ServiceGuard on Linux
Redundant Disk Storage
Chapter 2 27
Understanding Hardware Configurations for ServiceGuard on Linux
Redundant Power Supplies
28 Chapter 2
Understanding ServiceGuard Software Components
3 Understanding ServiceGuard
Software Components
• ServiceGuard Architecture
• How the Cluster Manager Works
• How the Package Manager Works
• How Package Control Scripts Work
• How the Network Manager Works
• Volume Managers for Data Storage
• Responses to Failures
If you are ready to start setting up ServiceGuard clusters, skip ahead to
Chapter 4, “Planning and Documenting an HA Cluster.”
Chapter 3 29
Understanding ServiceGuard Software Components
ServiceGuard Architecture
ServiceGuard Architecture
The following figure shows the main software components used by
ServiceGuard for Linux. This chapter discusses these components in
some detail.
ServiceGuard Daemons
The following daemon processes are associated with ServiceGuard for
Linux:
• cmclconfd—Configuration Daemon
• cmcld—Cluster Daemon
• cmlogd—Cluster System Log Daemon
• cmlocklund—Cluster Lock LUN Daemon
• cmomd—Cluster Object Manager Daemon
• cmsrvassistd—Service Assistant Daemon
• cmresmond—Resource Monitor Daemon
• qs—Quorum Server Daemon
30 Chapter 3
Understanding ServiceGuard Software Components
ServiceGuard Architecture
Each of these daemons logs to the Linux system logging files. The
quorum server daemon logs to the user specified log file, such as,
/usr/local/qs/log/qs.log file on Red Hat or /var/log/qs/sq.log on
UnitedLinux and cmomd logs to /usr/local/cmom/log/cmomd.log on
Red Hat or /var/log/cmom/log/cmomd.log on UnitedLinux.
Chapter 3 31
Understanding ServiceGuard Software Components
ServiceGuard Architecture
32 Chapter 3
Understanding ServiceGuard Software Components
ServiceGuard Architecture
the needs of the exact client query. This daemon is started by xinetd.
Relevant parameters are found in the /etc/xinetd.d/hacl-probe file.
The path for this daemon is: $SGLBIN/cmomd.
Chapter 3 33
Understanding ServiceGuard Software Components
ServiceGuard Architecture
34 Chapter 3
Understanding ServiceGuard Software Components
How the Cluster Manager Works
Heartbeat Messages
Central to the operation of the cluster manager is the sending and
receiving of heartbeat messages among the nodes in the cluster. Each
node in the cluster exchanges heartbeat messages with the cluster
coordinator over each TCP/IP network configured as a heartbeat device.
If a cluster node does not receive heartbeat messages from all other
cluster nodes within the prescribed time, a cluster re-formation is
initiated. At the end of the re-formation, if a new set of nodes form a
cluster, that information is passed to the package coordinator
(described further below, under “How the Package Manager Works”).
Packages which were running on nodes that are no longer in the new
cluster are transferred to their adoptive nodes. Note that if there is a
transitory loss of heartbeat, the cluster may re-form with the same nodes
Chapter 3 35
Understanding ServiceGuard Software Components
How the Cluster Manager Works
36 Chapter 3
Understanding ServiceGuard Software Components
How the Cluster Manager Works
Chapter 3 37
Understanding ServiceGuard Software Components
How the Cluster Manager Works
Cluster Lock
Although a cluster quorum of more than 50% is generally required,
exactly 50% of the previously running nodes may re-form as a new
cluster provided that the other 50% of the previously running nodes do
not also re-form. This is guaranteed by the use of a tie-breaker to choose
between the two equal-sized node groups, allowing one group to form the
cluster and forcing the other group to shut down. This tie-breaker is
known as a cluster lock. The cluster lock is implemented either by
means of a lock LUN or a quorum server. A cluster lock is required on
two-node clusters.
38 Chapter 3
Understanding ServiceGuard Software Components
How the Cluster Manager Works
ServiceGuard periodically checks the health of the lock LUN and writes
messages to the syslog file when a lock disk fails the health check. This
file should be monitored for early detection of lock disk problems. You can
also configure the Disk Monitor to check the lock LUN.
Chapter 3 39
Understanding ServiceGuard Software Components
How the Cluster Manager Works
The operation of the quorum server is shown in Figure 3-3. When there
is a loss of communication between node 1 and node 2, the quorum server
chooses one node (in this example, node 2) to continue running in the
cluster. The other node halts.
40 Chapter 3
Understanding ServiceGuard Software Components
How the Cluster Manager Works
Chapter 3 41
Understanding ServiceGuard Software Components
How the Cluster Manager Works
42 Chapter 3
Understanding ServiceGuard Software Components
How the Package Manager Works
Configuring Packages
Each package is separately configured. You create a package by editing a
package ASCII configuration file (detailed instructions are given in
Chapter 6). Then you use the cmapplyconf command to check and apply
Chapter 3 43
Understanding ServiceGuard Software Components
How the Package Manager Works
the package to the cluster configuration database. You also create the
package control script, which manages the execution of the package’s
services. Then the package is ready to run.
Package Switching
The AUTO_RUN parameter (known in earlier versions of ServiceGuard as
the PKG_SWITCHING_ENABLED parameter) defines the default global
switching attribute for the package at cluster startup, that is, whether
the package should be restarted automatically on a new node in response
to a failure, and whether it should be started automatically when the
cluster is started. Once the cluster is running, the package switching
attribute of each package can be set with the cmmodpkg command.
The parameter is coded in the package ASCII configuration file:
# The default for AUTO_RUN is YES. In the event of a
# failure,this permits the cluster software to transfer the package
# to an adoptive node. Adjust as necessary.
AUTO_RUN YES
A package switch involves moving packages and their associated IP
addresses to a new system. The new system must already have the same
subnetwork configured and working properly, otherwise the packages
will not be started. With package failovers, TCP connections are lost.
TCP applications must reconnect to regain connectivity; this is not
handled automatically. Note that if the package is dependent on multiple
subnetworks, all subnetworks must be available on the target node
before the package will be started.
The switching of relocatable IP addresses is shown in Figure 3-7 and
Figure 3-8. Figure 3-7 shows a two node cluster in its original state with
Package 1 running on Node 1 and Package 2 running on Node 2. Users
44 Chapter 3
Understanding ServiceGuard Software Components
How the Package Manager Works
connect to node with the IP address of the package they wish to use.
Each node has a stationary IP address associated with it, and each
package has an IP address associated with it.
Chapter 3 45
Understanding ServiceGuard Software Components
How the Package Manager Works
Figure 3-8 shows the condition where Node 1 has failed and Package 1
has been transferred to Node 2. Package 1’s IP address was transferred
to Node 2 along with the package. Package 1 continues to be available
and is now running on Node 2. Also note that Node 2 can now access both
Package 1’s disk and Package 2’s disk.
Failover Policy
The Package Manager selects a node for a package to run on based on the
priority list included in the package configuration file together with the
FAILOVER_POLICY parameter, also coded in the file. Failover policy
governs how the package manager selects which node to run a package
on when a specific node has not been identified and the package needs to
be started. This applies not only to failovers but also to startup for the
package, including the initial startup. The two failover policies are
CONFIGURED_NODE (the default) and MIN_PACKAGE_NODE. The parameter
is coded in the package ASCII configuration file:
46 Chapter 3
Understanding ServiceGuard Software Components
How the Package Manager Works
# Enter the failover policy for this package. This policy will be used
# to select an adoptive node whenever the package needs to be started.
# The default policy unless otherwise specified is CONFIGURED_NODE.
# This policy will select nodes in priority order from the list of
# NODE_NAME entries specified below.
#FAILOVER_POLICY CONFIGURED_NODE
If you use CONFIGURED_NODE as the value for the failover policy, the
package will start up on the highest priority node available in the node
list. When a failover occurs, the package will move to the next highest
priority node in the list that is available.
If you use MIN_PACKAGE_NODE as the value for the failover policy, the
package will start up on the node that is currently running the fewest
other packages. (Note that this does not mean the lightest load; the only
thing that is checked is the number of packages currently running on the
node.)
Chapter 3 47
Understanding ServiceGuard Software Components
How the Package Manager Works
When the cluster starts, each package starts as shown in Figure 3-9.
If a failure occurs, any package would fail over to the node containing
fewest running packages, as in Figure 3-10, which shows a failure on
node 2:
48 Chapter 3
Understanding ServiceGuard Software Components
How the Package Manager Works
If you use CONFIGURED_NODE as the value for the failover policy, the
package will start up on the highest priority node in the node list,
assuming that the node is running as a member of the cluster. When a
failover occurs, the package will move to the next highest priority node in
the list that is available.
Failback Policy
The use of the FAILBACK_POLICY parameter allows you to decide
whether a package will return to its primary node if the primary node
becomes available and the package is not currently running on the
primary node. The configured primary node is the first node listed in the
package’s node list.
The two possible values for this policy are AUTOMATIC and MANUAL. The
parameter is coded in the package ASCII configuration file:
# Enter the failback policy for this package. This policy will be used
# to determine what action to take during failover when a a package
# is not running on its primary node and its primary node is capable
# of running the package. Default is MANUAL which means no attempt
# will be made to move the package back to it primary node when it is
# running on an alternate node. The alternate policy is AUTOMATIC which
# means the package will be moved back to its primary node whenever the
# primary node is capable of running the package.
#FAILBACK_POLICY MANUAL
Chapter 3 49
Understanding ServiceGuard Software Components
How the Package Manager Works
50 Chapter 3
Understanding ServiceGuard Software Components
How the Package Manager Works
Node1 panics, and when the cluster reforms, pkgA starts running on
node 4:
After rebooting, node 1 rejoins the cluster. At that point, pkgA will be
automatically stopped on node 4 and restarted on node 1.
Chapter 3 51
Understanding ServiceGuard Software Components
How the Package Manager Works
52 Chapter 3
Understanding ServiceGuard Software Components
How the Package Manager Works
Chapter 3 53
Understanding ServiceGuard Software Components
How Package Control Scripts Work
54 Chapter 3
Understanding ServiceGuard Software Components
How Package Control Scripts Work
NOTE If you configure the package while the cluster is running, the package
does not start up immediately after the cmapplyconf command
completes. To start the package without halting and restarting the
cluster, you must issue the cmrunpkg or cmmodpkg command.
How does the package start up, and what is its behavior while it is
running? Some of the many phases of package life are shown in
Figure 3-15.
Chapter 3 55
Understanding ServiceGuard Software Components
How Package Control Scripts Work
56 Chapter 3
Understanding ServiceGuard Software Components
How Package Control Scripts Work
At any step along the way, an error will result in the script exiting
abnormally (with an exit code of 1). For example, if a package service is
unable to be started, the control script will exit with an error.
Also, if the run script execution is not complete before the time specified
in the RUN_SCRIPT_TIMEOUT, the package manager will kill the script.
During run script execution, messages are written to a log file in the
same directory as the run script. This log has the same name as the run
script and the extension .log. Normal starts are recorded in the log,
together with error messages or warnings related to starting the
package.
NOTE After the package run script has finished its work, it exits, which means
that the script is no longer executing once the package is running
normally. After the script exits, the PIDs of the services started by the
script are monitored by the package manager directly. If the service dies,
the package manager will then run the package halt script or, if
SERVICE_FAILFAST_ENABLED is set to YES, it will halt the node on which
the package is running. If a number of Restarts is specified for a service
in the package control script, the service may be restarted if the restart
count allows it, without re-running the package run script.
Chapter 3 57
Understanding ServiceGuard Software Components
How Package Control Scripts Work
58 Chapter 3
Understanding ServiceGuard Software Components
How Package Control Scripts Work
NOTE If you set <n> restarts and also set SERVICE_FAILFAST_ENABLED to YES,
the failfast will take place after <n> restart attempts have failed. It does
not make sense to set SERVICE_RESTART to “-R” for a service and also set
SERVICE_FAILFAST_ENABLED to YES.
Chapter 3 59
Understanding ServiceGuard Software Components
How Package Control Scripts Work
60 Chapter 3
Understanding ServiceGuard Software Components
How Package Control Scripts Work
At any step along the way, an error will result in the script exiting
abnormally (with an exit code of 1). Also, if the halt script execution is
not complete before the time specified in the HALT_SCRIPT_TIMEOUT, the
package manager will kill the script. During halt script execution,
messages are written to a log file in the same directory as the halt script.
This log has the same name as the halt script and the extension .log.
Normal starts are recorded in the log, together with error messages or
warnings related to halting the package.
Chapter 3 61
Understanding ServiceGuard Software Components
How Package Control Scripts Work
62 Chapter 3
Understanding ServiceGuard Software Components
How Package Control Scripts Work
Chapter 3 63
Understanding ServiceGuard Software Components
How Package Control Scripts Work
64 Chapter 3
Understanding ServiceGuard Software Components
How the Network Manager Works
Chapter 3 65
Understanding ServiceGuard Software Components
How the Network Manager Works
Load Sharing
In one package, it is possible to have multiple services that are
associated with the same IP address. If one service is moved to a new
system, then the other services using the IP address will also be
migrated. Load sharing can be achieved by making each service its own
package and giving it a unique IP address. This gives the administrator
the ability to move selected services to less loaded systems.
66 Chapter 3
Understanding ServiceGuard Software Components
How the Network Manager Works
You can bond the ports within a multi-ported networking card (cards
with up to four ports are currently available). Alternatively, you can bond
ports from different cards. Figure 3-18 shows an example of four
separate interfaces bonded into one aggregate.
Both the Single and Dual ported LANs in the non-bonded configuration
have four LAN cards, each associated with a separate non-aggregated IP
address and MAC address, and each with its own LAN name (eth1, eth2,
eth3, eth4). When these ports are aggregated, all four ports are
associated with a single IP address and MAC address. In this example,
the aggregated ports are collectively known as bond0, and this is the
name by which the bond is known during cluster configuration.
Figure 3-19 shows a bonded configuration using redundant hubs with a
crossover cable.
Chapter 3 67
Understanding ServiceGuard Software Components
How the Network Manager Works
68 Chapter 3
Understanding ServiceGuard Software Components
How the Network Manager Works
Remote Switching
A remote switch (that is, a package switch) involves moving packages
and their associated IP addresses to a new system. The new system must
already have the same subnetwork configured and working properly,
otherwise the packages will not be started. With remote switching, TCP
connections are lost. TCP applications must reconnect to regain
connectivity; this is not handled automatically. Note that if the package
is dependent on multiple subnetworks, all subnetworks must be
available on the target node before the package will be started.
The remote switching of relocatable IP addresses was shown previously
in Figure 3-7 and Figure 3-8.
Chapter 3 69
Understanding ServiceGuard Software Components
How the Network Manager Works
broadcast should update the associated ARP cache entry to reflect the
change. Currently, the ARP messages are sent at the time the IP address
is added to the new system. An ARP message is sent in the form of an
ARP request. The sender and receiver protocol address fields of the ARP
request message are both set to the same floating IP address. This
ensures that nodes receiving the message will not send replies.
70 Chapter 3
Understanding ServiceGuard Software Components
Volume Managers for Data Storage
Chapter 3 71
Understanding ServiceGuard Software Components
Volume Managers for Data Storage
NOTE LUN definition is normally done using utility programs provided by the
disk array manufacturer. Since arrays vary considerably, you should
refer to the documentation that accompanies your storage unit.
72 Chapter 3
Understanding ServiceGuard Software Components
Volume Managers for Data Storage
Figure 3-23 shows LUNs configured with a Smart Array cluster storage
with single pathways to the data.
Chapter 3 73
Understanding ServiceGuard Software Components
Volume Managers for Data Storage
Finally, the Smart Array LUNs are configured into volume groups as
shown in Figure 3-24.
74 Chapter 3
Understanding ServiceGuard Software Components
Volume Managers for Data Storage
NOTE LUN definition is normally done using utility programs provided by the
disk array manufacturer. Since arrays vary considerably, you should
refer to the documentation that accompanies your storage unit.
Chapter 3 75
Understanding ServiceGuard Software Components
Volume Managers for Data Storage
76 Chapter 3
Understanding ServiceGuard Software Components
Volume Managers for Data Storage
Finally, the multiple devices are configured into volume groups as shown
in Figure 3-27.
Monitoring Disks
The devices that are used for shared storage can be monitored by the
resource monitoring facility cmresmond. This daemon runs on all nodes
in the cluster and keeps track of the status of disks that are configured
for monitoring. A monitor server allows you to view the status of disks in
a standard web browser. Each package configuration includes
information about the disks that are to be activated by the package at
startup. If monitoring is used for a particular disk, or LUN, then the
health of the disk is checked at package startup. The package will fail if
the disk is not available.
Chapter 3 77
Understanding ServiceGuard Software Components
Volume Managers for Data Storage
The failure of a monitored disk will cause the monitor’s client service to
exit, with the consequent failure of the package on the node. When this
happens, the package may be restarted on another node. If AUTO_RUN is
set to YES, the package will start up on another eligible node, if it meets
all the requirements for startup. If AUTO_RUN is set to NO, then the
package simply halts without starting up anywhere else.
The process for configuring disk monitoring is described in “Creating a
Disk Monitor Configuration” on page 188.
78 Chapter 3
Understanding ServiceGuard Software Components
Responses to Failures
Responses to Failures
HP ServiceGuard responds to different kinds of failures in specific ways.
For most hardware failures, the response is not user-configurable, but for
package and service failures, you can choose the system’s response,
within limits.
Chapter 3 79
Understanding ServiceGuard Software Components
Responses to Failures
80 Chapter 3
Understanding ServiceGuard Software Components
Responses to Failures
reboot is successful, and a TOC does not take place. Either way, the
system will be guaranteed to come down within a predetermined number
of seconds.
In cases where package shutdown might hang, leaving the node in an
unknown state, the use of a Failfast option can provide a quick failover,
after which the node will be cleaned up on reboot. Remember, however,
that when the node crashes, all packages on the node are halted
abruptly.
The settings of node and service failfast parameters during package
configuration will determine the exact behavior of the package and the
node in the event of failure. The section on “Package Configuration
Parameters” in the “Planning” chapter contains details on how to choose
an appropriate failover behavior.
Service Restarts
You can allow a service to restart locally following a failure. To do this,
you indicate a number of restarts for each service in the package control
script. When a service starts, the variable RESTART_COUNT is set in the
service's environment. The service, as it executes, can examine this
variable to see whether it has been restarted after a failure, and if so, it
can take appropriate action such as cleanup.
Chapter 3 81
Understanding ServiceGuard Software Components
Responses to Failures
82 Chapter 3
Planning and Documenting an HA Cluster
• General Planning
• Hardware Planning
• Power Supply Planning
• Quorum Server Planning
• Volume Manager Planning
• Cluster Configuration Planning
• Package Configuration Planning
The description of each planning step in this chapter is accompanied by a
worksheet on which you can optionally record the parameters and other
data relevant for successful setup and maintenance. As you go through
each step, record all the important details of the configuration so as to
document your production system. During the actual configuration of the
cluster, refer to the information from these worksheets. A complete set of
blank worksheets is in Appendix D.
Chapter 4 83
Planning and Documenting an HA Cluster
NOTE Planning and installation overlap considerably, so you may not be able to
complete the worksheets before you proceed to the actual configuration.
In cases where the worksheet is incomplete, fill in the missing elements
to document the system as you proceed with the configuration.
84 Chapter 4
Planning and Documenting an HA Cluster
General Planning
General Planning
A clear understanding of your high availability objectives will quickly
help you to define your hardware requirements and design your system.
Use the following questions as a guide for general planning:
Chapter 4 85
Planning and Documenting an HA Cluster
General Planning
For example, if you have 10 packages in the cluster, you would require
800 KB (80x10), plus 6 MB for a total of 6.80 MB.
The total amount is needed on each node in the cluster, regardless of
whether a given package or resource is on that node or not.
86 Chapter 4
Planning and Documenting an HA Cluster
Hardware Planning
Hardware Planning
Hardware planning requires examining the physical hardware itself.
One useful procedure is to sketch the hardware configuration in a
diagram that shows adapter cards and buses, cabling, disks and
peripherals. A sample diagram for a two-node cluster is shown in
Figure 4-1.
Create a similar sketch for your own cluster, and record the information
on the Hardware Worksheet, shown in Figure 4-2 on page 91. Indicate
which device adapters occupy which slots, and determine the bus
address for each adapter. Update the details as you do the cluster
configuration (described in Chapter 5).
Use one form for each SPU.
Chapter 4 87
Planning and Documenting an HA Cluster
Hardware Planning
SPU Information
SPU information includes the basic characteristics of the server systems
you are using in the cluster. Different ProLiant servers can be mixed in
the same cluster. This includes both uniprocessor and multiprocessor
computers.
On the worksheet, include the following items:
Net Server Series Number
Enter the series number, e.g., LXR2000.
Host Name
Enter the name to be used on the system as the host
name.
Memory Capacity
Enter the memory in MB.
Number of I/O slots
Indicate the number of slots.
LAN Information
While a minimum of one LAN interface per subnet is required, at least
two LAN interfaces are needed to eliminate single points of network
failure.
It is recommended that you configure heartbeats on all subnets,
including those to be used for client data. On the worksheet, enter the
following for each LAN interface:
Subnet Name
Enter the IP address mask for the subnet. Note that
heartbeat IP addresses must be on the same subnet on
each node.
Interface Name
Enter the name of the LAN card as used by this node to
access the subnet. This name is shown by ifconfig
after you install the card.
88 Chapter 4
Planning and Documenting an HA Cluster
Hardware Planning
IP Address
Enter this node’s host IP address intended to be used
on this interface. The IP address is a string of digits
separated with periods in the form ‘nnn.nnn.nnn.nnn’.
If the interface is a standby and does not have an IP
address, enter ‘Standby.’
Kind of LAN Traffic
Identify the purpose of the subnet. Valid types include
the following:
• Heartbeat
• Client Traffic
Label the list to show the subnets that belong to a bridged net.
Information from this section of the worksheet is used in creating the
subnet groupings and identifying the IP addresses in the configuration
steps for the cluster manager and package manager.
Shared Storage
SCSI may be used for two-node clusters, or FibreChannel can be used for
clusters of up to 16 nodes.
NOTE The Smart Array cluster storage and Smart Array host adapters
automatically set the SCSI addresses. As a result, no user interaction is
required to change or modify any of these settings.
Chapter 4 89
Planning and Documenting an HA Cluster
Hardware Planning
FibreChannel
FibreChannel cards can be used to connect up to 16 nodes to a disk array
containing storage. After installation of the cards and the appropriate
driver, the LUNs configured on the storage unit are presented to the
operating system as device files, which can be used to build LVM volume
groups.
On the worksheet, enter the names of the device files that correspond to
each LUN for the Fibre-Channel-attached storage unit.
90 Chapter 4
Planning and Documenting an HA Cluster
Hardware Planning
You can obtain information about available disks by using the following
commands; your system may provide other utilities as well.
=============================================================================
SPU Information:
LAN Information:
Chapter 4 91
Planning and Documenting an HA Cluster
Hardware Planning
=============================================================================
Bus Type _SCSI_ Slot Number _4__ Address _16_ Disk Device File __c0t1d0_
Bus Type _SCSI_ Slot Number _6_ Address _24_ Disk Device File __c0t2d0_
Bus Type ______ Slot Number ___ Address ____ Disk Device File _________
Bus Type ______ Slot Number ___ Address ____ Disk Device File _________
Bus Type _FC___ LUN Number _4___ Address _16_ Disk Device File __c0t1d0_
Bus Type _FC___ LUN Number _6___ Address _24_ Disk Device File __c0t2d0_
Bus Type ______ LUN Number _____ Address ____ Disk Device File _________
Bus Type ______ LUN Number _____ Address ____ Disk Device File _________
92 Chapter 4
Planning and Documenting an HA Cluster
Power Supply Planning
Chapter 4 93
Planning and Documenting an HA Cluster
Power Supply Planning
==========================================================================
SPU Power:
===========================================================================
Disk Power:
===========================================================================
Tape Backup Power:
===========================================================================
Other Power:
94 Chapter 4
Planning and Documenting an HA Cluster
Quorum Server Planning
Chapter 4 95
Planning and Documenting an HA Cluster
Quorum Server Planning
OR
==============================================================================
96 Chapter 4
Planning and Documenting an HA Cluster
Volume Manager Planning
NOTE The multipath (md) device driver is available for use with FibreChannel
data storage devices, but not SCSI Smart Array storage devices at this
time.
Chapter 4 97
Planning and Documenting an HA Cluster
Volume Manager Planning
98 Chapter 4
Planning and Documenting an HA Cluster
Volume Manager Planning
==============================================================================
=============================================================================
Chapter 4 99
Planning and Documenting an HA Cluster
Cluster Configuration Planning
• The length of the cluster heartbeat interval and node timeout. They
should each be set as short as practical, but not shorter than
1000000 (one second) and 2000000 (two seconds), respectively. The
recommended value for heartbeat interval is 1000000 (one second),
and the recommended value for node timeout is within the 5 to 8
second range (5000000 to 8000000).
• The design of the run and halt instructions in the package control
script. They should be written for fast execution.
• The availability of raw disk access. Applications that use raw disk
access should be designed with crash recovery services.
• The application and database recovery time. They should be
designed for the shortest recovery time.
In addition, you must provide consistency across the cluster so that:
100 Chapter 4
Planning and Documenting an HA Cluster
Cluster Configuration Planning
Chapter 4 101
Planning and Documenting an HA Cluster
Cluster Configuration Planning
QS_POLLING_INTERVAL
The time (in microseconds) between attempts to
contact the quorum server to make sure it is running.
Default is 300,000,000 microseconds (5 minutes).This
parameter is not used if CLUSTER_LOCK_LUN is used.
QS_TIMEOUT_EXTENSION
The quorum server timeout is the time during which
the quorum server is not communicating with the
cluster. After this time, the cluster will mark the
quorum server DOWN. This time is calculated based on
ServiceGuard parameters, but you can increase it by
adding an additional number of microseconds as an
extension.
The QS_TIMEOUT_EXTENSION is an optional parameter.
A value higher than NODE_TIMEOUT will increase the
failover time. This parameter is not used if
CLUSTER_LOCK_LUN is used.
NODE_NAME The hostname of each system that will be a node in the
cluster. A cluster may contain up to 16 nodes. The node
name can contain up to 39 characters.
CLUSTER_LOCK_LUN
The pathname of the device file to be used for the lock
LUN on the previously specified node. This parameter
is not used if QS_HOST is used. The pathname can
contain up to 255 characters.
NETWORK_INTERFACE
The name of each LAN that will be used for heartbeats
or for user data. An example is ‘eth0’.
HEARTBEAT_IP
IP notation indicating the subnet that will carry the
cluster heartbeat. Note that heartbeat IP addresses
must be on the same subnet on each node.
102 Chapter 4
Planning and Documenting an HA Cluster
Cluster Configuration Planning
STATIONARY_IP
The IP address of each monitored subnet that does not
carry the cluster heartbeat. You can identify any
number of subnets to be monitored. If you want to
separate application data from heartbeat messages,
define a monitored non-heartbeat subnet here.
HEARTBEAT_INTERVAL
The normal interval between the transmission of
heartbeat messages from one node to the other in the
cluster. Enter a number of microseconds. The default
value is 1,000,000 microseconds; setting the parameter
to a value less than the default is not recommended.
The default should be used where possible. The
maximum value recommended is 15 seconds, and the
maximum value supported is 30 seconds. This value
should be at least half the value of NODE_TIMEOUT
(below).
NODE_TIMEOUT
The time after which a node may decide that the other
node has become unavailable and initiate cluster
reformation. Enter a number of microseconds. The
default value is 2,000,000 microseconds. Minimum is 2
* (Heartbeat Interval). The maximum recommended
value for this parameter is 30,000,000. The default
setting yields the fastest cluster reformations.
Chapter 4 103
Planning and Documenting an HA Cluster
Cluster Configuration Planning
104 Chapter 4
Planning and Documenting an HA Cluster
Cluster Configuration Planning
NETWORK_POLLING_INTERVAL
The frequency at which the networks configured for
ServiceGuard are checked. In the ASCII cluster
configuration file, this parameter is
NETWORK_POLLING_INTERVAL.
Default is 2,000,000 microseconds in the ASCII file.
Thus every 2 seconds, the network manager polls each
network interface to make sure it can still send and
receive information. Changing this value can affect
how quickly a network failure is detected.
The minimum value is 1,000,000 (1 second). The
maximum value recommended is 15 seconds, and the
maximum value supported is 30 seconds.
MAX_CONFIGURED_PACKAGES
This parameter sets the maximum number of packages
that can be configured in the cluster. Default is 0,
which means that you must set this parameter if you
want to use packages. The minimum value is 0, and the
maximum value is 150.
Set this parameter to a value that is high enough to
accommodate a reasonable amount of future package
additions without the need to bring down the cluster to
reset the parameter. However, be sure not to set the
parameter so high that memory is wasted. The use of
packages requires 6MB plus about 80 KB of lockable
memory on all cluster nodes.
Chapter 4 105
Planning and Documenting an HA Cluster
Cluster Configuration Planning
===============================================================================
Name and Nodes:
===============================================================================
Cluster Name: ___ourcluster_______________
===============================================================================
Cluster Lock Data:
===============================================================================
If using a quorum server:
Quorum Server Host Name or IP Address: __lp_qs __________________
===========================================================================
If using a lock LUN:
106 Chapter 4
Planning and Documenting an HA Cluster
Package Configuration Planning
NOTE Volume groups that are to be activated by packages must also be defined
as cluster aware in the cluster configuration file. See the previous section
on “Cluster Configuration Planning.”
Chapter 4 107
Planning and Documenting an HA Cluster
Package Configuration Planning
CAUTION Do not use /etc/fstab to mount file systems that are used by
ServiceGuard packages.
108 Chapter 4
Planning and Documenting an HA Cluster
Package Configuration Planning
Chapter 4 109
Planning and Documenting an HA Cluster
Package Configuration Planning
FAILBACK_POLICY
The policy used to determine what action the package
manager should take if the package is not running on
its primary node and its primary node is capable of
running the package.
Default is MANUAL, which means no attempt will be
made to move the package back to its primary node
when it is running on an alternate node. The alternate
policy is AUTOMATIC, which means that the package will
be halted and restarted on its primary node as soon as
the primary node is capable of running the package
and, if MIN_PACKAGE_NODE has been selected as the
Package Failover Policy, the primary node is now
running fewer packages than the current node.
NODE_NAME The names of primary and alternate nodes for the
package. Enter a node name for each node on which the
package can run.
The order in which you specify the node names is
important. First list the primary node name, then the
first adoptive node name, then the second adoptive
node name, followed, in order, by additional node
names. In a failover, control of the package will be
transferred to the next adoptive node name listed in
the package configuration file.
The node name can contain up to 39 characters.
AUTO_RUN This parameter determines how a package may start
up. If AUTO_RUN is set to YES, the package will start up
automatically on an eligible node if one is available,
and will be able to fail over automatically to another
node. If AUTO_RUN is set to NO, the package will not
start up automatically when the cluster starts running,
and will not be able to fail over automatically to
another node.
Default is YES, which allows a package to start up
normally on an available node. Enter YES or NO in the
package ASCII file. Note: Service Guard disables
AUTO_RUN automatically whenever the command
cmhaltpkg is executed. The user needs to re-enable
AUTO_RUN using the cmmodpkg -e <pkg> command.‘
110 Chapter 4
Planning and Documenting an HA Cluster
Package Configuration Planning
NODE_FAIL_FAST_ENABLED
In the event of the failure of the control script itself or
the failure of a subnet, if this parameter is set to YES,
ServiceGuard will issue a TOC on the node where the
control script fails.
Enter YES or NO. The default is NO.
If NODE_FAIL_FAST_ENABLED is set to YES, the node
where the package is running will be halted if one of
the following failures occurs:
Chapter 4 111
Planning and Documenting an HA Cluster
Package Configuration Planning
112 Chapter 4
Planning and Documenting an HA Cluster
Package Configuration Planning
SERVICE_FAIL_FAST_ENABLED
Enter YES or NO for each service. This parameter
indicates whether or not the failure of a service results
in the failure of a node. If the parameter is set to
Enabled, in the event of a service failure, ServiceGuard
will halt the node on which the service is running with
a TOC. (An attempt is first made to reboot the node
prior to the TOC.) The default is NO. Define one
SERVICE_FAIL_FAST_ENABLED entry for each service.
SERVICE_HALT_TIMEOUT
In the event of a service halt, ServiceGuard will first
send out a SIGTERM signal to terminate the service. If
the process is not terminated, ServiceGuard will wait
for the specified timeout before sending out the
SIGKILL signal to force process termination. Define
one SERVICE_HALT_TIMEOUT entry for each service.
Default is 300 seconds (5 minutes). The minimum is 1
second, and the maximum value is restricted only by
the UNIX parameter ULONG_MAX, for an absolute limit
of 4,294 seconds.
Define one SERVICE_HALT_TIMEOUT entry for each
service.
SUBNET Enter the IP subnets that are to be monitored for the
package, one per line.
Chapter 4 113
Planning and Documenting an HA Cluster
Package Configuration Planning
114 Chapter 4
Planning and Documenting an HA Cluster
Package Configuration Planning
Chapter 4 115
Planning and Documenting an HA Cluster
Package Configuration Planning
CONCURRENT_MOUNT_AND_UNMOUNT_OPERATIONS
Specifies the number of mounts and umounts to allow
during package startup or shutdown. The default is 1.
Setting this variable to a higher value may improve
performance while mounting or unmounting a large
number of file systems. If a value less than 1 is
specified, the script defaults the variable to 1 and
writes a warning message in the package control script
log file.
IP Addresses and SUBNETs
These are the IP addresses by which a package is
mapped to a LAN card. Indicate the IP addresses and
subnets for each IP address you want to add to an
interface card.
In the package control script file, these variables are
entered in pairs. Example IP[0]=192.10.25.12 and
SUBNET[0]=192.10.25.0. (In this case the subnet
mask is 255.255.255.0.)
HA_APP_SERVER
Specify that High Availability dependent servers are
being used with this package. One of the key servers
for HA is Network File System (NFS). You need to set
HA_APP_SERVER to yes in order to let the control script
verify, start, and stop the NFS daemons. This
parameter is for use only with certain HP supported
toolkits. The toolkits that currently use this parameter
(either pre_ or post_IP) include NFS, SAMBA, and
Apache. The default is to leave this parameter
commented out.
Service Name
Enter a unique name for each specific service within
the package. All services are monitored by
ServiceGuard. You may specify up to 30 services per
package. Each name must be unique within the cluster.
The service name is the name used by cmrunserv and
cmhaltserv inside the package control script. It must
be the same as the name specified for the service in the
package ASCII configuration file.
116 Chapter 4
Planning and Documenting an HA Cluster
Package Configuration Planning
Chapter 4 117
Planning and Documenting an HA Cluster
Package Configuration Planning
=============================================================================
Package Configuration File Data:
=============================================================================
Timeout: _NO_TIMEOUT_
Timeout: _NO_TIMEOUT_
118 Chapter 4
Planning and Documenting an HA Cluster
Package Configuration Planning
PATH______________________________________________________________
RAIDTAB____________________________________________________________
RAIDSTART__________________________RAIDSTOP________________________
VGCHANGE_________________________________
VG[0]___/dev/gv01____LV[0]___/dev/vg01/1v011______FS[0]____/mnt1___________
VG[1]__________________LV[1]______________________FS[1]____________________
VG[2]__________________LV[2]______________________FS[2]____________________
Chapter 4 119
Planning and Documenting an HA Cluster
Package Configuration Planning
120 Chapter 4
Building an HA Cluster Configuration
5 Building an HA Cluster
Configuration
This chapter and the next take you through the configuration tasks
required to set up a ServiceGuard cluster. These procedures are carried
out on one node, called the configuration node, and the resulting
binary file is distributed by ServiceGuard to all the nodes in the cluster.
In the examples in this chapter, the configuration node is named ftsys9,
and the sample target node is called ftsys10. This chapter describes the
following cluster configuration tasks:
Chapter 5 121
Building an HA Cluster Configuration
Preparing Your Systems
Throughout this document, system filenames are usually given with one
of these location prefixes. Thus, references to $SGCONF/<FileName> can
be resolved by supplying the definition of the prefix that is found in this
122 Chapter 5
Building an HA Cluster Configuration
Preparing Your Systems
2. Edit the /etc/man.config file to include the following line for Red
Hat:
MANPATH /usr/local/cmcluster/doc/man
For UnitedLinux:
MANPATH /opt/cmcluster/doc/man
Chapter 5 123
Building an HA Cluster Configuration
Preparing Your Systems
124 Chapter 5
Building an HA Cluster Configuration
Preparing Your Systems
NOTE The .rhosts file must not allow write access by group or other. If these
permissions are enabled, ServiceGuard commands may fail, logging a
“Permission Denied for User” message.
Chapter 5 125
Building an HA Cluster Configuration
Preparing Your Systems
The following example allows any non-root user to run the cmviewcl
command:
system1 root
system2 root
+
To avoid this problem, you can use the /etc/hosts file on all cluster
nodes instead of DNS or NIS. It is also recommended to make DNS
highly available either by using multiple DNS servers or by configuring
DNS into a ServiceGuard package.
A work around for the problem that still retains the ability to use
conventional name lookup is to configure the /etc/nsswitch.conf file
to search the /etc/hosts file when other lookup strategies are not
working. In case name services are not available, ServiceGuard
commands will then use the /etc/hosts file on the local system to do
name resolution. Of course, the names and IP addresses of all the nodes
in the cluster must be in the /etc/hosts file.
126 Chapter 5
Building an HA Cluster Configuration
Preparing Your Systems
Chapter 5 127
Building an HA Cluster Configuration
Setting up the Quorum Server
NOTE The term quorum server encompasses both the quorum service and the
quorum system (server) where the quorum service is installed and
operating.
128 Chapter 5
Building an HA Cluster Configuration
Setting up the Quorum Server
NOTE The quorum server reads the authorization file at startup. Whenever you
modify the file qs_authfile, run the following command to force a
re-read of the file. For example on a Red Hat distribution:
# /usr/local/qs/bin/qs -update
On a UnitedLinux distribution:
# /opt/qs/bin/qs -update
Chapter 5 129
Building an HA Cluster Configuration
Setting up the Quorum Server
130 Chapter 5
Building an HA Cluster Configuration
Setting up the Quorum Server
Parameter Value
PACKAGE_NAME qs-pkg
PACKAGE_TYPE FAILOVER
FAILOVER_POLICY CONFIGURED_NODE
FAILBACK_POLICY MANUAL
NODE_NAME *
AUTO_RUN YES
LOCAL_LAN_FAILOVER_ALLOWED YES
NODE_FAIL_FAST_ENABLED NO
RUN_SCRIPT $SGCONF/qs-pkg/qs-pkg.ctl
RUN_SCRIPT_TIMEOUT NO_TIMEOUT
HALT_SCRIPT $SGCONF/qs-pkg/qs-pkg.ctl
HALT_SCRIPT_TIMEOUT NO_TIMEOUT
SERVICE_NAME qs
SERVICE_FAIL_FAST_ENABLED NO
SERVICE_HALT_TIMEOUT 10
Parameter Value
Chapter 5 131
Building an HA Cluster Configuration
Setting up the Quorum Server
Parameter Value
SERVICE_NAME[0] “qs”
SERVICE_RESTART “-R”
132 Chapter 5
Building an HA Cluster Configuration
Setting up the Lock LUN
The following example of the fdisk dialog describes that the disk on the
device file /dev/sdc is set to Smart Array type partition, and appears as
follows:
# fdisk /dev/sdc
Command (m for help): n
Partition number (1-4): 1
HEX code (type L to list codes): 83
Command (m for help): 1
Command (m for help): 1
Chapter 5 133
Building an HA Cluster Configuration
Setting up the Lock LUN
NOTE The lock LUN is not configured using LVM. The partition type must be
83.
Do not configure multiple paths to lock LUN devices using md.
To transfer the disk partition format to other nodes in the cluster use the
command:
# sfdisk -R <device>
where <device> corresponds to the same physical device as on the first
node. For example, if /dev/sdc is the device name on the other nodes use
the command:
# sfdisk -R /dev/sdc
You can check the partition table by using the command:
# fdisk -l /dev/sdc
134 Chapter 5
Building an HA Cluster Configuration
Implementing Channel Bonding (Red Hat)
Sample Configuration
Configure the following files to support LAN redundancy. For a single
failover only one bond is needed.
Chapter 5 135
Building an HA Cluster Configuration
Implementing Channel Bonding (Red Hat)
136 Chapter 5
Building an HA Cluster Configuration
Implementing Channel Bonding (Red Hat)
bonding
options bond0 miimon=100 mode=1
options bond1 -o bonding1 miimon=100 mode=1
NOTE During configuration, you need to make sure that the active slaves for
the same bond on each node are connected the same hub. You can check
on this by examining the file /proc/net/bondx/info on each node. This
file will show the active slave for bond x.
Restarting Networking
Restart the networking subsystem. From the console of either node in the
cluster, execute the following command:
# /etc/rc.d/init.d/network restart
CAUTION Do not attempt to restart the network from a remote system connection
that travels through the network, as the network will go down before the
command can complete. This will result in the network being left in a
down state.
Chapter 5 137
Building an HA Cluster Configuration
Implementing Channel Bonding (Red Hat)
collisions:0 txqueuelen:0
138 Chapter 5
Building an HA Cluster Configuration
Implementing Channel Bonding (UnitedLinux 1.0)
Chapter 5 139
Building an HA Cluster Configuration
Implementing Channel Bonding (UnitedLinux 1.0)
140 Chapter 5
Building an HA Cluster Configuration
Implementing Channel Bonding (UnitedLinux 1.0)
Chapter 5 141
Building an HA Cluster Configuration
Creating the Logical Volume Infrastructure
142 Chapter 5
Building an HA Cluster Configuration
Creating the Logical Volume Infrastructure
NOTE You perform the LVM configuration of shared storage on only one node.
The disk partitions will be visible on other nodes as soon as you reboot
those nodes. After you build the multiple device configuration and you've
distributed the LVM configuration to all the cluster nodes then you will
be able to use LVM commands to switch which node uses a given volume
group. (In order to avoid data corruption, given volume group must be
active on only one node at a time).
CAUTION The minor numbers used by the LVM volume groups must be the same
on all cluster nodes. This means that if there are any non-shared volume
groups in the cluster, create the same number of them on all nodes, and
create them before you define the shared storage.
Chapter 5 143
Building an HA Cluster Configuration
Creating the Logical Volume Infrastructure
Creating Partitions
You must define a partition on each disk device (individual disk or LUN
in an array) that you want to use for your shared storage. Use the fdisk
command for this.
NOTE Do not use a type of fd (Linux RAID auto-detect). This type incorrectly
activates mirrors or multiple links at system boot time, and this is not
appropriate for ServiceGuard.
For Smart Array cluster storage, use a partition type of 8e (Linux LVM).
For FibreChannel cluster storage, use a partition type of 83 (Linux).
144 Chapter 5
Building an HA Cluster Configuration
Creating the Logical Volume Infrastructure
5. Last cylinder or +size or +sizeM Enter Accept the default, which is the
or +sizeK (1-nn, default nn): last cylinder number
The following example of the fdisk dialog shows that the disk on the
device file /dev/sdc is configured as one partition, and appears as
follows:
# fdisk /dev/sdc1
Command (m for help): n
Command action
e extended
p primary partition (1-4) p
Partition number (1-4): 1
First cylinder (1-4067, default 1): Enter
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-4067, default
4067): Enter
Using default value 4067
Chapter 5 145
Building an HA Cluster Configuration
Creating the Logical Volume Infrastructure
The following example of the fdisk dialog describes that the disk on
the device file /dev/sdc is set to Smart Array type partition, and
appears as follows:
# fdisk /dev/sdc1
Command (m for help): t
Partition number (1-4): 1
HEX code (type L to list codes): 8e
4. Repeat this process for each device file that you will use for shared
storage.
# fdisk /dev/sdd
146 Chapter 5
Building an HA Cluster Configuration
Creating the Logical Volume Infrastructure
# fdisk /dev/sdf
# fdisk /dev/sdg
5. If you will be creating volume groups for internal storage, make sure
to create those partitions as well, and create those volume groups
before you define the shared storage.
# fdisk /dev/sddb
NOTE Specify two paths only. The md facility will allow you to specify more
than two paths, however, HP ServiceGuard only supports up to two
paths.
Disk arrays are cabled to each cluster node using two separate
FibreChannel interface cards to provide redundant links to the data from
the node. The device files corresponding to each link must be grouped
together using the mkraid command. The following procedure should be
used. Before you start, use fdisk-1 be sure each device file has been
defined as a partition of type 83 (Linux).
Chapter 5 147
Building an HA Cluster Configuration
Creating the Logical Volume Infrastructure
device /dev/sdd1
raid-disk 1
#
In the example, a multiple path grouping md0 is created using
partitions /dev/sdc1 and /dev/sdd1. The raid-level setting of
multipath defines the multiple device as a multipath group.
2. Use the mkraid command on all cluster nodes to create the
multipath device files defined in the file. Example:
# mkraid -c $SGCONF/raidtab.sg /dev/md0
handling MD device /dev/md0
analyzing super-block
disk 0: /dev/sdc1, 8883913kB, raid superblock at 8883840kB
disk 1: /dev/sdd1, 8883913kB, raid superblock at 8883840kB
NOTE If the mkraid command returns an error saying that the multiple device
already exists, you may have a naming conflict with some other raidtab
file in another directory, and mkraid is trying to keep you from
overwriting someone else’s storage. If you are sure the devices are not in
use any more, you must first remove any LVM physical volume
definition that is on them using the LVM pvremove command and then
use mkraid --force to build the new device.
NOTE The multipath (md) device driver is available for use with FibreChannel
data storage devices, but not SCSI Smart Array storage devices at this
time.
148 Chapter 5
Building an HA Cluster Configuration
Creating the Logical Volume Infrastructure
For more information on LVM refer to the Logical Volume Manager How
To at www.linuxdoc.org/HowTo/LMV-HOWTO.html.
Use the following commands on one node:
1. Update the LVM configuration and create the /etc/lvmtab file. You
can omit this step if you have previously created volume groups on
this node.
# vgscan
2. Create “physical volumes’ out of each LUN in the Smart Array
Cluster Storage. For example:
# pvcreate -f /dev/cciss/c0d1p1
# pvcreate -f /dev/cciss/c0d2p1
# pvcreate -f /dev/cciss/c0d3p1
3. Check whether there are already volume groups defined on this
node. Be sure to give each volume group a unique name.
# vgdisplay
4. Create separate volume groups for each ServiceGuard package you
will define. In the following example, the Smart Array Cluster
Storage LUNs /dev/cciss/c0d1p1 and /dev/cciss/c0d2p1, which
are defined earlier as physical volumes, are added to volume group
vgpkgA and /dev/cciss/c0d3p1 is added to vgpkgB:
# vgcreate /dev/vgpkgA /dev/cciss/c0d1p1 /dev/cciss/c0d2p1
# vgcreate /dev/vgpkgB /dev/cciss/c0d3p1
Chapter 5 149
Building an HA Cluster Configuration
Creating the Logical Volume Infrastructure
Figure 5-1 shows these two volume groups as they are constructed
for the Smart Array Cluster Storage.
150 Chapter 5
Building an HA Cluster Configuration
Creating the Logical Volume Infrastructure
For more information on LVM see the Logical Volume Manager How To
on the Linux Documentation Project page at http://www.tldp.org.
Use the following steps on a node on which you have set up the raidtab
configuration file:
Chapter 5 151
Building an HA Cluster Configuration
Creating the Logical Volume Infrastructure
152 Chapter 5
Building an HA Cluster Configuration
Creating the Logical Volume Infrastructure
8. To test that the file system /extra was created correctly and with
high availability, you can create a file on it, and read it.
# echo "Test of LVM" >> /extra/LVM-test.ascii
# cat /extra/LVM-test.ascii
NOTE The minor numbers used by the LVM volume groups must be the same
on all cluster nodes. They will if all the nodes have the same number of
unshared volume groups.
For Smart Array Cluster Storage, omit all of the raidstart and
raidstop commands.
Chapter 5 153
Building an HA Cluster Configuration
Creating the Logical Volume Infrastructure
1. On ftsys9, activate the volume group, mount the file system that was
built on it, write onto the shared file system, and then unmount the
volume group again:
# vgchange -a y vgpkgB
# mount /dev/vgpkgB/lvol1 /extra
# echo ‘Written by’ ‘hostname‘ ‘on’ ‘date‘ >
/extra/datestamp
# cat /extra/datestamp
154 Chapter 5
Building an HA Cluster Configuration
Creating the Logical Volume Infrastructure
You should see the following, showing the datestamp written by the
other node:
Written by ftsys9.mydomain on Mon Jan 22 14:23:44 PST 2001
# umount /extra
# vgchange -a n vgpkgB
2. On ftsys10, activate the volume group, mount the file system, write a
datestamp on to the shared file, and then view the content of the file:
# vgchange -a y vgpkgB
# mount /dev/vgpkgB/lvol1 /extra
# echo ‘Written by’ ‘hostname‘ ‘on’ ‘date‘ >>
/extra/datestamp
# cat /extra/datestamp
The output should appear similar to the following, including the
datestamp written by the other node:
Written by ftsys9.mydomain on Mon Jan 22 14:23:44 PST 2001
Written by ftsys10.mydomain on Mon Jan 22 14:25:27 PST 2001
# umount /extra
# vgchange -a n vgpkgB
Chapter 5 155
Building an HA Cluster Configuration
Creating the Logical Volume Infrastructure
NOTE The lock LUN is not configured using LVM. The partition type must be
83.
Do not configure multiple paths to lock LUN devices using md.
156 Chapter 5
Building an HA Cluster Configuration
Configuring the Cluster
Modifying /etc/fstab
Red Hat installations by default use the label feature for specifying the
mount device using the keyword LABEL= or UUID= in the /etc/fstab file.
This usage can create hangs when running the mount, umount, and fsck
Chapter 5 157
Building an HA Cluster Configuration
Configuring the Cluster
In this case the entry LABEL=/xyz is used instead of a device file name,
so you need to replace it with the actual device file name. Use the
following procedure:
1. First, verify that the file system is already mounted at /xyz. You can
do this using the following command:
# df | grep "xyz"
If the output shows a line like the following, then the file system is
already mounted.
/dev/sda7 132207 14548 110833 12% /xyz
If this kind of line does not appear, you need to mount the file
system, as in the following:
# mount /xyz
2. After mounting the file system, issue the df | grep xyz command
again and this should give you the same output that was shown
before:
/dev/sda7 132207 14548 110833 12% /xyz
The first field on this line is the device file name, in this case
/dev/sda7.
3. Replace LABEL=/xyz with /dev/sda7 in /etc/fstab. The rest of the
fields on the same line need not be touched.
4. Do the same for every such line in /etc/fstab that uses LABEL= or
UUID= keywords.
Note that the system does not need to be rebooted after editing
/etc/fstab.
158 Chapter 5
Building an HA Cluster Configuration
Configuring the Cluster
Whenever you create file systems, check the /etc/fstab to make sure
that the entries do not use labels. If they do, use the above procedure to
change them.
# Enter a name for this cluster. This name will be used to identify the cluster
when viewing or manipulating it.
CLUSTER_NAME lxcluster
Chapter 5 159
Building an HA Cluster Configuration
Configuring the Cluster
NODE_NAME lptest3
NETWORK_INTERFACE eth0
HEARTBEAT_IP 15.13.172.231
NODE_NAME lptest4
NETWORK_INTERFACE eth0
HEARTBEAT_IP 15.13.172.232
160 Chapter 5
Building an HA Cluster Configuration
Configuring the Cluster
HEARTBEAT_INTERVAL 1000000
NODE_TIMEOUT 2000000
AUTO_START_TIMEOUT 600000000
NETWORK_POLLING_INTERVAL 2000000
The man page for the cmquerycl command lists the definitions of all the
parameters that appear in this file. Many are also described in the
“Planning” chapter. Modify your $SGCONF/clust1.config file to your
requirements, using the data on the cluster configuration worksheet.
In the file, keywords are separated from definitions by white space.
Comments are permitted, and must be preceded by a pound sign (#) in
the far left column. See the man page for the cmquerycl command for
more details.
Chapter 5 161
Building an HA Cluster Configuration
Configuring the Cluster
162 Chapter 5
Building an HA Cluster Configuration
Configuring the Cluster
Chapter 5 163
Building an HA Cluster Configuration
Configuring the Cluster
If you attempt to configure both a quorum server and a lock LUN, the
following message appears on standard output when issuing the
cmcheckconf or cmapplyconf command:
Duplicate cluster lock, line 55. Quorum Server already specified.
164 Chapter 5
Building an HA Cluster Configuration
Managing the Running Cluster
Chapter 5 165
Building an HA Cluster Configuration
Managing the Running Cluster
166 Chapter 5
Building an HA Cluster Configuration
Managing the Running Cluster
AUTOSTART_CMCLD=1
Chapter 5 167
Building an HA Cluster Configuration
Managing the Running Cluster
Single-Node Operation
Single-node operation occurs in a single-node cluster or in a multi-node
cluster, following a situation where all but one node has failed, or where
you have shut down all but one node, which will probably have
applications running. As long as the HP ServiceGuard daemon cmcld is
active, other nodes can re-join the cluster at a later time.
If the HP ServiceGuard daemon fails when in single-node operation, it
will leave the single node up and your applications running. This is
different from the loss of the HP ServiceGuard daemon in a multi-node
cluster, which halts the node with a TOC, and causes packages to be
switched to adoptive nodes. It is not necessary to halt the single node in
this scenario, since the application is still running, and no other node is
currently available for package switching. However, you should not try
to restart HP ServiceGuard, since data corruption might occur if another
node were to attempt to start up a new instance of the application that is
still running on the single node. Instead of restarting the cluster, choose
an appropriate time to shutdown and reboot the node, which will allow
the applications to shut down and then permit HP ServiceGuard to
restart the cluster after rebooting.
168 Chapter 5
Building an HA Cluster Configuration
Managing the Running Cluster
NOTE The cmdeleteconf command removes only the cluster binary file
$SGCONF/cmclconfig. It does not remove any other files from the
$SGCONF directory.
Although the cluster must be halted, all nodes in the cluster should be
powered up and accessible before you use the cmdeleteconf command. If
a node is powered down, power it up and boot. If a node is inaccessible,
you will see a list of inaccessible nodes together with the following
message:
Checking current status
cmdeleteconf: Unable to reach node lptest1.
WARNING: Once the unreachable node is up, cmdeleteconf
should be executed on the node to remove the configuration.
Chapter 5 169
Building an HA Cluster Configuration
Managing the Running Cluster
170 Chapter 5
Configuring Packages and Their Services
Chapter 6 171
Configuring Packages and Their Services
Creating the Package Configuration
Configuring in Stages
It is recommended to configure packages on the cluster in stages, as
follows:
172 Chapter 6
Configuring Packages and Their Services
Creating the Package Configuration
# Enter a name for this package. This name will be used to identify the
# package when viewing or manipulating it. It must be different from
# the other configured package names.
PACKAGE_NAME pkg1
PACKAGE_TYPE FAILOVER
# Enter the failover policy for this package. This policy will be used
# to select an adoptive node whenever the package needs to be started.
# The default policy unless otherwise specified is CONFIGURED_NODE.
# This policy will select nodes in priority order from the list of
# NODE_NAME entries specified below.
FAILOVER_POLICY CONFIGURED_NODE
# Enter the failback policy for this package. This policy will be used
# to determine what action to take when a package is not running on
# its primary node and its primary node is capable of running the
# package. The default policy unless otherwise specified is MANUAL.
# The MANUAL policy means no attempt will be made to move the package
# back to it primary node when it is running on an adoptive node.
#
# The alternative policy is AUTOMATIC. This policy will attempt to
Chapter 6 173
Configuring Packages and Their Services
Creating the Package Configuration
# move the package back to its primary node whenever the primary node
# is capable of running the package.
FAILBACK_POLICY MANUAL
# Enter the names of the nodes configured for this package. Repeat
# this line as necessary for additional adoptive nodes.
#
# NOTE: The order is relevant.
# Put the second Adoptive Node after the first one.
#
# Example : NODE_NAME original_node
# NODE_NAME adoptive_node
#
# If all nodes in the cluster are to be specified and order is not
# important, “NODE_NAME *” may be specified.
#
# Example: NODE_NAME *
NODE_NAME ftsys9
NODE_NAME ftsys10
# Enter the value for AUTO_RUN. Possible values are YES and NO.
# The default for AUTO_RUN is YES. When the cluster is started the
# package will be automaticaly started. In the event of a failure the
# package will be started on an adoptive node. Adjust as necessary.
#
# AUTO_RUN replaces obsolete PKG_SWITCHING_ENABLED.
AUTO_RUN YES
NODE_FAIL_FAST_ENABLED NO
# Enter the complete path for the run and halt scripts. In most cases
# the run script and halt script specified here will be the same script,
# the package control script generated by the cmmakepkg command. This
# control script handles the run(ning) and halt(ing) of the package.
# If the script has not completed by the specified timeout value,
# it will be terminated. The default for each script timeout is
# NO_TIMEOUT. Adjust the timeouts as necessary to permit full
# execution of each script.
# Note: The HALT_SCRIPT_TIMEOUT should be greater than the sum of
# all SERVICE_HALT_TIMEOUT values specified for all services.
RUN_SCRIPT /usr/local/cmcluster/conf/pkg1/control.sh
RUN_SCRIPT_TIMEOUT NO_TIMEOUT
HALT_SCRIPT /usr/local/cmcluster/conf/pkg1/control.sh
HALT_SCRIPT_TIMEOUT NO_TIMEOUT
174 Chapter 6
Configuring Packages and Their Services
Creating the Package Configuration
SERVICE_NAME service1
SERVICE_FAIL_FAST_ENABLED NO
SERVICE_HALT_TIMEOUT 300
# Enter the network subnet name that is to be monitored for this package.
# Repeat this line as necessary for additional subnet names. If any of
# the subnets defined goes down, the package will be switched to another
# node that is configured for this package and has all the defined subnets
# available.
SUBNET 15.16.168.0
Chapter 6 175
Configuring Packages and Their Services
Creating the Package Configuration
176 Chapter 6
Configuring Packages and Their Services
Writing the Package Control Script
Chapter 6 177
Configuring Packages and Their Services
Writing the Package Control Script
NOTE Use care in defining service run commands. Each run command is
executed by the control script in the following way:
If you need to define a set of run and halt operations in addition to the
defaults, create functions for them in the sections under the heading
CUSTOMER DEFINED FUNCTIONS.
178 Chapter 6
Configuring Packages and Their Services
Writing the Package Control Script
• CONCURRENT_MOUNT_AND_UMOUNT_OPERATIONS—defines a number of
parallel mount operations during package startup and unmount
operations during package shutdown.
The service_name must be the same as the name coded in the package
ASCII configuration file for the disk monitoring service. If service_name
is not included, cmconfigres will fail to find the monitored disks.
Chapter 6 179
Configuring Packages and Their Services
Writing the Package Control Script
. ${SGCONFFILE:=/etc/cmcluster.conf}
#
# REMOTE DATA REPLICATION DEFINITION
# Specify the remote data replication method.
# Leave the default, DATA_REP="none", if remote data replication is not used.
#
# If remote data replication is used for the package application data, set
# the variable DATA_REP to the data replication method. The current supported
# method is "clx".
#
DATA_REP="none"
#
# MD (RAID) COMMANDS
# Specify the method of activation and deactivation for md.
# Leave the default (RAIDSTART="raidstart", "RAIDSTOP="raidstop") if you want
# md to be started and stopped with default methods.
#
RAIDSTART="raidstart -c ${RAIDTAB}"
RAIDSTOP="raidstop -c ${RAIDTAB}"
# VOLUME GROUPS
# Specify which volume groups are used by this package. Uncomment VG[0]=""
# and fill in the name of your first volume group. You must begin with
# VG[0], and increment the list in sequence.
#
# For example, if this package uses your volume groups vg01 and vg02, enter:
# VG[0]=vg01
# VG[1]=vg02
#
# The volume group activation method is defined above. The filesystems
# associated with these volume groups are specified below. Ensure all the
# mds in the volume groups are included in the md activation above.
#
180 Chapter 6
Configuring Packages and Their Services
Writing the Package Control Script
#VG[0]=""
# MULTIPLE DEVICES
# Specify which md devices are used by this package. Uncomment MD[0]=""
# and fill in the name of your first multiple device. You must begin
# with MD[0], and increment the list in sequence. The md devices are
# defined in the RAIDTAB file specified above.
#
# For example, if this package uses multiple devices md0 and md1,
# enter:
# MD[0]=/dev/md0
# MD[1]=/dev/md1
#
#MD[0]=""
# FILESYSTEMS
# The filesystems are defined as entries specifying the logical
# volume, the mount point, the file system type, the mount,
# umount and fsck options.
# Each filesystem will be fsck'd prior to being mounted.
# The filesystems will be mounted in the order specified during package
# startup and will be unmounted in reverse order during package
# shutdown. Ensure that volume groups referenced by the logical volume
# definitions below are included in volume group definitions.
#
# Specify the filesystems which are used by this package. Uncomment
# LV[0]=""; FS[0]=""; FS_TYPE[0]=""; FS_MOUNT_OPT[0]="";
# FS_UMOUNT_OPT[0]=""; FS_FSCK_OPT[0]="" and fill in
# the name of your first logical volume, filesystem, type, mount,
# umount and fsck options for the file system.
# You must begin with LV[0], FS[0],
# FS_TYPE[0], FS_MOUNT_OPT[0], FS_UMOUNT_OPT[0], FS_FSCK_OPT[0]
# and increment the list in sequence.
#
# Valid types for FS_TYPE are 'ext2', 'ext3' and 'reiserfs'.
#
# For example, if this package uses the following:
# logical volume: /dev/vg01/lvol1 /dev/vg01/lvol2 /dev/vg01/lvol3
# mount point: /pkg1a /pkg1b /pkg1c
# filesystem type: ext2 ext3 reiserfs
# mount options: read/write read/write read/write
#
# Then the following would be entered:
# LV[0]=/dev/vg01/lvol1; FS[0]=/pkg1a; FS_TYPE[0]="ext2";
# FS_MOUNT_OPT[0]="-o rw"; FS_UMOUNT_OPT[0]=""; FS_FSCK_OPT[0]="";
#
# LV[1]=/dev/vg01/lvol2; FS[1]=/pkg1b; FS_TYPE[1]="ext3";
# FS_MOUNT_OPT[1]="-o rw"; FS_UMOUNT_OPT[1]=""; FS_FSCK_OPT[1]="";
#
# LV[2]=/dev/vg01/lvol3; FS[2]=/pkg1c; FS_TYPE[2]="reiserfs";
# FS_MOUNT_OPT[2]="-o rw"; FS_UMOUNT_OPT[2]=""; FS_FSCK_OPT[2]="";
#
#LV[0]=""; FS[0]=""; FS_TYPE[0]=""; FS_MOUNT_OPT[0]=""
#FS_UMOUNT_OPT[0]=""; FS_FSCK_OPT[0]=""
Chapter 6 181
Configuring Packages and Their Services
Writing the Package Control Script
# IP ADDRESSES
# Specify the IP and Subnet address pairs which are used by this package.
# Uncomment IP[0]="" and SUBNET[0]="" and fill in the name of your first
# IP and subnet address. You must begin with IP[0] and SUBNET[0] and
# increment the list in sequence.
#
# For example, if this package uses an IP of 192.10.25.12 and a subnet of
# 192.10.25.0 enter:
# IP[0]=192.10.25.12
# SUBNET[0]=192.10.25.0 # (netmask=255.255.255.0)
#
# Hint: the subnet can be obtained by AND masking the IP address and the
# netmask values from "ifconfig" command.
#
# IP/Subnet address pairs for each IP address you want to add to a subnet
# interface card. Must be set in pairs, even for IP addresses on the same
# subnet.
#
#IP[0]=""
#SUBNET[0]=""
# HA APPLICATION SERVER
# Enable or disable a High Availability application server that is used for
# this package. Some examples of the HA Servers are Network File System
# (NFS), Apache Web Server, and SAMBA (CIFS) Server.
#
# If you plan to use one of the HA server toolkits to run an application server,
# you need to set the HA_APP_SERVER value to either "pre-IP" or "post-IP" in
# order to enable this control script to check and run the Toolkit Interface
# Script (toolkit.sh) in the package directory. The interface script will call
# the toolkit main script to verify, start, and stop the server daemons.
#
182 Chapter 6
Configuring Packages and Their Services
Writing the Package Control Script
The above excerpt from the control script shows the assignment of values
to a set of variables. The remainder of the script uses these variables to
control the package by executing Logical Volume Manager commands,
Linux commands, and ServiceGuard commands including cmrunserv,
cmmodnet, and cmhaltserv. Examine a copy of the control script template
to see the flow of logic. Use the following command:
# cmmakepkg -s | more
The main function appears at the end of the script.
Chapter 6 183
Configuring Packages and Their Services
Writing the Package Control Script
Note that individual variables are optional; you should include only as
many as you need for proper package operation. For example, if your
package does not need to activate a volume group, omit the VG variables;
if the package does not use services, omit the corresponding
SERVICE_NAME, SERVICE_CMD, and SERVICE_RESTART variables; and so
on.
After customizing the script, distribute it to each node in the cluster
using rcp, ftp, or your favorite method of copying.
function customer_defined_run_cmds
{
# ADD customer defined run commands.
: # do nothing instruction, because a function must contain some
command.
date >> /tmp/pkg1.datelog
echo 'Starting pkg1' >> /tmp/pkg1.datelog
test_return 51
}
function customer_defined_halt_cmds
{
# ADD customer defined halt commands.
184 Chapter 6
Configuring Packages and Their Services
Writing the Package Control Script
Chapter 6 185
Configuring Packages and Their Services
Verifying the Package Configuration
186 Chapter 6
Configuring Packages and Their Services
Applying and Distributing the Configuration
NOTE cmcheckconf and cmapplyconf must be used again any time changes
are made to the cluster and package configuration files.
NOTE If using ftp, you have to set execute permissions on the copied file. rcp
keeps the permissions intact.
Chapter 6 187
Configuring Packages and Their Services
Creating a Disk Monitor Configuration
188 Chapter 6
Configuring Packages and Their Services
Creating a Disk Monitor Configuration
<logFile>/usr/local/cmcluster/log/ResMonServer.log</logFile>
<logLevel>0</logLevel>
<port>3542</port>
<serverPriority>
<schedClass>normal</schedClass>
<schedPriority>1</schedPriority>
</serverPriority>
<resourceConfigCategoryList>
<resourceCategory>
<categoryName>Pkg1</categoryName>
<agent>/usr/local/cmcluster/bin/cmcheckdisk</agent>
<agentTimeout>60</agentTimeout>
<pollingInterval>60</pollingInterval>
Chapter 6 189
Configuring Packages and Their Services
Creating a Disk Monitor Configuration
<resourceConfig>
<name>/dev/sdd1</name>
</resourceConfig>
<resourceConfig>
<name>/dev/sde1</name>
</resourceConfig>
</resourceCategory>
<resourceCategory>
<categoryName>Pkg2</categoryName>
<agent>/usr/local/cmcluster/bin/cmcheckdisk</agent>
<agentTimeout>60</agentTimeout>
<pollingInterval>60</pollingInterval>
<resourceConfig>
<name>/dev/sdf1</name>
</resourceConfig>
</resourceCategory>
</resourceConfigCategoryList>
</resourceMonitorServerConfig>
190 Chapter 6
Configuring Packages and Their Services
Creating a Disk Monitor Configuration
NOTE Using the sync option does not affect the monitoring configuration of any
package that is not being changed on the node.
Chapter 6 191
Configuring Packages and Their Services
Creating a Disk Monitor Configuration
192 Chapter 6
Cluster and Package Maintenance
This chapter describes the cmviewcl command, then shows how to start
and halt a cluster or an individual node, how to perform permanent
reconfiguration, and how to start, halt, move, and modify packages
during routine maintenance of the cluster. Topics are as follows:
Chapter 7 193
Cluster and Package Maintenance
Reviewing Cluster and Package States with the cmviewcl Command
Cluster Status
The status of a cluster may be one of the following:
194 Chapter 7
Cluster and Package Maintenance
Reviewing Cluster and Package States with the cmviewcl Command
• Failed. A node never sees itself in this state. Other active members
of the cluster will see a node in this state if that node was in an
active cluster, but is no longer, and is not halted.
• Reforming. A node is in this state when the cluster is re-forming.
The node is currently running the protocols which ensure that all
nodes agree to the new membership of an active cluster. If agreement
is reached, the status database is updated to reflect the new cluster
membership.
• Running. A node in this state has completed all required activity for
the last re-formation and is operating normally.
• Halted. A node never sees itself in this state. Other nodes will see it
in this state after the node has gracefully left the active cluster, for
instance with a cmhaltnode command.
• Unknown. A node never sees itself in this state. Other nodes assign a
node this state if it has never been an active cluster member.
Chapter 7 195
Cluster and Package Maintenance
Reviewing Cluster and Package States with the cmviewcl Command
• Starting. The start instructions in the control script are being run.
• Running. Services are active and being monitored.
• Halting. The halt instructions in the control script are being run.
Service Status
Services have only status, as follows:
Network Status
The network interfaces have only status, as follows:
• Up.
• Down.
196 Chapter 7
Cluster and Package Maintenance
Reviewing Cluster and Package States with the cmviewcl Command
Network_Parameters:
INTERFACE STATUS NAME
PRIMARY up eth0
PRIMARY up eth1
Chapter 7 197
Cluster and Package Maintenance
Reviewing Cluster and Package States with the cmviewcl Command
Policy_Parameters:
POLICY_NAME CONFIGURED_VALUE
Failover configured_node
Failback manual
Script_Parameters:
ITEM STATUS MAX_RESTARTS RESTARTS NAME
Service up 0 0 service1
Subnet up 0 0 15.13.168.0
Node_Switching_Parameters:
NODE_TYPE STATUS SWITCHING NAME
Primary up enabled ftsys9 (current)
Alternate up enabled ftsys10
Network_Parameters:
INTERFACE STATUS NAME
PRIMARY up eth0
PRIMARY up eth1
Policy_Parameters:
POLICY_NAME CONFIGURED_VALUE
Failover configured_node
Failback manual
Script_Parameters:
ITEM STATUS MAX_RESTARTS RESTARTS NAME
Service up 0 0 service2
Subnet up 0 0 15.13.168.0
Node_Switching_Parameters:
NODE_TYPE STATUS SWITCHING NAME
Primary up enabled ftsys10 (current)
Alternate up enabled ftsys9
198 Chapter 7
Cluster and Package Maintenance
Reviewing Cluster and Package States with the cmviewcl Command
Network_Parameters:
INTERFACE STATUS NAME
PRIMARY up eth0
PRIMARY up eth1
Policy_Parameters:
POLICY_NAME CONFIGURED_VALUE
Failover configured_node
Failback manual
Script_Parameters:
ITEM STATUS MAX_RESTARTS RESTARTS NAME
Service up 0 0 service1
Subnet up 0 0 15.13.168.0
Node_Switching_Parameters:
NODE_TYPE STATUS SWITCHING NAME
Primary up enabled ftsys9 (current)
Alternate up enabled ftsys10
Network_Parameters:
INTERFACE STATUS NAME
PRIMARY up eth0
PRIMARY up eth1
UNOWNED_PACKAGES
Chapter 7 199
Cluster and Package Maintenance
Reviewing Cluster and Package States with the cmviewcl Command
Policy_Parameters:
POLICY_NAME CONFIGURED_VALUE
Failover configured_node
Failback manual
Script_Parameters:
ITEM STATUS NODE_NAME NAME
Service up 0 0 service2
Subnet up 0 0 15.13.168.0
Node_Switching_Parameters:
NODE_TYPE STATUS SWITCHING NAME
Primary up enabled ftsys10
Alternate up enabled ftsys9
Pkg2 now has the status “down”, and it is shown as in the unowned
state, with package switching disabled. Note that switching is enabled
for both nodes, however. This means that once global switching is
re-enabled for the package, it will attempt to start up on the primary
node.
Network_Parameters:
INTERFACE STATUS NAME
PRIMARY up eth0
PRIMARY up eth1
Policy_Parameters:
POLICY_NAME CONFIGURED_VALUE
Failover configured_node
Failback manual
Script_Parameters:
ITEM STATUS MAX_RESTARTS RESTARTS NAME
Service up 0 0 service1
Subnet up 0 0 15.13.168.0
200 Chapter 7
Cluster and Package Maintenance
Reviewing Cluster and Package States with the cmviewcl Command
Node_Switching_Parameters:
NODE_TYPE STATUS SWITCHING NAME
Primary up enabled ftsys9 (current)
Alternate up enabled ftsys10
Policy_Parameters:
POLICY_NAME CONFIGURED_VALUE
Failover configured_node
Failback manual
Script_Parameters:
ITEM STATUS NAME MAX_RESTARTS RESTARTS
Service up 0 0 service2
Subnet up 0 0 15.13.168.0
Node_Switching_Parameters:
NODE_TYPE STATUS SWITCHING NAME
Primary up enabled ftsys10
Alternate up enabled ftsys9 (current)
Network_Parameters:
INTERFACE STATUS NAME
PRIMARY up eth0
PRIMARY up eth1
Now pkg2 is running on node ftsys9. Note that it is still disabled from
switching.
Chapter 7 201
Cluster and Package Maintenance
Reviewing Cluster and Package States with the cmviewcl Command
Both packages are now running on ftsys9 and pkg2 is enabled for
switching. Ftsys10 is running the daemon and no packages are running
on ftsys10.
Policy_Parameters:
POLICY_NAME CONFIGURED_VALUE
Failover min_package_node
Failback automatic
Script_Parameters:
ITEM STATUS NODE_NAME NAME
Subnet up manx 192.8.15.0
Subnet up burmese 192.8.15.0
Subnet up tabby 192.8.15.0
Subnet up persian 192.8.15.0
202 Chapter 7
Cluster and Package Maintenance
Reviewing Cluster and Package States with the cmviewcl Command
Node_Switching_Parameters:
NODE_TYPE STATUS SWITCHING NAME
Primary up enabled manx
Alternate up enabled burmese
Alternate up enabled tabby
Alternate up enabled persian
Chapter 7 203
Cluster and Package Maintenance
Using ServiceGuard Manager
204 Chapter 7
Cluster and Package Maintenance
Using ServiceGuard Manager
Option Description
Chapter 7 205
Cluster and Package Maintenance
Using ServiceGuard Manager
# /usr/local/sgmgr/bin/sgmgr -c <clustername>
• From the United Linux management station, enter the sgmgr
command from a terminal window in the install directory, typically:
# export DISPLAY=mydisplay:0.0
# /opt/sgmgr/bin/sgmgr -c <clustername>
• From the Windows management station:
206 Chapter 7
Cluster and Package Maintenance
Using ServiceGuard Manager
Chapter 7 207
Cluster and Package Maintenance
Using ServiceGuard Manager
• From the Red Hat management station, enter the sgmgr command
from a terminal window in the install directory, typically:
# export DISPLAY=mydisplay:0.0
# /usr/local/sgmgr/bin/sgmgr
• From the UnitedLinux management station, enter the sgmgr
command from a terminal window in the install directory, typically:
# export DISPLAY=mydisplay:0.0
# /opt/sgmgr/bin/sgmgr
• From the Windows management station, choose one of the following:
1. Go to:
C:\Program Files\Hewlett-Packard\ServiceGuard
Manager\bin
208 Chapter 7
Cluster and Package Maintenance
Using ServiceGuard Manager
Chapter 7 209
Cluster and Package Maintenance
Using ServiceGuard Manager
Enter the name of an object manager node, together with a valid user
name and password. Valid users appear in the /$SGCONF/cmclnodelist
or .rhosts file on the Object Manager server.
210 Chapter 7
Cluster and Package Maintenance
Using ServiceGuard Manager
Chapter 7 211
Cluster and Package Maintenance
Using ServiceGuard Manager
212 Chapter 7
Cluster and Package Maintenance
Using ServiceGuard Manager
To display the objects within a specific cluster, double click the cluster
icon, which will display a screen like the one in Figure 7-6.
Chapter 7 213
Cluster and Package Maintenance
Using ServiceGuard Manager
For a display of an object’s property sheet, click on the object, then click
on “Properties” in the tool bar at the top of the screen. A cluster property
sheet is shown in Figure 7-7.
214 Chapter 7
Cluster and Package Maintenance
Using ServiceGuard Manager
Obtaining Help
To obtain online help, click on the “Help” menu item at the top of the
screen. The top level help screen is shown in Figure 7-8.
Chapter 7 215
Cluster and Package Maintenance
Using ServiceGuard Manager
216 Chapter 7
Cluster and Package Maintenance
Using ServiceGuard Manager
Chapter 7 217
Cluster and Package Maintenance
Using ServiceGuard Manager
218 Chapter 7
Cluster and Package Maintenance
Using ServiceGuard Manager
Chapter 7 219
Cluster and Package Maintenance
Viewing Status of Monitored Disks
220 Chapter 7
Cluster and Package Maintenance
Viewing Status of Monitored Disks
# cmviewres /dev/sdb1
Resource: /dev/sdb1
Category: pkg23837_1
Status: down
Timeout (seconds): 60.00
Polling Interval (seconds): 60.00
Chapter 7 221
Cluster and Package Maintenance
Managing the Cluster and Nodes
NOTE Manually starting or halting the cluster or individual nodes does not
require access to the quorum server, if one is configured. The quorum
server is only used when tie-breaking is needed following a cluster
partition.
222 Chapter 7
Cluster and Package Maintenance
Managing the Cluster and Nodes
Chapter 7 223
Cluster and Package Maintenance
Managing the Cluster and Nodes
224 Chapter 7
Cluster and Package Maintenance
Managing the Cluster and Nodes
Chapter 7 225
Cluster and Package Maintenance
Managing the Cluster and Nodes
Changing MAX_CONFIGURED_PACKAGES
Use the cmgetconf command to obtain a current copy of the cluster's
existing configuration. Example:
# cmgetconf -C clconfig.ascii
Edit the clconfig.ascii file to include the desired value for
MAX_CONFIGURED_PACKAGES. Then use the cmcheckconf command to
verify the new configuration. Use the cmapplyconf command to apply
the changes to the configuration and send the new configuration file to
all cluster nodes.
226 Chapter 7
Cluster and Package Maintenance
Managing the Cluster and Nodes
Chapter 7 227
Cluster and Package Maintenance
Reconfiguring a Running Cluster
• You cannot remove an active node from the cluster. You must halt
the node first.
• You cannot change cluster timing parameters.
• The only configuration change allowed while a node is unreachable
(for example, completely disconnected from the network) is to delete
the unreachable node from the cluster configuration. If there are also
packages that depend upon that node, the package configuration
must also be modified to delete the node. This all must be done in one
configuration request (cmapplyconf command).
Changes to the package configuration are described in a later section.
Table 7-2 Types of Changes to Permanent Cluster Configuration
228 Chapter 7
Cluster and Package Maintenance
Reconfiguring a Running Cluster
1. Halt the node, which you are planning to remove by using the
following command:
# cmhaltnode -f ftsys10
Chapter 7 229
Cluster and Package Maintenance
Reconfiguring a Running Cluster
6. Apply the changes to the configuration and send the new binary
configuration file to all cluster nodes:
# cmapplyconf -C clconfig.ascii
Use cmrunnode to start the new node, and, if desired, set the
AUTOSTART_CMCLD parameter to 1 in the $SGAUTOSTART file to enable the
new node to join the cluster automatically each time it reboots.
230 Chapter 7
Cluster and Package Maintenance
Managing Packages and Services
• Starting a Package
• Halting a Package
• Moving a Package
• Reconfiguring a Package on a Halted Cluster
Starting a Package
Ordinarily, a package configured as part of the cluster will start up on its
primary node when the cluster starts up. You may need to start a
package manually after it has been halted manually. You can do this
either in ServiceGuard Manager or with HP ServiceGuard commands.
Chapter 7 231
Cluster and Package Maintenance
Managing Packages and Services
Halting a Package
You halt an HP ServiceGuard package when you wish to bring the
package out of use but wish the node to continue in operation. You can
halt a package using ServiceGuard Manager or HP ServiceGuard
commands. Halting a package has a different effect than halting the
node. When you halt the node, its packages may switch to adoptive nodes
(assuming that switching is enabled for them); when you halt the
package, it is disabled from switching to another node, and must be
restarted manually on another node or on the same node.
Moving a Package
You can use ServiceGuard Manager or HP ServiceGuard commands to
move a package from one node to another.
232 Chapter 7
Cluster and Package Maintenance
Managing Packages and Services
Chapter 7 233
Cluster and Package Maintenance
Reconfiguring a Package on a Running Cluster
234 Chapter 7
Cluster and Package Maintenance
Reconfiguring a Package on a Running Cluster
To create the package, follow the steps given in the chapter “Configuring
Packages and Services” with the following difference: do not specify the
cluster ASCII file when verifying and distributing the configuration with
the cmapplyconf command. For example, to verify the configuration of
newly created pkg1 on a running cluster:
# cmcheckconf -P $SGCONF/pkg1/pkg1conf.ascii
Use a command like the following to distribute the new package
configuration to all nodes in the cluster:
# cmapplyconf -P $SGCONF/conf/pkg1/pkg1conf.ascii
Remember to copy the control script to the $SGCONF/pkg1 directory on all
nodes that can run the package.
Chapter 7 235
Cluster and Package Maintenance
Reconfiguring a Package on a Running Cluster
NOTE The maximum number of allowable restarts for a given service is set in
the package control script parameter SERVICE_RESTART[]. This
parameter is not the same as the restart counter, which is maintained
separately by the package manager.
236 Chapter 7
Cluster and Package Maintenance
Reconfiguring a Package on a Running Cluster
Change to the
Package Required Package State
Chapter 7 237
Cluster and Package Maintenance
Reconfiguring a Package on a Running Cluster
Change to the
Package Required Package State
238 Chapter 7
Cluster and Package Maintenance
Responding to Cluster Events
Chapter 7 239
Cluster and Package Maintenance
Single-Node Operation
Single-Node Operation
The number of nodes you will need for your ServiceGuard cluster
depends on the processing requirements of the applications you want to
protect. In a multi-node cluster, you could have a situation where all but
one node has failed, or where you have shut down all but one node,
leaving your cluster in single-node operation. This remaining node will
probably have applications running on it. As long as the ServiceGuard
daemon cmcld is active, other nodes can re-join the cluster at a later
time.
If the ServiceGuard daemon fails when in single-node operation, it will
leave the single node up and your applications running. This is different
from the loss of the ServiceGuard daemon in a multi-node cluster, which
halts the node with a TOC, and causes packages to be switched to
adoptive nodes. It is not necessary to halt the single node in this
scenario, since the application is still running, and no other node is
currently available for package switching.
You should not try to restart ServiceGuard, since data corruption might
occur if another node were to attempt to start up a new instance of the
application that is still running on the single node.
Instead of restarting the cluster, choose an appropriate time to shutdown
and reboot the node, which will allow the applications to shut down and
then permit ServiceGuard to restart the cluster after rebooting.
240 Chapter 7
Cluster and Package Maintenance
Removing ServiceGuard from a System
• The cluster should not be running on the node from which you will be
deleting ServiceGuard.
• The node from which you are deleting ServiceGuard should not be in
the cluster configuration.
• If you are removing ServiceGuard from more than one node, rpm -e
should be issued on one node at a time.
Chapter 7 241
Cluster and Package Maintenance
Removing ServiceGuard from a System
242 Chapter 7
Troubleshooting Your Cluster
Chapter 8 243
Troubleshooting Your Cluster
Testing Cluster Operation
CAUTION In testing the cluster in the following procedures, be aware that you are
causing various components of the cluster to fail, so that you can
determine that the cluster responds correctly to failure situations. As a
result, the availability of nodes and applications may be disrupted.
244 Chapter 8
Troubleshooting Your Cluster
Testing Cluster Operation
Chapter 8 245
Troubleshooting Your Cluster
Testing Cluster Operation
246 Chapter 8
Troubleshooting Your Cluster
Monitoring Hardware
Monitoring Hardware
Good standard practice in handling a high availability system includes
careful fault monitoring so as to prevent failures if possible or at least to
react to them swiftly when they occur. Disks can be monitored using the
Disk Monitor daemon, which is described in Chapter 5. In addition, the
following should be monitored for errors or warnings of all kinds:
• CPUs
• Memory
• LAN cards
• Power sources
• All cables
• Disk interface cards
Some monitoring can be done through simple physical inspection, but for
the most comprehensive monitoring, you should examine the system log
file (/var/log/messages) periodically for reports on all configured HA
devices. The presence of errors relating to a device will show the need for
maintenance.
Chapter 8 247
Troubleshooting Your Cluster
Replacing Disks
Replacing Disks
The procedure for replacing a faulty disk mechanism depends on the
type of disk configuration you are using. Refer to your Smart Array
documentation for issues related to your Smart Array.
248 Chapter 8
Troubleshooting Your Cluster
Replacing Disks
If the path to /dev/sda failed then before the failure the /proc/mdstat
file would look like:
Personalities: [multipath]
read_ahead 1024 sectors
md0 : active multipath sde1 [1] sda1 [0]
5237056 blocks [1/1[] [U]
unused devices: <none>
If the failure is in the HBA, then the server must be taken down for
repair. If the failure is the result of something such as a pulled
FibreChannel cable between the HBA and the switch, perform the
following to re-enable the path. For the example, the commands are run
from the same directory as the raidtab file.
raidsetfaulty -c raidtab /dev/md0 /dev/sda1
raidhotremove -c raidtab /dev/md0 /dev/sda1
sfdisk -R /dev/sda
raidhotadd -c raidtab /dev/md0 /dev/sda1
To list the partition information use the fdisk -l /dev/sda command.
Another area of possible concern is if the path that has failed is the path
to the first device in the raidtab file, in the example, /dev/sda1, then
that md device will not start. Manually or through a package start up
script, change the order of the devices in the raidtab file. After the failed
path is repaired, run the sfdisk and raidhotadd commands.
If the system is rebooted when a path is down, Linux will re-order the
disk names, for example the old /dev/sde might become /dev/sda. If
this occurs, correct the path before allowing the node back into the
cluster.
Chapter 8 249
Troubleshooting Your Cluster
Replacement of LAN Cards
250 Chapter 8
Troubleshooting Your Cluster
Replacing a Failed Quorum Server System
NOTE The quorum server reads the authorization file at startup. Whenever
you modify the file qs_authfile, run the following command to force
a re-read of the file. For example on a Red Hat distribution:
# /usr/local/qs/bin/qs -update
On a UnitedLinux distribution:
# /opt/qs/bin/qs -update
Chapter 8 251
Troubleshooting Your Cluster
Replacing a Failed Quorum Server System
NOTE While the old quorum server is down and the new one is being set up:
WARNING Make sure that the old system does not re-join the network with
the old IP address.
252 Chapter 8
Troubleshooting Your Cluster
Troubleshooting Approaches
Troubleshooting Approaches
The following sections offer a few suggestions for troubleshooting by
reviewing the state of the running system and by examining cluster
status data, log files, and configuration files. Topics include:
Chapter 8 253
Troubleshooting Your Cluster
Troubleshooting Approaches
collisions:6 txqueuelen:100
Interrupt:9 Base address:0xda00
254 Chapter 8
Troubleshooting Your Cluster
Troubleshooting Approaches
Chapter 8 255
Troubleshooting Your Cluster
Troubleshooting Approaches
256 Chapter 8
Troubleshooting Your Cluster
Troubleshooting Approaches
Chapter 8 257
Troubleshooting Your Cluster
Solving Problems
Solving Problems
Problems with ServiceGuard may be of several types. The following is a
list of common categories of problem:
If the output of this command does not include the correct IP address of
the node, then check your name resolution services further.
Cluster Re-formations
Cluster re-formations may occur from time to time due to current cluster
conditions. Some of the causes are as follows:
• local switch on an Ethernet LAN if the switch takes longer than the
cluster NODE_TIMEOUT value. To prevent this problem, you can
increase the cluster NODE_TIMEOUT value.
258 Chapter 8
Troubleshooting Your Cluster
Solving Problems
Chapter 8 259
Troubleshooting Your Cluster
Solving Problems
260 Chapter 8
Troubleshooting Your Cluster
Solving Problems
Chapter 8 261
Troubleshooting Your Cluster
Solving Problems
• TOC
• Kernel Oops
• Hangs
• Power failures
You can use the following commands to check the status of your network
and subnets:
262 Chapter 8
Troubleshooting Your Cluster
Solving Problems
This condition can be ignored. When the failure happens, the QS client
within cmcld on the coordinator node does not log anything, but tries the
request again within a few seconds. This request succeeds because the
connections to all nodes have completed. The following message is
logged:
Oct 008 16:10:06:0: Request for lock /sg/lockTest1
succeeded. New lock owners: 1,2.
Chapter 8 263
Troubleshooting Your Cluster
Solving Problems
264 Chapter 8
ServiceGuard Commands
A ServiceGuard Commands
Command Description
Appendix A 265
ServiceGuard Commands
Command Description
266 Appendix A
ServiceGuard Commands
Command Description
Appendix A 267
ServiceGuard Commands
Command Description
268 Appendix A
ServiceGuard Commands
Command Description
Appendix A 269
ServiceGuard Commands
Command Description
270 Appendix A
ServiceGuard Commands
Command Description
Appendix A 271
ServiceGuard Commands
Command Description
272 Appendix A
ServiceGuard Commands
Command Description
Appendix A 273
ServiceGuard Commands
Command Description
274 Appendix A
ServiceGuard Commands
Command Description
Appendix A 275
ServiceGuard Commands
276 Appendix A
Designing Highly Available Cluster Applications
Appendix B 277
Designing Highly Available Cluster Applications
Automating Application Operation
278 Appendix B
Designing Highly Available Cluster Applications
Automating Application Operation
Appendix B 279
Designing Highly Available Cluster Applications
Controlling the Speed of Application Failover
280 Appendix B
Designing Highly Available Cluster Applications
Controlling the Speed of Application Failover
Appendix B 281
Designing Highly Available Cluster Applications
Controlling the Speed of Application Failover
Keeping the size of the on-disk log small allows the log to be archived or
replicated more frequently, reducing the risk of data loss if a disaster
were to occur. There is, of course, a trade-off between online performance
and the size of the log.
282 Appendix B
Designing Highly Available Cluster Applications
Controlling the Speed of Application Failover
Use Checkpoints
Design applications to checkpoint complex transactions. A single
transaction from the user's perspective may result in several actual
database transactions. Although this issue is related to restartable
transactions, here it is advisable to record progress locally on the client
so that a transaction that was interrupted by a system failure can be
completed after the failover occurs.
For example, suppose the application being used is calculating PI. On the
original system, the application has gotten to the 1,000th decimal point,
but the application has not yet written anything to disk. At that moment
in time, the node crashes. The application is restarted on the second
node, but the application is started up from scratch. The application
must recalculate those 1,000 decimal points. However, if the application
had written to disk the decimal points on a regular basis, the application
could have restarted from where it left off.
Appendix B 283
Designing Highly Available Cluster Applications
Controlling the Speed of Application Failover
For example, rather than having a single application which fails over to a
second system, consider having both systems running the application.
After a failure of the first system, the second system simply takes over
the load of the first system. This eliminates the start up time of the
application. There are many ways to design this sort of architecture, and
there are also many issues with this sort of design. This discussion will
not go into details other than to give a few examples.
The simplest method is to have two applications running in a
master/slave relationship where the slave is simply a hot standby
application for the master. When the master fails, the slave on the second
system would still need to figure out what state the data was in (i.e., data
recovery would still take place). However, the time to fork the application
and do the initial startup is saved.
Another possibility is having two applications that are both active. An
example might be two application servers which feed a database. Half of
the clients connect to one application server and half of the clients
connect to the second application server. If one server fails, then all the
clients connect to the remaining application server.
284 Appendix B
Designing Highly Available Cluster Applications
Designing Applications to Run on Multiple Systems
Appendix B 285
Designing Highly Available Cluster Applications
Designing Applications to Run on Multiple Systems
286 Appendix B
Designing Highly Available Cluster Applications
Designing Applications to Run on Multiple Systems
• Old network devices between the source and the destination such as
routers had to be manually programmed with MAC and IP address
pairs. The solution to this problem is to move the MAC address along
with the IP address in case of failover.
• Up to 20 minute delays could occur while network device caches were
updated due to timeouts associated with systems going down. This is
dealt with in current HA software by broadcasting a new ARP
translation of the old IP address with the new MAC address.
Use DNS
DNS provides an API which can be used to map hostnames to IP
addresses and vice versa. This is useful for BSD socket applications such
as telnet which are first told the target system name. The application
must then map the name to an IP address in order to establish a
connection. However, some calls should be used with caution.
Appendix B 287
Designing Highly Available Cluster Applications
Designing Applications to Run on Multiple Systems
288 Appendix B
Designing Highly Available Cluster Applications
Designing Applications to Run on Multiple Systems
Appendix B 289
Designing Highly Available Cluster Applications
Designing Applications to Run on Multiple Systems
For TCP stream sockets, the TCP level of the protocol stack resolves this
problem for the client since it is a connection-based protocol. On the
client, TCP ignores the stationary IP address and continues to use the
previously bound relocatable IP address originally used by the client.
With UDP datagram sockets, however, there is a problem. The client may
connect to multiple servers utilizing the relocatable IP address and sort
out the replies based on the source IP address in the server’s response
message. However, the source IP address given in this response will be
the stationary IP address rather than the relocatable application IP
address. Therefore, when creating a UDP socket for listening, the
application must always call bind(2) with the appropriate relocatable
application IP address rather than INADDR_ANY.
If the application cannot be modified as recommended above, a
workaround to this problem is to not use the stationary IP address at all,
and only use a single relocatable application IP address on a given LAN
card. Limitations with this workaround are as follows:
290 Appendix B
Designing Highly Available Cluster Applications
Designing Applications to Run on Multiple Systems
Appendix B 291
Designing Highly Available Cluster Applications
Restoring Client Connections
292 Appendix B
Designing Highly Available Cluster Applications
Restoring Client Connections
the retry to the current server should continue for the amount of
time it takes to restart the server locally. This will keep the client
from having to switch to the second server in the event of a
application failure.
• Use a transaction processing monitor or message queueing software
to increase robustness.
Use transaction processing monitors such as Tuxedo or DCE/Encina,
which provide an interface between the server and the client.
Transaction processing monitors (TPMs) can be useful in creating a
more highly available application. Transactions can be queued such
that the client does not detect a server failure. Many TPMs provide
for the optional automatic rerouting to alternate servers or for the
automatic retry of a transaction. TPMs also provide for ensuring the
reliable completion of transactions, although they are not the only
mechanism for doing this. After the server is back online, the
transaction monitor reconnects to the new server and continues
routing it the transactions.
• Queue Up Requests
As an alternative to using a TPM, queue up requests when the server
is unavailable. Rather than notifying the user when a server is
unavailable, the user request is queued up and transmitted later
when the server becomes available again. Message queueing
software ensures that messages of any kind, not necessarily just
transactions, are delivered and acknowledged.
Message queueing is useful only when the user does not need or
expect response that the request has been completed (i.e, the
application is not interactive).
Appendix B 293
Designing Highly Available Cluster Applications
Handling Application Failures
294 Appendix B
Designing Highly Available Cluster Applications
Handling Application Failures
Appendix B 295
Designing Highly Available Cluster Applications
Minimizing Planned Downtime
296 Appendix B
Designing Highly Available Cluster Applications
Minimizing Planned Downtime
and then restart the application on all the affected nodes. For large
systems, this could result in a long downtime. An alternative is to
provide for a rolling upgrade. A rolling upgrade rolls out the new
software in a phased approach by upgrading only one component at a
time. For example, the database server is upgraded on Monday, causing a
15 minute downtime. Then on Tuesday, the application server on two of
the nodes is upgraded, which leaves the application servers on the
remaining nodes online and causes no downtime. On Wednesday, two
more application servers are upgraded, and so on. With this approach,
you avoid the problem where everything changes at once, plus you
minimize long outages.
The trade-off is that the application software must operate with different
revisions of the software. In the above example, the database server
might be at revision 5.0 while the some of the application servers are at
revision 4.0. The application must be designed to handle this type of
situation.
Appendix B 297
Designing Highly Available Cluster Applications
Minimizing Planned Downtime
298 Appendix B
Integrating HA Applications with ServiceGuard
C Integrating HA Applications
with ServiceGuard
1. Read the rest of this book, including the chapters on cluster and
package configuration, and the appendix “Designing Highly
Available Cluster Applications.”
2. Define the cluster’s behavior for normal operations:
Appendix C 299
Integrating HA Applications with ServiceGuard
Checklist for Integrating HA Applications
300 Appendix C
Integrating HA Applications with ServiceGuard
Checklist for Integrating HA Applications
Appendix C 301
Integrating HA Applications with ServiceGuard
Checklist for Integrating HA Applications
• Move it back.
# cmhaltpkg pkg1
# cmrunpkg -n node1 pkg1
# cmmodpkg -e pkg1
• Fail one of the systems. For example, turn off the power on node
1. Make sure the package starts up on node 2.
• Repeat failover from node 2 back to node 1.
2. Be sure to test all combinations of application load during the
testing. Repeat the failover processes under different application
states such as heavy user load versus no user load, batch jobs vs
online transactions, etc.
3. Record timelines of the amount of time spent during the failover for
each application state. A sample timeline might be 45 seconds to
reconfigure the cluster, 15 seconds to run fsck on the filesystems, 30
seconds to start the application and 3 minutes to recover the
database.
302 Appendix C
Blank Planning Worksheets
• Hardware Worksheet
• Power Supply Worksheet
• Quorum Server Worksheet
• Mirror Group Worksheet
• Volume Group and Physical Volume Worksheet
• Cluster Configuration Worksheet
• Package Configuration Worksheet
• Package Control Script Worksheet
Appendix D 303
Blank Planning Worksheets
Hardware Worksheet
Hardware Worksheet
=============================================================================
SPU Information:
=============================================================================
LAN Information:
===============================================================================
=============================================================================
Bus Type ______ Slot Number ____ Address ____ Disk Device File _________
Bus Type ______ Slot Number ___ Address ____ Disk Device File __________
Bus Type ______ Slot Number ___ Address ____ Disk Device File _________
Bus Type ______ Slot Number ___ Address ____ Disk Device File _________
304 Appendix D
Blank Planning Worksheets
Power Supply Worksheet
============================================================================
Disk Power:
============================================================================
Tape Backup Power:
============================================================================
Other Power:
Appendix D 305
Blank Planning Worksheets
Quorum Server Worksheet
OR
==============================================================================
306 Appendix D
Blank Planning Worksheets
Mirror Group Worksheet
md00
md01
md02
md03
md04
md05
md06
md07
md08
md09
md10
md11
Appendix D 307
Blank Planning Worksheets
Volume Group and Physical Volume Worksheet
=============================================================================
308 Appendix D
Blank Planning Worksheets
Cluster Configuration Worksheet
Appendix D 309
Blank Planning Worksheets
Package Configuration Worksheet
310 Appendix D
Blank Planning Worksheets
Package Control Script Worksheet
PATH______________________________________________________________
RAIDTAB____________________________________________________________
RAIDSTART__________________________RAIDSTOP________________________
VGCHANGE_________________________________
VG[0]__________________LV[0]______________________FS[0]____________________
VG[1]__________________LV[1]______________________FS[1]____________________
VG[2]__________________LV[2]______________________FS[2]____________________
Appendix D 311
Blank Planning Worksheets
Package Control Script Worksheet
312 Appendix D
Index
A automatic restart of cluster, 37
active node, 19 automatic switching
adding a package to a running cluster, 234 parameter in package configuration, 110
adding nodes to a running cluster, 223 automatically restarting the cluster, 227
adding packages on a running cluster, 185 automating application operation, 278
administration autostart delay
adding nodes to a runing cluster, 223 parameter in the cluster configuration file,
cluster and package states, 194 104
halting a package, 232 autostart for clusters
halting the entire cluster, 225 setting up, 166
moving a package, 232
of packages and services, 231 B
of the cluster, 222 binding
reconfiguring a package while the cluster is in network applications, 289
running, 234 bridged net
reconfiguring a package with the cluster defined, 25
offline, 233 building a cluster
reconfiguring the cluster, 226 ASCII cluster configuration file template,
removing nodes from operation in a runing 157
cluster, 224 logical volume infrastructure, 142
responding to cluster events, 239 verifying the cluster configuration, 162
reviewing configuration files, 255, 256 bus type
starting a package, 231 hardware planning, 90
troubleshooting, 253
adoptive node, 19 C
applications changes in cluster membership, 37
automating, 278 changes to cluster allowed while the cluster
checklist of steps for integrating with is running, 228
ServiceGuard, 299 changes to packages allowed while the
handling failures, 294 cluster is running, 236
writing HA services for networks, 279 checkpoints, 283
ARP messages client connections
after switching, 69 restoring in applications, 292
ASCII cluster configuration file template, cluster
157 configuring with commands, 157
ASCII package configuration file template, redundancy of components, 24
173 ServiceGuard, 18
AUTO_RUN typical configuration, 18
in sample ASCII package configuration file, understanding components, 24
173 cluster administration, 222
parameter in package configuration, 110 solving problems, 258
AUTO_START_TIMEOUT cluster and package maintenance, 193
parameter in the cluster configuration file, cluster configuration
104 file on all nodes, 35
AUTO_START_TIMEOUT (autostart delay) planning, 100
in sample configuration file, 159 planning worksheet, 105
parameter in cluster manager sample diagram, 87
configuration, 104 verifying the cluster configuration, 162
automatic failback cluster configuration file, 159
configuring with failover policies, 49
313
Index
Autostart Delay parameter CONCURRENT_FSCK_OPERATIONS
(AUTO_START_TIMEOUT), 104 parameter in package control script, 115
cluster coordinator CONCURRENT_MOUNT_OPERATIONS
defined, 35 parameter in package control script, 116
cluster lock configuration
4 or more nodes, 40 ASCII cluster configuration file template,
and power supplies, 28 157
storing configuration data, 155 ASCII package configuration file template,
two nodes, 38, 39 173
use in re-forming a cluster, 38, 39 basic tasks and steps, 22
cluster manager cluster planning, 100
automatic restart of cluster, 37 of the cluster, 35
blank planning worksheet, 309 package, 171
cluster node parameter, 101, 102 package planning, 107
defined, 35 service, 171
dynamic re-formation, 37 configuration file
heartbeat interval parameter, 103 for cluster manager, 35
heartbeat subnet parameter, 102 troubleshooting, 255, 256
initial configuration of the cluster, 35 configuring packages and their services, 171
main functions, 35 control script
maximum configured packages parameter, adding customer defined functions, 184
105 creating with commands, 177
monitored non-heartbeat subnet, 103 in package configuration, 177
network polling interval parameter, 105 pathname parameter in package
node timeout parameter, 103 configuration, 111
planning the configuration, 101 troubleshooting, 256
testing, 245 controlling the speed of application failover,
cluster node 280
parameter in cluster manager creating the package configuration, 172
customer defined functions
configuration, 101, 102
adding to the control script, 184
cluster parameters
initial configuration, 35
cluster startup D
manual, 36 data
CLUSTER_NAME (cluster name) disks, 26
in sample configuration file, 159 data congestion, 36
cmapplyconf , 226 deciding when and where to run packages,
cmcheckconf, 162, 186 43, 44
troubleshooting, 256 deleting a package configuration
cmdeleteconf using cmdeleteconf, 235
deleting a package configuration, 235 deleting a package from a running cluster,
deleting the cluster configuration, 168 235
cmhaltnode, 195 deleting the cluster configuration
cmmodnet using cmdeleteconf, 168
assigning IP addresses in control scripts, 65 designing applications to run on multiple
cmmodpkg, 196 systems, 285
cmquerycl disk
troubleshooting, 256 data, 26
cmscancl, 253 interfaces, 26
cmviewcl, 197 root, 26
314
Index
sample configurations, 27 responses to package and service failures,
disk I/O 80
hardware planning, 90 restarting a service after failure, 81
disk layout failures
planning, 97 of applications, 294
disk logical units FibreChannel, 26
hardware planning, 90 figures
disks mirrored disks connected for high
in ServiceGuard, 26 availability, 27
replacing, 248 redundant LANs, 25
supported types in ServiceGuard , 26 sample cluster configuration, 87
distributing the cluster and package ServiceGuard software components, 30
configuration, 186, 187 tasks in configuring an ServiceGuard
down time cluster, 22
minimizing planned, 296 typical cluster after failover, 20
dynamic cluster re-formation, 37 typical cluster configuration, 18
file locking, 291
E file system
enclosure for disks in control script, 114
replacing a faulty mechanism , 248 file system name parameter in package
Ethernet control script, 114
redundant configuration, 25 file system type parameter in package control
expanding the cluster script, 114
planning ahead, 86 file systems
expansion planning, 97
planning for, 108 Filesystem mount retry count, 115
Filesystem unmount count, 115
floating IP address
F
defined, 65
failback policy floating IP addresses
package configuration file parameter, 110 in ServiceGuard packages, 65
used by package manager, 49 FS, 114
FAILBACK_POLICY parameter in sample package control script, 179
in package configuration file, 110 FS_MOUNT_OPT
used by package manager, 49 in sample package control script, 179
failover FS_TYPE, 114
controlling the speed in applications, 280
defined, 19 G
failover behavior
general planning, 85
in packages, 52
gethostbyname
failover policy and package IP addresses, 65
package configuration parameter, 109 gethostbyname(), 287
used by package manager, 46
FAILOVER_POLICY parameter
H
in package configuration file, 109
used by package manager, 46 HA NFS server parameter in package control
failure script, 116
kinds of responses, 79 HA_NFS_SERVER, 116
network communication, 81 HALT_SCRIPT
in sample ASCII package configuration file,
response to hardware failures, 80
173
315
Index
parameter in package configuration, 111 high availability, 18
HALT_SCRIPT_TIMEOUT (halt script HA cluster defined, 24
timeout) objectives in planning, 85
in sample ASCII package configuration file, host IP address
173 hardware planning, 88, 95
parameter in package configuration, 112 host name
halting a cluster, 226 hardware planning, 88
halting a package, 232 how the cluster manager works, 35
halting the entire cluster, 225 how the network manager works, 65
handling application failures, 294
hardware I
monitoring, 247
I/O bus addresses
power supplies, 28 hardware planning, 90
hardware failures
I/O slots
response to, 80
hardware planning, 88, 90
hardware planning
installing software
blank planning worksheet, 303 Quroum Server, 128
Disk I/O Bus Type, 90
integrating HA applications with
disk I/O information for shared disks, 90 ServiceGuard, 299
host IP address, 88, 95 introduction
host name, 88 ServiceGuard at a glance, 18
I/O bus addresses, 90 understanding ServiceGuard hardware, 23
I/O slot numbers, 90 understanding ServiceGuard software, 29
LAN interface name, 88, 95 IP
LAN traffic type, 89 in sample package control script, 179
memory capacity, 88 IP address array variable in package
number of I/O slots, 88 control script, 116
planning the configuration, 87 IP address
S800 series number, 88 adding and deleting in packages, 66
SPU information, 88 for nodes and packages, 65
subnet, 88, 95 hardware planning, 88, 95
worksheet, 91 portable, 65
heartbeat interval reviewing for packages, 253
parameter in cluster manager switching, 45, 46, 69
configuration, 103
heartbeat messages, 19 J
defined, 35
JFS, 281
heartbeat subnet address
parameter in cluster manager
configuration, 102 K
HEARTBEAT_INTERVAL kernel consistency
in sample configuration file, 159 in cluster configuration, 127
HEARTBEAT_INTERVAL (heartbeat
timeout) L
parameter in cluster manager
LAN
configuration, 103 heartbeat, 35
HEARTBEAT_IP interface name, 88, 95
in sample configuration file, 159
LAN failure
parameter in cluster manager ServiceGuard behavior, 24
configuration, 102 LAN interfaces
316
Index
primary and secondary, 25 parameter in cluster manager
LAN planning configuration, 103
host IP address, 88, 95 monitored resource failure
traffic type, 89 ServiceGuard behavior, 24
link-level addresses, 287 monitoring hardware, 247
load sharing with IP addresses, 66 mount options
local switching, 66 in control script, 114
lock moving a package, 232
cluster locks and power supplies, 28 multiple device parameter in control script,
use of the cluster lock, 39 114
use of the cluster lock disk, 38 multiple systems
lock volume group, reconfiguring, 226 designing applications for, 285
logical volume parameter in package control
script, 114 N
logical volumes
network
creating the infrastructure, 142
adding and deleting package IP addresses,
planning, 97 66
LV, 114
load sharing with IP addresses, 66
in sample package control script, 179
local interface switching, 66
LVM
commands for cluster use, 142 redundancy, 25
creating file systems, 107 remote system switching, 69
creating logical volumes, 107 network communication failure, 81
network components
creating volume groups, 107
in ServiceGuard, 25
disks, 26
network manager
planning, 97 adding and deleting package IP addresses,
66
M main functions, 65
MAC addresses, 287 network planning
man pages subnet, 88, 95
list of pages available for ServiceGuard, 265 network polling interval
managing the cluster and nodes, 222 (NETWORK_POLLING_INTERVAL)
manual cluster startup, 36 parameter in cluster manager
MAX_CONFIGURED_PACKAGES configuration, 105
parameter in cluster manager network time protocol (NTP)
configuration, 105 for clusters, 127
maximum number of nodes, 24 NETWORK_INTERFACE
MD, 114 in sample configuration file, 159
in sample package control script, 179 NETWORK_POLLING_INTERVAL
membership change (network polling interval)
reasons for, 37 in sample configuration file, 159
memory capacity networking
hardware planning, 88 redundant subnets, 88
memory requirements networks
lockable memory for ServiceGuard, 85 binding to IP addresses, 289
minimizing planned down time, 296 binding to port addresses, 289
mirrored disks connected for high IP addresses and naming, 285
availability node and package IP addresses, 65
figure, 27 packages using IP addresses, 287
monitored non-heartbeat subnet supported types in ServiceGuard, 25
317
Index
writing network applications as HA reconfiguring with the cluster offline, 233
services, 279 remote switching, 69
node starting, 231
basic concepts, 24 package administration, 231
in ServiceGuard cluster, 18 solving problems, 258
IP addresses, 65 package and cluster maintenance, 193
node types package configuration
active, 19 automatic switching parameter, 110
primary, 19 control script pathname parameter, 110
NODE_FAIL_FAST_ENABLED distributing the configuration file, 186, 187
in sample ASCII package configuration file, failback policy parameter, 110
173 failover policy parameter, 109
parameter in package configuration, 111 package failfast parameter, 111
NODE_NAME package name parameter, 109
in sample ASCII package configuration file, planning, 107
173 run and halt script timeout parameters, 112
parameter in cluster manager service fail fast parameter, 113
configuration, 101, 102 service halt timeout parameter, 113
NODE_TIMEOUT (heartbeat timeout) service name parameter, 112
in sample configuration file, 159 step by step, 171
NODE_TIMEOUT (node timeout) subnet parameter, 113
parameter in cluster manager using commands, 172
configuration, 103 verifying the configuration, 186, 187
nodetypes writing the package control script, 177
primary, 19 package configuration file, 173
NTP package control script
time protocol for clusters, 127 CONCURRENT_FSCK_OPERATIONS
parameter, 115
O CONCURRENT_MOUNT_OPERATIONS
Object Manager, 255 parameter, 116
optimizing packages for large numbers of FS parameter, 114
storage units, 178 FS_MOUNT_RETRY_COUNT, 115
outages FS_TYPE parameter, 114
insulating users from , 278 FS_UMOUNT_COUNT, 115
generating with commands, 177
P HA_NFS_SERVER parameter, 116
package IP addresses, 116
adding and deleting package IP addresses, LV parameter, 114
66 MD parameter, 114
basic concepts, 24 SERVICE_CMD parameter, 117
blank planning worksheet, 310, 311 SERVICE_NAME parameter, 116
changes allowed while the cluster is SERVICE_RESTART parameter, 117
running, 236 subnets, 116
halting, 232 worksheet, 118
in ServiceGuard cluster, 18 package coordinator
local interface switching, 66 defined, 35
moving, 232 package failfast
reconfiguring while the cluster is running, parameter in package configuration, 111
234 package failover behavior, 52
318
Index
package failures planning worksheets
responses, 80 blanks, 303
package IP address point of failure
defined, 65 in networking, 25
package IP addresses ports
defined, 65 dual and single aggregated, 68
reviewing, 253 power planning
package manager power sources, 93
blank planning worksheet, 310, 311 worksheet, 94, 95 , 306
testing, 244 power supplies
package name blank planning worksheet, 305
parameter in package configuration, 109 power supply
package switching behavior and cluster lock, 28
changing, 235 UPS, 28
PACKAGE_NAME primary LAN interfaces
in sample ASCII package configuration file, defined, 25
173 primary node, 19
packages
deciding where and when to run, 43, 44 Q
parameters Quorum Server
for failover, 52 installing, 128
parameters for cluster manager running, 129
initial configuration, 35
running in a package, 130
PATH, 113, 114
quorum server
performance
planning, 100, 101
optimizing packages for large numbers of
storage units, 178
performance variables in package control R
script, 115, 116 RAIDSTART
physical volume in sample package control script, 179
for cluster lock, 38, 39 RAIDSTOP
parameter in cluster lock configuration, 101 in sample package control script, 179
physical volumes RAIDTAB
blank planning worksheet, 307, 308 in sample package control script, 179
planning, 97 reconfiguring a package
planning while the cluster is running, 234
cluster configuration, 100 reconfiguring a package with the cluster
cluster manager configuration, 101 offline, 233
disk I/O information, 90 reconfiguring a running cluster, 228
for expansion, 108 reconfiguring the entire cluster, 226
hardware configuration, 87 reconfiguring the lock volume group, 226
recovery time, 100
high availability objectives, 85
redundancy
overview, 83 in networking, 25
package configuration, 107 of cluster components, 24
power, 93 redundancy in network interfaces, 25
SPU information, 88 redundant Ethernet configuration, 25
volume groups and physical volumes, 97 redundant LANS
worksheets, 91 figure, 25
planning and documenting an HA cluster, 83 redundant networks
planning for cluster expansion, 86 for heartbeat, 19
319
Index
re-formation figure, 87
of cluster, 37 sample disk configurations, 27
relocatable IP address SCSI addressing, 100, 101
defined, 65 security
relocatable IP addresses editing files, 124
in ServiceGuard packages, 65 service administration, 231
remote switching, 69 service command
removing nodes from operation in a running variable in package control script, 117
cluster, 224 service configuration
removing packages on a running cluster, 185 step by step, 171
removing ServiceGuard from a system, 241 service fail fast
replacing disks, 248 parameter in package configuration, 113
resources service failures
disks, 26 responses, 80
responses service halt timeout
to cluster events, 239 parameter in package configuration, 113
to package and service failures, 80 service name
responses to failures, 79 parameter in package configuration, 112
responses to hardware failures, 80 variable in package control script, 116
restart service restarts, 81
automatic restart of cluster, 37 SERVICE_CMD
following failure, 81 array variable in package control script, 117
SERVICE_RESTART variable in package in sample package control script, 179
control script, 117 SERVICE_FAIL_FAST_ENABLED
restartable transactions, 282 in sample ASCII package configuration file,
restarting the cluster automatically, 227 173
restoring client connections in applications, parameter in package configuration, 113
292 SERVICE_HALT_TIMEOUT
retry count, 115 in sample ASCII package configuration file,
rhosts file
173
for security, 124
parameter in package configuration, 113
rotating standby
configuring with failover policies, 47 SERVICE_NAME
array variable in package control script, 116
setting package policies, 47
in sample ASCII package configuration file,
RUN_SCRIPT
in sample ASCII package configuration file, 173
173 in sample package control script, 179
parameter in package configuration, 111 parameter in package configuration, 112
RUN_SCRIPT_TIMEOUT SERVICE_RESTART
in sample ASCII package configuration file, array variable in package control script, 117
173 in sample package control script, 179
RUN_SCRIPT_TIMEOUT (run script SERVICE_RESTART parameter
timeout) variable in package control script, 117
parameter in package configuration, 112 ServiceGuard
running cluster introduction, 18
adding or removing packages, 185 ServiceGuard at a Glance, 17
ServiceGuard behavior
in LAN failure, 24
S
in monitored resource failure, 24
S800 series number in software failure, 24
hardware planning, 88 ServiceGuard commands
sample cluster configuration using to configure package, 172
320
Index
ServiceGuard Manager ARP messages after switching, 69
managing cluster objects, 216 local interface switching, 66
overview, 204 remote system switching, 69
viewing cluster objects, 212 switching IP addresses, 45, 46, 69
ServiceGuard software components system log, 247
figure, 30 system log file
shared disks troubleshooting, 254
planning, 90 system message
shutdown and startup changing for clusters, 167
defined for applications, 279
single point of failure T
avoiding, 18
tasks in ServiceGuard configuration
single-node operation, 167, 240 figure, 22
SNA applications, 291 template
software failure
ASCII cluster configuration file, 157
ServiceGuard behavior, 24
ASCII package configuration file, 173
software planning
LVM, 97 testing
cluster manager, 245
solving problems, 258
SPU information package manager, 244
planning, 88 testing cluster operation, 244
standby LAN interfaces time protocol (NTP)
defined, 25 for clusters, 127
starting a package, 231 TOC
startup and shutdown when a node fails, 79
defined for applications, 279 traffic type
startup of cluster LAN hardware planning, 89
manual, 36 troubleshooting
state approaches, 253
of cluster and package, 194 monitoring hardware, 247
stationary IP addresses, 65 replacing disks, 248
STATIONARY_IP reviewing control scripts, 256
parameter in cluster manager reviewing package IP addresses, 253
configuration, 103 reviewing system log file, 254
status using cmquerycl and cmcheckconf, 256
of cluster and package, 194 troubleshooting your cluster, 243
package IP address, 253 typical cluster after failover
system log file, 254 figure, 20
stopping a cluster, 226 typical cluster configuration
SUBNET figure, 18
array variable in package control script, 116
in sample ASCII package configuration file, U
173 uname(2), 288
in sample package control script, 179 understanding network components in
parameter in package configuration, 113 ServiceGuard, 25
subnet unmount count, 115
hardware planning, 88, 95 UPS
parameter in package configuration, 113 in power planning, 93
supported disks in ServiceGuard, 26 power supply, 28
supported networks in ServiceGuard, 25 use of the cluster lock, 38, 39
switching
321
Index
V
verifying cluster configuration, 162
verifying the cluster and package
configuration, 186, 187
VG
in sample package control script, 179
vgcfgbackup
and cluster lock data, 155
VGChange, 114
volume group
for cluster lock, 38, 39
planning, 97
volume group and physical volume planning,
97
Volume groups
in control script, 114
W
What is ServiceGuard?, 18
worksheet
blanks, 303
cluster configuration, 105, 309
hardware configuration, 91, 303
LVM configuration, 307
package configuration, 310, 311
package control script, 118
power supply configuration, 94, 95, 305, 306
use in planning, 83
322