Emr 201807na-A00052276en Us PDF
Emr 201807na-A00052276en Us PDF
12.30.00
2 Contents
Normal and Abnormal Exits from the Run Script............................................................. 51
Service Startup with cmrunserv ....................................................................................52
While Services are Running.............................................................................................52
When a Service or Subnet Fails or Generic Resource or a Dependency is Not Met....... 52
When a Package is Halted with a Command...................................................................53
During Halt Script Execution............................................................................................ 53
Normal and Abnormal Exits from the Halt Script..............................................................54
How the Network Manager Works ............................................................................................. 56
Stationary and Relocatable IP Addresses and Monitored Subnets................................. 56
Types of IP Addresses..................................................................................................... 57
Adding and Deleting Relocatable IP Addresses ............................................................. 57
Bonding of LAN Interfaces .............................................................................................. 58
Bonding for Load Balancing............................................................................................. 60
Monitoring LAN Interfaces and Detecting Failure: Link Level.......................................... 60
Monitoring LAN Interfaces and Detecting Failure: IP Level............................................. 60
Reporting Link-Level and IP-Level Failures..................................................................... 63
Package Switching and Relocatable IP Addresses......................................................... 64
Address Resolution Messages after Switching on the Same Subnet ............................. 64
VLAN Configurations........................................................................................................64
About Persistent Reservations....................................................................................................65
Rules and Limitations.......................................................................................................66
How Persistent Reservations Work..................................................................................67
Volume Managers for Data Storage............................................................................................68
Storage on Arrays............................................................................................................ 68
Monitoring Disks...............................................................................................................69
More Information on LVM................................................................................................. 69
Veritas Volume Manager (VxVM)..................................................................................... 69
Using VMware Virtual Machine File System Disks...........................................................70
Storage configuration type in a VMware environment..................................................... 70
Root Disk Monitoring...................................................................................................................76
Responses to Failures ............................................................................................................... 77
Reboot When a Node Fails ............................................................................................. 77
Responses to Hardware Failures ....................................................................................78
Responses to Root Disk failures...................................................................................... 79
Responses to Generic Resources Failures at cluster level..............................................79
Responses to Package and Service Failures ................................................................. 79
Responses to Package and Generic Resources Failures................................................80
Contents 3
Hardware Configuration Worksheet ................................................................................ 99
Power Supply Planning ..............................................................................................................99
Power Supply Configuration Worksheet ........................................................................100
Cluster Lock Planning............................................................................................................... 100
Cluster Lock Requirements............................................................................................101
Planning for Expansion.................................................................................................. 101
Using a Quorum Server..................................................................................................101
Configuring Asymmetric nodes in a Disaster Recovery Deployment............................. 102
Volume Manager Planning .......................................................................................................104
Volume Groups and Physical Volume Worksheet.......................................................... 104
VxVM Planning ........................................................................................................................ 104
Cluster Configuration Planning ................................................................................................ 104
Easy Deployment........................................................................................................... 105
Heartbeat Subnet and Cluster Re-formation Time ........................................................ 107
About Hostname Address Families: IPv4-Only, IPv6-Only, and Mixed Mode................ 108
Cluster Configuration Parameters.................................................................................. 111
Cluster Configuration: Next Step....................................................................................125
Package Configuration Planning...............................................................................................125
Logical Volume and File System Planning .................................................................... 125
Planning for NFS-mounted File Systems....................................................................... 126
Planning for Expansion.................................................................................................. 128
Choosing Switching and Failover Behavior....................................................................128
Configuring DLS based VMDK (VMFS/RDM) in the Package....................................... 129
Parameters for Configuring Generic Resources............................................................ 130
Configuring a Generic Resource....................................................................................131
About Package Dependencies.......................................................................................135
What Happens When a Package Fails.......................................................................... 142
For More Information......................................................................................................143
About Package Weights................................................................................................. 143
About External Scripts....................................................................................................162
About Cross-Subnet Failover......................................................................................... 165
Configuring a Package: Next Steps............................................................................... 167
Planning for Changes in Cluster Size....................................................................................... 168
4 Contents
Specifying Maximum Number of Configured Packages ................................................200
Modifying the MEMBER_TIMEOUT Parameter............................................................. 200
Configuring Root Disk Monitoring parameter................................................................. 200
Controlling Access to the Cluster................................................................................... 200
Configuring Cluster Generic Resources.........................................................................206
Verifying the Cluster Configuration ................................................................................212
Cluster Lock Configuration Messages........................................................................... 213
Distributing the Binary Configuration File ......................................................................213
Managing the Running Cluster................................................................................................. 213
Checking Cluster Operation with Serviceguard Commands.......................................... 214
Setting up Autostart Features ....................................................................................... 215
Changing the System Message .................................................................................... 216
Managing a Single-Node Cluster................................................................................... 216
Disabling identd..............................................................................................................217
Deleting the Cluster Configuration ................................................................................ 217
Contents 5
Halting a Node or the Cluster while Keeping Packages Running............................................. 272
What You Can Do...........................................................................................................273
Rules and Restrictions................................................................................................... 273
Additional Points To Note............................................................................................... 274
Halting a Node and Detaching its Packages..................................................................276
Halting a Detached Package..........................................................................................276
Halting the Cluster and Detaching its Packages............................................................ 276
Example: Halting the Cluster for Maintenance on the Heartbeat Subnets.....................277
Managing Packages and Services ...........................................................................................277
Starting a Package ........................................................................................................277
Halting a Package ......................................................................................................... 278
Moving a Failover Package ...........................................................................................280
Changing Package Switching Behavior ........................................................................ 280
Maintaining a Package: Maintenance Mode............................................................................. 280
Characteristics of a Package Running in Maintenance Mode or Partial-Startup
Maintenance Mode ........................................................................................................281
Performing Maintenance Using Maintenance Mode...................................................... 283
Performing Maintenance Using Partial-Startup Maintenance Mode.............................. 284
Reconfiguring a Cluster............................................................................................................ 285
Previewing the Effect of Cluster Changes......................................................................286
Reconfiguring a Halted Cluster ..................................................................................... 288
Reconfiguring a Running Cluster................................................................................... 288
Changing the Cluster Networking Configuration while the Cluster Is Running.............. 290
Updating the Cluster Lock LUN Configuration Online....................................................293
Resetting the cluster generic resource restart counter.................................................. 294
Changing MAX_CONFIGURED_PACKAGES............................................................... 294
Changing the VxVM Storage Configuration .................................................................. 294
Reconfiguring a Package..........................................................................................................294
Reconfiguring a Package on a Running Cluster ........................................................... 295
Renaming or Replacing an External Script Used by a Running Package......................295
Reconfiguring a Package on a Halted Cluster .............................................................. 296
Adding a Package to a Running Cluster........................................................................ 296
Deleting a Package from a Running Cluster ................................................................. 296
Resetting the Service Restart Counter...........................................................................297
Allowable Package States During Reconfiguration .......................................................297
Online Reconfiguration of Modular package.................................................................. 301
Migrate generic resources from package to cluster....................................................... 308
Responding to Cluster Events ................................................................................................. 310
Single-Node Operation .............................................................................................................311
Removing Serviceguard from a System....................................................................................311
6 Contents
How to Use the Smart Quorum...................................................................................... 325
Examples........................................................................................................................325
Limitation...................................................................................................................................329
Cluster Analytics.................................................................................337
Upgrading the Cluster Analytics Software................................................................................ 339
Pre-requisites................................................................................................................. 339
Upgrading serviceguard-analytics Software...................................................................339
Verifying serviceguard-analytics Installation.................................................................. 340
Removing serviceguard-analytics Software................................................................... 340
Configuring NFS as Shared Storage........................................................................................ 340
Cluster Analytics Database Migration to Shared Storage.........................................................341
Starting Cluster Analytics Daemon........................................................................................... 341
Cluster Event Message Consolidation........................................................................... 341
Stopping Cluster Analytics Daemon......................................................................................... 342
Verifying Cluster Analytics Daemon..........................................................................................342
Removing Cluster Analytics State Configuration File............................................................... 343
Command to Retrieve KPIs...................................................................................................... 343
Limitation...................................................................................................................................344
Contents 7
Reviewing Configuration Files .......................................................................................354
Using the cmquerycl and cmcheckconf Commands ............................................... 354
Reviewing the LAN Configuration ................................................................................. 355
Solving Problems ..................................................................................................................... 355
Name Resolution Problems........................................................................................... 355
Halting a Detached Package..........................................................................................356
Cluster Re-formations Caused by Temporary Conditions.............................................. 356
Cluster Re-formations Caused by MEMBER_TIMEOUT Being Set too Low................. 356
System Administration Errors ........................................................................................357
Node and Network Failures ...........................................................................................359
Troubleshooting the Quorum Server.............................................................................. 359
Lock LUN Messages...................................................................................................... 360
Host IO Timeout Messages............................................................................................360
Troubleshooting serviceguard-xdc package............................................................................. 361
Troubleshooting cmvmusermgmt Utility.................................................................................... 361
8 Contents
Documenting Maintenance Operations .........................................................................376
Contents 9
Disaster recovery rehearsal overview.......................................................................................404
Prerequisites to deploy DRR on VMware environment..................................................404
Cluster configuration properties................................................................................................ 405
Toolkit Studio overview............................................................................................................. 407
Workload overview....................................................................................................................407
10 Contents
The information contained herein is subject to change without notice. The only warranties for Hewlett
Packard Enterprise products and services are set forth in the express warranty statements accompanying
such products and services. Nothing herein should be construed as constituting an additional warranty.
Hewlett Packard Enterprise shall not be liable for technical or editorial errors or omissions contained
herein.
Links to third-party websites take you outside the Hewlett Packard Enterprise website. Hewlett Packard
Enterprise has no control over and is not responsible for information outside the Hewlett Packard
Enterprise website.
Confidential computer software. Valid license from Hewlett Packard Enterprise required for possession,
use, or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer
Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government
under vendor's standard commercial license.
Copyright © 2016 Veritas Technologies LLC. All rights reserved. Veritas and the Veritas Logo are
trademarks or registered trademarks of Veritas Technologies LLC or its affiliates in the U.S. and other
countries. Other names may be trademarks of their respective owners.
NIS™ is a trademark of Sun Microsystems, Inc.
UNIX® is a registered trademark of The Open Group.
Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.
Red Hat® is a registered trademark of Red Hat, Inc. in the United States and other countries.
SUSE® is a registered trademark of SUSE AG, a Novell Business.
VMware and vCenter Server are registered trademarks or trademarks of VMware, Inc. in the United
States and/or other jurisdictions.
Publication History
Publication Date Part Number Edition
The last publication date and part number indicate the current edition, which applies to the A.12.00.40
version of HPE Serviceguard for Linux.
The publication date changes when a new edition is published. (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.
Publication History 13
Preface
This guide describes how to configure and manage Serviceguard for Linux on HPE ProLiant server under
the Linux operating system. It is intended for experienced Linux system administrators. (For Linux system
administration tasks that are not specific to Serviceguard, use the system administration documentation
and manpages for your distribution of Linux.)
NOTE: Starting Serviceguard A.12.00.00, legacy packages are obsolete and only modular packages are
supported. For more information about how to migrate to modular packages, see the white paper
Migrating packages from legacy to modular style available at http://www.hpe.com/info/linux-
serviceguard-docs.
• Serviceguard for Linux at a Glance describes a Serviceguard cluster and provides a roadmap for
using this guide.
• Understanding Hardware Configurations for Serviceguard for Linux provides a general view of
the hardware configurations used by Serviceguard.
• Understanding Serviceguard Software Components describes the software components of
Serviceguard and shows how they function within the Linux operating system.
• Planning and Documenting an HA Cluster steps through the planning process.
• Building an HA Cluster Configuration describes the creation of the cluster configuration.
• Configuring Packages and Their Services describes the creation of high availability packages.
• Cluster and Package Maintenance presents the basic cluster administration tasks.
• Understanding Site Aware Disaster Tolerant Architecture describes Site Aware Disaster Tolerant
Architecture for deploying complex workloads with inter-dependent packages that are managed
collectively for disaster tolerance.
• Simulating a Serviceguard Cluster describes how to simulate Serviceguard clusters.
• Cluster Analytics provides a mechanism to the users to perform "availability audits" on their
Serviceguard cluster, nodes, and application packages running on the clusters.
• Troubleshooting Your Cluster explains cluster testing and troubleshooting strategies.
• Designing Highly Available Cluster Applications gives guidelines for creating cluster-aware
applications that provide optimal performance in a Serviceguard environment.
• Integrating HA Applications with Serviceguard provides suggestions for integrating your existing
applications with Serviceguard for Linux.
• Blank Planning Worksheets contains a set of empty worksheets for preparing a Serviceguard
configuration.
• IPv6 Network Support provides information about IPv6.
• Maximum and Minimum Values for Parameters provides a reference to the supported ranges for
Serviceguard parameters.
14 Preface
• Monitoring Script for Generic Resources provides the monitoring script template for Generic
Resources.
• Serviceguard Toolkit for Linux describes a group of tools to simplify the integration of popular
applications with Serviceguard.
Preface 15
Serviceguard for Linux at a Glance
This chapter introduces Serviceguard for Linux and shows where to find different kinds of information in
this book. It includes the following topics:
If you are ready to start setting up Serviceguard clusters, skip ahead to Planning and Documenting an
HA Cluster . Specific steps for setup are in Building an HA Cluster Configuration.
Node 1 Node 2
Hub
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
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. When a node or its network communications fails, Serviceguard can
transfer control of the package to the next available adoptive node. This situation is shown in the following
figure.
Node 1 Node 2
PkgB
Copy Disk array Copy
Hub
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 2: Typical Cluster after Failover on page 17 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, see Power Supply Planning section.
Failover 17
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 Hewlett Packard Enterprise-supported
uninterruptible power supplies (UPS), which eliminate failures related to power outage. Hewlett Packard
Enterprise recommends these products; in conjunction with Serviceguard they provide the highest degree
of availability.
• HPE Serviceguard Extended Distance Cluster for Linux A.12.00.40 Deployment Guide
• Understanding and Designing Serviceguard Disaster Recovery Architectures
The online help provides multiple ways to navigate through help topics. To find the information that you
need quickly and easily, you can:
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 the following image:
Hewlett Packard Enterprise recommends that you gather all the data that is needed for configuration
before you start. See Planning and Documenting an HA Cluster for tips on gathering data.
Configuration Roadmap 19
Understanding Hardware Configurations for
Serviceguard for Linux
This chapter gives a broad overview of how the server hardware components operate with Serviceguard
for Linux. The following topics are presented:
Refer to the next chapter for information about Serviceguard software components.
• In the case of LAN failure, the Linux bonding facility provides a standby LAN, or Serviceguard moves
packages to another node.
• In the case of SPU failure, your application is transferred from a failed SPU to a functioning SPU
automatically and in a minimal amount of time.
• For software failures, an application can be restarted on the same node or another node with minimum
disruption.
Serviceguard also gives you the advantage of easily transferring control of your application to another
SPU in order to bring the original SPU down for system administration, maintenance, or version
upgrades.
The maximum number of nodes supported in a Serviceguard Linux cluster is 32; the actual number
depends on the storage configuration.
A package that does not use data from shared storage can be configured to fail over to as many nodes
as you have configured in the cluster (up to the maximum of 32), regardless of disk technology. For
instance, a package that runs only local executables, and uses only local data, can be configured to fail
over to all nodes in the cluster.
◦ For IPv6, Serviceguard supports up to two subnets per LAN interface (site-local and global).
• Serviceguard does support different subnets on the same bridged network (this applies at both the
node and the cluster level).
• Serviceguard does not support using networking tools such as ifconfig to add IP addresses to
network interfaces that are configured into the Serviceguard cluster, unless those IP addresses
themselves will be immediately configured into the cluster as stationary IP addresses.
CAUTION: If you configure any address other than a stationary IP address on a Serviceguard
network interface, it could collide with a relocatable package IP address assigned by
Serviceguard. See Stationary and Relocatable IP Addresses and Monitored Subnets on
page 56.
◦ Similarly, Serviceguard does not support using networking tools to move or reconfigure any IP
addresses configured into the cluster.
Doing so leads to unpredictable results because the Serviceguard view of the configuration is
different from the reality.
NOTE: If you will be using a cross-subnet configuration, see also the Restrictions that apply specifically
to such configurations.
PkgA PkgB
Bounded Disk array Bounded
PkgC LAN cards
LAN cards
eth0 eth1 eth0 eth1
Disk array
Hub
Hub
In Linux configurations, the use of symmetrical LAN configurations is strongly recommended, with the use
of redundant hubs or switches to connect Ethernet segments. The software bonding configuration should
be identical on each node, with the active interfaces connected to the same hub or switch.
Cross-Subnet Configurations
As of Serviceguard A.11.18 or later, it is possible to configure multiple subnets, joined by a router, both for
the cluster heartbeat and for data, with some nodes using one subnet and some another.
A cross-subnet configuration allows:
Configuration Tasks
Cluster and package configuration tasks are affected as follows:
• You must use the -w full option to cmquerycl discover actual or potential nodes and subnets
across routers.
• You must configure two parameters in the package configuration file to allow packages to fail over
across subnets:
• You should not use the wildcard (*) for node_name in the package configuration file, as this could
allow the package to fail over across subnets when a node on the same subnet is eligible; failing over
22 Cross-Subnet Configurations
across subnets can take longer than failing over on the same subnet. List the nodes in order of
preference instead of using the wildcard.
• You should configure IP monitoring for each subnet; see Monitoring LAN Interfaces and Detecting
Failure: IP Level.
Restrictions
The following restrictions apply:
• All nodes in the cluster must belong to the same network domain (that is, the domain portion of the
fully-qualified domain name must be the same.)
• The nodes must be fully connected at the IP level.
• A minimum of two heartbeat paths must be configured for each cluster node.
• There must be less than 200 milliseconds of latency in the heartbeat network.
• Each heartbeat subnet on each node must be physically routed separately to the heartbeat subnet on
another node; that is, each heartbeat path must be physically separate:
◦ The heartbeats must be statically routed; static route entries must be configured on each node to
route the heartbeats through different paths.
◦ Failure of a single router must not affect both heartbeats at the same time.
◦ As in other configurations, a package will not start on a node unless the subnets configured on that
node, and specified in the package configuration file as monitored subnets, are up.
NOTE: See also the Rules and Restrictions that apply to all cluster networking configurations.
Restrictions 23
IMPORTANT: Although cross-subnet topology can be implemented on a single site, it is most
commonly used by extended-distance clusters and Metrocluster. For more information about such
clusters, see the following documents at http://www.hpe.com/info/linux-serviceguard-docs:
NOTE: As of release A.11.16.07, Serviceguard for Linux provides functionality similar to HP-UX exclusive
activation. This feature is based on LVM2 hosttags, and is available only for Linux distributions that
officially support LVM2.
All of the disks in the volume group owned by a package must be connected to the original node and to
all possible adoptive nodes for that package.
Shared disk storage in Serviceguard Linux clusters is provided by disk arrays, which have redundant
power and the capability for connections to multiple nodes. Disk arrays use RAID modes to provide
redundancy.
• FibreChannel
• iSCSI
• The iSCSI storage can be configured on a channel bonding. For more information about channel
bonding, see Implementing Channel Bonding (Red Hat) on page 175 or Implementing Channel
Bonding (SUSE) on page 177.
• Software initiator models support iSCSI storage.
The following restrictions are applicable when iSCSI LUNs are used as a shared storage:
Disk Monitoring
You can configure monitoring for disks 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.
Node 1 Node 2
Disk Monitoring 25
Understanding Serviceguard Software
Components
This chapter gives a broad overview of how the Serviceguard software components work. It includes the
following topics:
• Serviceguard Architecture
• How the Cluster Manager Works
• How the Package Manager Works
• How Packages Run
• 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.”
Serviceguard Architecture
The following figure shows the main software components used by Serviceguard for Linux. This chapter
discusses these components in some detail.
Package Manager
MC/ServiceGuard
Cluster Manager
Components
Network Manager
Operating
Linux Kernel (with LVM)
System
Serviceguard Daemons
Serviceguard for Linux uses the following daemons:
Serviceguard Daemons 27
• cmsnmpd —cluster SNMP subagent (optionally running)
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 SUSE.
NOTE: The file cmcluster.conf contains the mappings that resolve symbolic references to $SGCONF,
$SGROOT, $SGLBIN, etc, used in the path names in the subsections that follow. See Understanding the
Location of Serviceguard Files on page 169 for details.
NOTE: Two of the central components of Serviceguard—Package Manager, and Cluster Manager—run
as parts of the cmcld daemon. This daemon runs at priority 94 and is in the SCHED_RR class. No other
process is allowed a higher real-time priority.
NOTE:
An iSCSI storage device does not support configuring a lock LUN.
For services, cmcld monitors the service process and, depending on the number of service retries,
cmcld either restarts the service through cmsrvassistd or it causes the package to halt and moves the
package to an available alternate node. The path for this daemon is: $SGLBIN/cmserviced.
What is WBEM?
Web-Based Enterprise Management (WBEM) is a set of management and Internet standard technologies
developed to unify the management of distributed computing environments, facilitating the exchange of
data across otherwise disparate technologies and platforms. WBEM is based on Internet standards and
Distributed Management Task Force (DMTF) open standards: Common Information Model (CIM)
infrastructure and schema, CIM-XML, CIM operations over HTTP, and WS-Management.
For more information, see the following:
Common Information Model (CIM)
Web-Based Enterprise Management (WBEM)
Procedure
WBEM Query
Serviceguard WBEM provider implements the following classes that can be queried to retrieve the cluster
information:
• HP_Cluster
• HP_Node
• HP_ParticipatingCS
• HP_ClusterSoftware
• HP_NodeIdentity
For more information about WBEM provider classes, see Managed Object Format (MOF) files for
properties. When SGProviders is installed, the MOF files are copied to the /opt/sgproviders/mof/
directory on SUSE Linux Enterprise Server and /usr/local/sgproviders/mof/ directory on Red
Hat Enterprise Linux server.
NOTE: WBEM queries for the previous classes on SUSE Linux Enterprise Server might fail because of
access denied issues, if Serviceguard is not able to validate the credentials of the WBEM request.
Small Footprint CIM Broker (SFCB) which is the CIM server in SUSE Linux Enterprise Server 11 SP1 and
later has a configuration parameter doBasicAuth which enables basic authentication for HTTP and
HTTPS connections. This parameter must be set to true in the /etc/sfcb/sfcb.cfg file. Otherwise,
the user credentials of any WBEM request is not passed to Serviceguard WBEM Provider.
WBEM Indications
For an indication to be received on occurrence of a Serviceguard event, a WBEM subscription must exist
for one of the following indication classes:
• CIM_AlertIndication
• HP_ServiceguardIndication
32 WBEM Indications
How the Cluster Manager Works
The cluster manager is used to initialize a cluster, to monitor the health of the cluster, to recognize node
failure if it should occur, and to regulate the re-formation of the cluster when a node joins or leaves the
cluster. The cluster manager operates as a daemon process that runs on each node. During cluster
startup and re-formation activities, one node is selected to act as the cluster coordinator. Although all
nodes perform some cluster management functions, the cluster coordinator is the central point for inter-
node communication.
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 UDP heartbeat messages with every
other node over each 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; see What Happens when a Node Times Out. 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 later in this chapter, under How the Package Manager Works). Failover packages that were
running on nodes that are no longer in the new cluster are transferred to their adoptive nodes.
If heartbeat and data are sent over the same LAN subnet, data congestion may cause Serviceguard to
miss heartbeats and initiate a cluster re-formation that would not otherwise have been needed. For this
reason, Hewlett Packard Enterprise recommends that you dedicate a LAN for the heartbeat as well as
configuring heartbeat over the data network.
Each node sends its heartbeat message at a rate calculated by Serviceguard on the basis of the value of
the MEMBER_TIMEOUT parameter, set in the cluster configuration file, which you create as a part of
cluster configuration.
IMPORTANT: When multiple heartbeats are configured, heartbeats are sent in parallel;
Serviceguard must receive at least one heartbeat to establish the health of a node. Hewlett Packard
Enterprise recommends that you configure all subnets that interconnect cluster nodes as heartbeat
networks; this increases protection against multiple faults at no additional cost.
Heartbeat IP addresses must be on the same subnet on each node, but it is possible to configure a
cluster that spans subnets; see Cross-Subnet Configurations. See HEARTBEAT_IP, under
Cluster Configuration Parameters on page 111, for more information about heartbeat
requirements. For timeout requirements and recommendations, see the MEMBER_TIMEOUT
parameter description in the same section. For troubleshooting information, see Cluster Re-
formations Caused by MEMBER_TIMEOUT Being Set too Low. See also Cluster Daemon:
cmcld on page 28.
Typically, re-formation results in a cluster with a different composition. The new cluster may contain fewer
or more nodes than in the previous incarnation of the cluster.
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.
The cluster lock is used as a tie-breaker only for situations in which a running cluster fails and, as
Serviceguard attempts to form a new cluster, the cluster is split into two sub-clusters of equal size. Each
sub-cluster will attempt to acquire the cluster lock. The sub-cluster which gets the cluster lock will form the
new cluster, preventing the possibility of two sub-clusters running at the same time. If the two sub-clusters
are of unequal size, the sub-cluster with greater than 50% of the nodes will form the new cluster, and the
cluster lock is not used.
If you have a two-node cluster, you are required to configure a cluster lock. If communications are lost
between these two nodes, the node that obtains the cluster lock will take over the cluster and the other
node will halt (system reset). Without a cluster lock, a failure of either node in the cluster will cause the
other node, and therefore the cluster, to halt. Note also that if the cluster lock fails during an attempt to
acquire it, the cluster will halt.
NOTE: In Serviceguard for Linux 12.00.30, a new feature called “Smart Quorum” is introduced to handle
the split-brain failure scenario. By default, Smart Quorum feature is disabled. For more information about
how to enable this feature, see Understanding the Smart Quorum on page 324.
NOTE:
• The lock LUN is dedicated for use as the cluster lock, and, in addition, Hewlett Packard Enterprise
recommends that this LUN comprise the entire disk; that is, the partition should take up the entire disk.
• An iSCSI storage device does not support configuring a lock LUN.
• A storage device of type Dynamically linked storage configuration does not support configuring lock
LUN. For description about Dynamically linked storage configuration, see Storage configuration type
in a VMware Environment.
The complete path name of the lock LUN is identified in the cluster configuration file.
The operation of the lock LUN is shown in the following figure.
Cluster Lock 35
Node 1 Disk array Node 2
Linux
Root Root
Pkg2
Hub
Serviceguard periodically checks the health of the lock LUN and writes messages to the syslog file if the
disk fails the health check. This file should be monitored for early detection of lock disk problems.
Storage Storage
Linux
Pkg2
QS
HA S/W
Hub
A quorum server can provide quorum services for multiple clusters. Figure 9: Quorum Server to Cluster
Distribution on page 38 illustrates quorum server use across four clusters.
Cluster 1 Cluster 2
Quorum
server
QS
Linux package Linux Linux
Linux for 3 and 4
Pkg Pkg Pkg
Pkg
HA S/W HA S/W HA S/W HA S/W
Cluster 3 Cluster 4
IMPORTANT: For more information about the quorum server, see the latest version of the HPE
Serviceguard Quorum Server release notes at http://www.hpe.com/info/linux-serviceguard-docs
(Select HP Serviceguard Quorum Server Software).
NOTE: In Serviceguard for Linux 12.00.30, a new feature called “Smart Quorum” is introduced to handle
the split-brain failure scenario. By default, Smart Quorum feature is disabled. For more information about
how to enable this feature, see Understanding the Smart Quorum on page 324.
No Cluster Lock
Normally, you should not configure a cluster of three or fewer nodes without a cluster lock. In two-node
clusters, a cluster lock is required. You may consider using no cluster lock with configurations of three or
more nodes, although the decision should be affected by the fact that any cluster may require tie-
breaking. For example, if one node in a three-node cluster is removed for maintenance, the cluster re-
forms as a two-node cluster. If a tie-breaking scenario later occurs due to a node or communication
failure, the entire cluster will become unavailable.
38 No Cluster Lock
In a cluster with four or more nodes, you may not need a cluster lock since the chance of the cluster
being split into two halves of equal size is very small. However, be sure to configure your cluster to
prevent the failure of exactly half the nodes at one time. For example, make sure there is no potential
single point of failure such as a single LAN between equal numbers of nodes, and that you don’t have
exactly half of the nodes on a single power circuit.
Procedure
1. All nodes switch to a strict majority quorum (turning off any existing quorum devices).
2. All nodes switch to the newly configured quorum method, device and parameters.
IMPORTANT: During Step 1, while the nodes are using a strict majority quorum, node failures can
cause the cluster to go down unexpectedly if the cluster has been using a quorum device before the
configuration change. For example, suppose you change the quorum server polling interval while a
two-node cluster is running. If a node fails during Step 1, the cluster will lose quorum and go down,
because a strict majority of prior cluster members (two out of two in this case) is required. The
duration of Step 1 is typically around a second, so the chance of a node failure occurring during that
time is very small.
In order to keep the time interval as short as possible, make sure you are changing only the quorum
configuration, and nothing else, when you apply the change.
If this slight risk of a node failure leading to cluster failure is unacceptable, halt the cluster before
you make the quorum configuration change.
You can then configure cluster generic resources using these parameters. For details on the parameters,
see Cluster Configuration Parameters and the cmquerycl (1m) manpage. For steps to configure a
cluster generic resources, see Configuring Cluster Generic Resources. You can also add, delete, or
modify generic resources depending on certain conditions. For information, see Online reconfiguration
of cluster generic resources.
Monitoring of these resources takes place outside of the Serviceguard environment. The resources are
monitored by writing monitoring scripts that can be launched within the Serviceguard environment by
configuring them as cluster generic resource command (GENERIC_RESOURCE_CMD) in cluster
configuration.
These scripts are written by end users and must contain the core logic to monitor a resource and the
status of the generic resource set accordingly using cmsetresource(1m). The scripts are started as
part of cluster start and will continue to run until cluster services are halted. For more information, see
Monitoring Script for Cluster Generic Resources.
See the recommendation from Hewlett Packard Enterprise and an example under Cluster Generic
Resources template scripts.
Cluster Generic resources can be of two types - Simple and Extended. The type of generic resource
should be specified by using GENERIC_RESOURCE_TYPE parameter of cluster configuration.
Simple Generic resource:
• For a simple resource, the monitoring mechanism is based on the status of the resource.
• The status can be UP, DOWN, or UNKNOWN.
• The default status is UNKNOWN, UP and DOWN can be set using the cmsetresource(1m)
command.
• For an extended resource, the monitoring mechanism is based on the current value of the resource.
• The default current value is 0.
• Valid values are positive integer values ranging from 1 to 2147483647.
NOTE: You can get or set the status/value of a simple/extended generic resource using the
cmgetresource(1m) and cmsetresource(1m) commands respectively. See Getting and Setting
the Status/Value of a Simple/Extended Cluster Generic Resource on page 211 and the manpages for
more information.
A single cluster can have a combination of simple and extended resources, but a given generic resource
cannot be configured as a simple resource in cluster and as an extended resource in package. It must be
either simple generic resource or extended generic resource in both cluster and packages.
• Executes the control scripts that run and halt packages and their services.
• Reacts to changes in the status of monitored resources.
Package Types
Three different types of packages can run in the cluster; the most common is the failoverpackage. There
are also special-purpose packages that run on more than one node at a time, and so do not fail over.
They are typically used to manage resources of certain failover packages.
Non-failover Packages
There are two types of special-purpose packages that do not fail over and that can run on more than one
node at the same time: the system multi-node package, which runs on all nodes in the cluster, and the
multi-node package, which can be configured to run on all or some of the nodes in the cluster. System
multi-node packages are reserved for use by Hewlett Packard Enterprise-supplied applications.
The rest of this section describes failover packages.
Failover Packages
A failover package starts up on an appropriate node (see node_name node_name) when the cluster
starts. In the case of a service, network, or other resource or dependency failure, package failover takes
place. A package failover involves both halting the existing package and starting the new instance of the
package on a new node.
Failover is shown in the following figure:
NOTE: It is possible to configure a cluster that spans subnets joined by a router, with some nodes using
one subnet and some another. This is known as a cross-subnet configuration. In this context, you can
configure packages to fail over from a node on one subnet to a node on another, and you will need to
configure a relocatable IP address for each subnet the package is configured to start on; see About
Cross-Subnet Failover, and in particular the subsection Implications for Application Deployment.
When a package fails over, 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 subnets,
normally all of them must be available on the target node before the package will be started. (In a cross-
subnet configuration, all the monitored subnets that are specified for this package, and configured on the
target node, must be up.)
If the package has a dependency on a resource or another package, the dependency must be met on the
target node before the package can start.
The switching of relocatable IP addresses is shown in the figures that follow. Users connect to each 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.
Disk array
LAN LAN
interfaces interfaces
Client 1 Client 2
In After Package Switching diagram, node1 has failed and pkg1 has been transferred to node2. pkg1's
IP address was transferred to node2 along with the package. pkg1 continues to be available and is now
running on node2. Also note that node2 now has access both to pkg1's disk and pkg2's disk.
NOTE: For design and configuration information about clusters that span subnets, see the documents
listed under Cross-Subnet Configurations.
Disk array
LAN LAN
interfaces interfaces
Connection
Connection by client 2
by client 1 to
to 127.15.12.149
127.15.12.147
Client 1 Client 2
Failover Policy
The Package Manager selects a node for a failover package to run on based on the priority list included
in the package configuration file together with the failover_policy parameter, also in the configuration file.
The 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 failover policies are
configured_node (the default), min_package_node, site_preferred, and
When the cluster starts, each package starts as shown in the figure.
If a failure occurs, the failing package would fail over to the node containing fewest running packages:
If these packages had been set up using the configured_node failover policy, they would start initially
as in Before Package Switching, but the failure of node2 would cause the package to start on node3,
as shown in After Package Switching.
PkgB
PkgA
PkgC
If you use configured_node as the failover policy, the package will start up on the highest-priority
eligible node in its node list. When a failover occurs, the package will move to the next eligible node in the
list, in the configured order of priority.
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 set in the package
configuration file:
As an example, consider the following four-node configuration, in which failover_policy is set to
configured_node and failback_policy is automatic:
node1 panics, and after the cluster reforms, pkgA starts running on node4:
After rebooting, node1 rejoins the cluster. At that point, pkgA will be automatically stopped on node4 and
restarted on node1.
NOTE: Setting the failback_policy to automatic can result in a package failback and application outage
during a critical production period. If you are using automatic failback, you may want to wait to add the
package’s primary node back into the cluster until you can allow the package to be taken out of service
temporarily while it switches back to the primary node.
Serviceguard automatically chooses a primary node for a package when the NODE_NAME is set to '*'.
When you set the NODE_NAME to '*' and the failback_policy is automatic, if you add, delete, or
rename a node in the cluster, the primary node for the package might change resulting in the automatic
failover of that package.
Generic resources can be configured into any modular style package. They can be configured for failover
or multi-node packages and are included in modular failover packages by default. A single resource can
be specified across multiple packages.
You can either generate a new package configuration file containing the generic resource parameters or
add the module to an existing package to include the generic resource parameters. When you generate a
package with the generic resource module, Serviceguard provides the following parameters for
configuring generic resources:
• generic_resource_name
• generic_resource_evaluation_type
• generic_resource_up_criteria
You can then configure generic resources using these parameters. For details on the parameters, see
Package Parameter Explanations and the cmmakepkg (1m) manpage. For steps to configure a
generic resources, see Configuring a Generic Resource.
You can also add, delete, or modify generic resources depending on certain conditions. For information,
see Online Reconfiguration of Generic Resources.
Monitoring of these resources takes place outside of the Serviceguard environment. These are done by
writing monitoring scripts that can be launched either within the Serviceguard environment by configuring
them as services, or outside of Serviceguard environment.
These scripts are written by end-users and must contain the core logic to monitor a resource , and the
status of the generic resource set accordingly using cmsetresource(1m). These are started as part of
package start and will continue to run until package services are halted. For more information, see
Monitoring Script for Generic Resources.
If there is a common generic resource that needs to be monitored as a part of multiple packages, then the
monitoring script for that resource can be launched as part of one package and all other packages can
use the same monitoring script. There is no need to launch multiple monitors for a common resource. If
the package that has started the monitoring script fails or is halted, then all the other packages that are
using this common resource also fail.
See the recommendation from Hewlett Packard Enterprise and an example under Launching
Monitoring Scripts.
Generic resources can be of two types - Simple and Extended.
• For a simple resource, the monitoring mechanism is based on the status of the resource.
• The status can be UP, DOWN, or UNKNOWN.
• The default status is UNKNOWN; UP and DOWN can be set using the cmsetresource(1m)
command.
A given generic resource is considered to be an extended generic resource when the up criteria
parameter is specified.
• For an extended resource, the monitoring mechanism is based on the current value of the resource.
• The current value is matched with the generic_resource_up_criteria specified for the resource in a
package and this determines whether the generic resource status is UP or DOWN.
• The default current value is 0.
• Valid values are positive integer values ranging from 1 to 2147483647.
NOTE: You can get or set the status/value of a simple/extended generic resource using the
cmgetresource(1m) and cmsetresource(1m) commands respectively. See Getting and Setting
the Status/Value of a Simple/Extended Generic Resource and the manpages for more information.
A single package can have a combination of simple and extended resources, but a given generic
resource cannot be configured as a simple resource in one package and as an extended resource in
another package. It must be either simple generic resource or extended generic resource in all packages.
System multi-node packages are supported only for use by applications supplied by Hewlett Packard
Enterprise.
A failover package can be configured to have a dependency on a multi-node or system multi-node
package. The package manager cannot start a package on a node unless the package it depends on is
already up and running on that node.
The package manager will always try to keep a failover package running unless there is something
preventing it from running on any node. The most common reasons for a failover package not being able
to run are that auto_run is disabled so Serviceguard is not allowed to start the package, that node
switching is disabled for the package on particular nodes, or that the package has a dependency that is
not being met. When a package has failed on one node and is enabled to switch to another node, it will
start up automatically in a new location where its dependencies are met. This process is known as
package switching, or remote switching.
A failover package starts on the first available node in its configuration file; by default, it fails over to the
next available one in the list. Note that you do not necessarily have to use a cmrunpkg command to
restart a failed failover package; in many cases, the best way is to enable package and/or node switching
with the cmmodpkg command.
When you create the package, you indicate the list of nodes on which it is allowed to run. System multi-
node packages must list all cluster nodes in their cluster. Multi-node packages and failover packages can
name some subset of the cluster’s nodes or all of them.
If the auto_run parameter is set to yes in a package’s configuration file Serviceguard automatically starts
the package when the cluster starts. System multi-node packages are required to have auto_run set to
yes. If a failover package has auto_run set to no, Serviceguard cannot start it automatically at cluster
startup time; you must explicitly enable this kind of package using the cmmodpkg command.
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, issue the cmrunpkg or cmmodpkg command.
How does a failover package start up, and what is its behavior while it is running? Some of the many
phases of package life are shown in Figure 19: Modular Package Time Line Showing Important
Events on page 50.
1. Executes any external_pre_scripts. For more information, see About External Scripts).
2. Activates volume groups or disk groups.
cmm0dpkg -e or
cluster startup or
cmrunpkg
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.
If the run script execution is not complete before the time specified in the run_script_timeout parameter,
the package manager will kill the script. During run script execution, messages are written to a log file. For
modular packages, the pathname is determined by the script_log_file parameter in the package
configuration file. 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_fail_fast_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.
• 0—normal exit. The package started normally, so all services are up on this node.
• 1—abnormal exit, also known as no_restart exit. The package did not complete all startup steps
normally. Services are killed, and the package is disabled from failing over to other nodes.
• 2—alternative exit, also known as restart exit. There was an error, but the package is allowed to
start up on another node. You might use this kind of exit from a customer defined procedure if there
If a service fails but the restart parameter for that service is set to a value greater than 0, the service will
restart, up to the configured number of restarts, without halting the package.
During normal operation, while all services are running, you can see the status of the services in the
“Script Parameters” section of the output of the cmviewcl command.
NOTE: If a package is dependent on a subnet, and the subnet on the primary node fails, the package will
start to shut down. If the subnet recovers immediately (before the package is restarted on an adoptive
node), the package manager restarts the package on the same node; no package switch occurs.
NOTE: If you use cmhaltpkg command with the -n <nodename> option, the package is halted only if it
is running on that node.
The cmmodpkg command cannot be used to halt a package, but it can disable switching either on
particular nodes or on all nodes. A package can continue running when its switching has been disabled,
but it will not be able to start on other nodes if it stops running on its current node.
cmhaltpkg or cmhaltcl or
loss of resource or loss of service
Figure 21: Modular Package Time Line for Halt Script Execution
• 0—normal exit. The package halted normally, so all services are down on this node.
• 1—abnormal exit, also known as no_restart exit. The package did not halt normally. Services are
killed, and the package is disabled globally. It is not disabled on the current node, however.
• 2 — abnormal exit, also known as restart exit. The package did not halt normally. Services are
killed, and the package is disabled globally. It is not disabled on the current node, however. The
package is allowed to run on an alternate node.
• 3—abnormal exit. The package did not halt normally and will be placed in the halt_aborted state.
The package switching is disabled and it will not failover to other nodes.
• Timeout—Another type of exit occurs when the halt_script_timeout is exceeded. In this scenario, the
package is killed and disabled globally. It is not disabled on the current node, however.
Run Script Exit Yes Either system reset No N/A (system Yes
2 Setting reset)
Table Continued
Halt Script Yes Either system reset N/A N/A (system Yes, unless
Timeout Setting reset) the timeout
happened
after the
cmhaltpkg
command
was
executed.
Table Continued
NOTE: Serviceguard monitors the health of the network interfaces (NICs) and can monitor the IP level
(layer 3) network.
IMPORTANT: Any subnet identified as a monitored_subnet in the package configuration file must
be configured into the cluster via NETWORK_INTERFACE and either STATIONARY_IP or
HEARTBEAT_IP in the cluster configuration file. See Cluster Configuration Parameters on page
111 and Package Parameter Explanations.
In addition to the stationary IP address, you normally assign one or more unique IP addresses to each
package. The package IP address is assigned to a LAN interface when the package starts up.
The IP addresses associated with a package are called relocatable IP addresses (also known as IP
aliases, package IP addresses or floating IP addresses) because the addresses can actually move from
IMPORTANT: Any subnet that is used by a package for relocatable addresses should be configured
into the cluster via NETWORK_INTERFACE and either STATIONARY_IP or HEARTBEAT_IP in the
cluster configuration file. For more information about those parameters, see Cluster Configuration
Parameters on page 111. For more information about configuring relocatable addresses, see the
descriptions of the package ip_ parameters ip_subnet.
NOTE: It is possible to configure a cluster that spans subnets joined by a router, with some nodes using
one subnet and some another. This is called a cross-subnet configuration. In this context, you can
configure packages to fail over from a node on one subnet to a node on another, and you will need to
configure a relocatable address for each subnet the package is configured to start on; see About Cross-
Subnet Failover, and in particular the subsection Implications for Application Deployment.
Types of IP Addresses
Both IPv4 and IPv6 address types are supported in Serviceguard. IPv4 addresses are the traditional
addresses of the form n.n.n.n where n is a decimal digit between 0 and 255. IPv6 addresses have the
form x:x:x:x:x:x:x:x where x is the hexadecimal value of each of eight 16-bit pieces of the 128-bit address.
You can define heartbeat IPs, stationary IPs, and relocatable (package) IPs as IPv4 or IPv6 addresses (or
certain combinations of both).
CAUTION: Hewlett Packard Enterprise strongly recommends that you add relocatable addresses to
packages only by editing ip_address in the package configuration file and running cmapplyconf
(1m).
Load Sharing
Serviceguard allows you to configure several services into a single package, sharing a single IP address;
in that case all those services will fail over when the package does. If you want to be able to load-balance
services (that is, move a specific service to a less loaded system when necessary) you can do so by
putting each service in its own package and giving it a unique IP address.
Types of IP Addresses 57
Bonding of LAN Interfaces
Several LAN interfaces on a node can be grouped together in a process known in Linux as channel
bonding. In the bonded group, typically one interface is used to transmit and receive data, while the
others are available as backups. If one interface fails, another interface in the bonded group takes over.
Hewlett Packard Enterprise strongly recommends you use channel bonding in each critical IP subnet to
achieve highly available network services.
Host Bus Adapters (HBAs) do not have to be identical. Ethernet LANs must be the same type, but can be
of different bandwidth (for example, 1 Gb and 100 Mb). Serviceguard for Linux supports the use of
bonding of LAN interfaces at the driver level. The Ethernet driver is configured to employ a group of
interfaces.
Once bonding is enabled, each interface can be viewed as a single logical link of multiple physical ports
with only one IP and MAC address. There is no limit to the number of slaves (ports) per bond, and the
number of bonds per system is limited to the number of Linux modules you can load.
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. Hewlett Packard Enterprise
recommends that use different cards. The figure shows an example of four separate interfaces bonded
into one aggregate.
Node 1
15.13.122.34 - eth0
15.13.122.34 - eth1
Individual LANICs
without bonding
15.13.122.34 - eth2
15.13.122.34 - eth3
Node 2
Group of Bonded
LANICs 15.13.122.34 - bond0
The 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, or
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-18 shows a bonded configuration using redundant hubs with a crossover cable.
In the bonding model, individual Ethernet interfaces are slaves, and the bond is the master. In the basic
high availability configuration (mode 1), one slave in a bond assumes an active role, while the others
remain inactive until a failure is detected. (In Figure 3-18, both eth0 slave interfaces are active.) It is
important that during configuration, the active slave interfaces on all nodes are connected to the same
hub. If this were not the case, then normal operation of the LAN would require the use of the crossover
between the hubs and the crossover would become a single point of failure.
After the failure of a card, messages are still carried on the bonded LAN and are received on the other
node, but now eth1 has become active in bond0 on node1. This situation is shown in Figure 24:
Bonded NICs after Failure on page 59.
Node 1 Node 2
Bound 0 Bound 0
Hub
Active
Active
Hub
Various combinations of Ethernet card types (single or dual-ported) and bond groups are possible, but it is
vitally important to remember that at least two physical cards (or physically separate on-board LAN
interfaces) must be used in any combination of channel bonds to avoid a single point of failure for
heartbeat connections.
Node 1 Node 2
Bound 0 Bound 0
Active Active
Switch Switch
Active Active
• Detects when a network interface fails to send or receive IP messages, even though it is still up at the
link level.
• Handles the failure, failover, recovery, and failback.
• Monitor network status beyond the first level of switches; see How the IP Monitor Works
• Detect and handle errors such as:
• Peer polling.
In this case the IP Monitor sends ICMP ECHO messages from each IP address on a subnet to all other
IP addresses on the same subnet on other nodes in the cluster.
• Target polling.
In this case the IP Monitor sends ICMP ECHO messages from each IP address on a subnet to an
external IP address specified in the cluster configuration file; see POLLING_TARGET under Cluster
Configuration Parameters on page 111. cmquerycl (1m) will detect gateways available for use
as polling targets, as shown in the example below.
Target polling enables monitoring beyond the first level of switches, allowing you to detect if the route
is broken anywhere between each monitored IP address and the target.
NOTE: In a cross-subnet configuration, nodes can configure peer interfaces on nodes on the other
routed subnet as polling targets.
Hewlett Packard Enterprise recommends that you configure target polling if the subnet is not private to
the cluster.
The IP Monitor section of the cmquerycl output looks similar to this:
…
Route Connectivity (no probing was performed):
IPv4:
IPv4:
IPv6:
…
The IP Monitor section of the cluster configuration file will look similar to the following for a subnet on
which IP monitoring is configured with target polling.
IMPORTANT: By default, the cmquerycl does not verify that the gateways it detects will work
correctly for monitoring. But if you use the -w full option, cmquerycl will validate them as polling
targets.
SUBNET 192.168.1.0
IP_MONITOR ON
POLLING_TARGET 192.168.1.254
By default, IP_MONITOR parameter is set to OFF. If a gateway is detected for the subnet in question, it
populates the POLLING_TARGET , which is commented out, and sets the IP_MONITOR parameter to
OFF.
SUBNET 192.168.1.0
IP_MONITOR OFF
#POLLING_TARGET 192.168.1.254
To configure a subnet for IP monitoring with peer polling, edit the IP Monitor section of the cluster
configuration file to look similar to this:
SUBNET 192.168.2.0
IP_MONITOR ON
The IP Monitor section of the cluster configuration file will look similar to the following in the case of a
subnet on which IP monitoring is disabled:
SUBNET 192.168.3.0
IP_MONITOR OFF
IMPORTANT: Hewlett Packard Enterprise strongly recommends that you do not change the default
NETWORK_POLLING_INTERVAL value of 2 seconds.
• A peer IP on the same subnet should not be a polling target because a node can always ping itself.
The following constraints apply to peer polling when there are only two interfaces on a subnet:
• If one interface fails, both interfaces and the entire subnet will be marked down on each node, unless
bonding is configured and there is a working standby.
• If the node that has one of the interfaces goes down, the subnet on the other node will be marked
down.
• In a 2-node cluster, there is only a single peer for polling. When POLLING_TARGET is not defined, if
either of the nodes fail (For example, a node is rebooted or all the interfaces of a node are down), IP
monitoring fails and all the subnets are marked down on the operational node. This results in failure of
packages running on the operational node.
Therefore, peer polling is not suitable when there is only a single peer as exists in a 2-node cluster. In
such scenarios, a polling target should always be defined so that a single LAN failure does not affect
polling of other LANs.
NOTE: It is possible to configure a cluster that spans subnets joined by a router, with some nodes using
one subnet and some another. This is called a cross-subnet configuration. In this context, you can
configure packages to fail over from a node on one subnet to a node on another, and you will need to
configure a relocatable address for each subnet the package is configured to start on; see About Cross-
Subnet Failover, and in particular the subsection Implications for Application Deployment.
When a package switch occurs, 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 subnets
(specified as monitored_subnets in the package configuration file), all those subnets must normally be
available on the target node before the package will be started. (In a cross-subnet configuration, all
subnets configured on that node, and identified as monitored subnets in the package configuration file,
must be available.)
The switching of relocatable IP addresses is shown in Before Package Switching and After Package
Switching diagrams in Failover Packages’ Switching Behavior.
VLAN Configurations
Virtual LAN configuration (VLAN) is supported in Serviceguard clusters.
What is VLAN?
VLAN is a technology that allows logical grouping of network nodes, regardless of their physical locations.
VLAN can be used to divide a physical LAN into multiple logical LAN segments or broadcast domains,
helping to reduce broadcast traffic, increase network performance and security, and improve
manageability.
Multiple VLAN interfaces, each with its own IP address, can be configured from a physical LAN interface;
these VLAN interfaces appear to applications as ordinary network interfaces (NICs). See the
documentation for your Linux distribution for more information on configuring VLAN interfaces.
Configuration Restrictions
Linux allows up to 1024 VLANs to be created from a physical NIC port. A large pool of system resources
is required to accommodate such a configuration; Serviceguard could suffer performance degradation if
many network interfaces are configured in each cluster node. To prevent this and other problems,
Serviceguard imposes the following restrictions:
• A maximum of 30 network interfaces per node is supported. The interfaces can be physical NIC ports,
VLAN interfaces, Channel Bonds, or any combination of these.
• Only port-based and IP-subnet-based VLANs are supported. Protocol-based VLAN is not supported
because Serviceguard does not support any transport protocols other than TCP/IP.
• Each VLAN interface must be assigned an IP address in a unique subnet.
• Using VLAN in a Wide Area Network cluster is not supported.
1. VLAN heartbeat networks must be configured on separate physical NICs or Channel Bonds, to avoid
single points of failure.
2. Heartbeats are still recommended on all cluster networks, including VLANs.
3. If you are using VLANs, but decide not to use VLANs for heartbeat networks, heartbeats are
recommended for all other physical networks or Channel Bonds specified in the cluster configuration
file.
NOTE: Persistent Reservations coexist with, and are independent of, activation protection of volume
groups. You should continue to configure activation protection as instructed under Enabling Volume
Group Activation Protection on page 185. Subject to the Rules and Limitations on page 66 spelled
out below, Persistent Reservations will be applied to the cluster's LUNs, whether or not the LUNs are
configured into volume groups.
Advantages of PR:
◦ If you are not using the udev alias names, multipath physical volumes names must be in the /dev/
mapper/XXXX or /dev/mpath/XXXX format.
◦ The udev alias names must not be configured in the /dev/mapper/ or /dev/mpath/ directory.
◦ Multipath device alias names must not contain “pN”, “_partN”, or “-partN” strings, where N is the
number.
For example, /dev/mapper/evadskp1, /dev/mapper/evadsk_part1 or /dev/mapper/
evadsk-part1.
• If you accidently run the pr_cleanup command on LUNs belonging to a package that is already
running, PR protection is disabled. To enable PR protection, you must restart the package.
• The udev alias names must be created using symlinks. For more information about how to create udev
alias names using symlinks, see the Using udev to Simplify HPE Serviceguard for Linux Configuration
white paper at http://www.hpe.com/info/linux-serviceguard-docs.
• PR is available in Serviceguard-xdc packages. For more information, see HPE Serviceguard Extended
Distance Cluster for Linux A.12.00.40 Deployment Guide .
• The LUN device must support PR and be consistent with the SPC-3 specification.
◦ All instances of a modular multi-node package must be able to use PR; otherwise it will be turned
off for all instances.
• The package must have access to real devices, not only virtualized ones.
• iSCSI storage devices with PR is supported only on LVM volume groups.
• Serviceguard does not support PR with the disks which are part of VxVM diskgroups.
• Serviceguard does not support PR with disks which are of type VMFS on VMware virtual machines.
• On Red Hat Enterprise Linux 7, Serviceguard supports only user friendly named mapper device. For
information about how to setup user friendly named mapper device, see Red Hat Enterprise Linux 7
DM Multipath Configuration and Administration available at https://access.redhat.com/
documentation/en-US/Red_Hat_Enterprise_Linux/7/pdf/DM_Multipath/
Red_Hat_Enterprise_Linux-7-DM_Multipath-en-US.pdf.
CAUTION: Serviceguard makes and revokes registrations and reservations during normal package
startup and shutdown, or package failover. Serviceguard also provides a script to clear reservations
in the event of a catastrophic cluster failure. You need to make sure that this script is run in that
case; the LUN devices could become unusable otherwise. See Revoking Persistent Reservations
after a Catastrophic Failure on page 349 for more information.
• ENABLED means that packages can in principle use PR, but in practice will do so only if they meet the
conditions spelled out under Rules and Limitations on page 66.
• DISABLED means that no packages can use PR
You can see the setting of cluster_pr_mode in the output of cmviewcl -f line; for example:
...
cluster_pr_mode: pr_enabled
If a package is qualified to use PR, Serviceguard automatically makes and revokes registrations and
reservations for the package's LUNs during package startup, and revokes them during package
shutdown, using the sg_persist command. This command is available, and has a manpage, on both
Red Hat 5, Red Hat 6, and SUSE 11 .
Serviceguard makes a PR of type Write Exclusive Registrants Only (WERO) on the package's LUN
devices. This gives read access to any initiator regardless of whether the initiator is registered or not, but
grants write access only to those initiators who are registered. (WERO is defined in the SPC-3 standard.)
Storage on Arrays
Physical Disks Combined into LUNs shows LUNs configured on a storage array. Physical disks are
configured by an array utility program into logical units, or LUNs, which are seen by the operating system.
Disk Disk
mechanism mechanism
LUN 0
Disk Disk
mechanism mechanism Disk Array
LUN 1
Disk Disk LUN Configuration
mechanism mechanism
LUN 2
Disk Disk
mechanism mechanism
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.
Monitoring Disks
Each package configuration includes information about the disks that are to be activated by the package
at startup. If monitoring is used, the health of the disks is checked at package startup. The package will
fail if the disks are not available.
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 254.
NOTE: VxVM and VxFS are supported on HPE Serviceguard A.12.00.00 with Veritas Storage Foundation
6.0.1 and later.
Monitoring Disks 69
For more information about how to create a storage infrastructure with VxVM, see Creating a Storage
Infrastructure with VxVM on page 190.
Limitations
Following are the limitations of VxVM:
70 Limitations
Table 4: Storage configuration type in a VMware Environment
Static Linked Storage (SLS) In SLS, VMDK disks are configured to all VMs that are part of the
cluster as RDM in physical compatibility mode. Serviceguard node
which is active for a given package places PR for exclusive access of
RDM disks to ensure data integrity. This is the only supported storage
configuration until Serviceguard A.12.00.30 and will continue to be
available in later versions of Serviceguard.
Dynamic Linked Storage (DLS) In Dynamically linked storage configuration the disks are accessible to
a single VMware virtual machine at a time in the Serviceguard cluster.
NOTE: When you want to add a new cluster and a package with DLS, then using the same command is
not supported.
For Example:
cmapplyconf -C clus.ascci -P pkg.ascii
In such cases, you must apply the cluster configuration first, and then add the package with DLS.
For Example:
cmapplyconf -C clus.ascii
cmapplyconf -P pkg.ascii
Prerequisites
Before you enable this feature, ensure the following prerequisites are met:
VMware Prerequisites
• Ensure that all the ESXi host version must be 5.5 or later.
• Ensure that VMware vCenter server version must be 5.5 or later.
• Ensure that vCenter or Exsi hosts must be listening on port 443 — https 443/TCP.
• Ensure that the VMware virtual machines configured in the cluster must have unique UUID across the
vCenter or ESXi hosts.
• Ensure that you have installed Open Java and IBM Java. Minimum supported versions are:
• The cluster must be configured with ESXi host or VMware vCenter server on which the VMware virtual
machine exists. For more information about how to configure ESXi host or vCenter server in cluster,
see Specifying a VCENTER_SERVER or ESX_HOST on page 196
• Datastore must be created on a shared disk which is accessible to all virtual machines configured in a
cluster as per VMware configuration guidelines.
NOTE: Ensure that the VMware virtual machines configured in the cluster must have unique UUID across
the vCenter or ESXi host.
Serviceguard Prerequisites
Serviceguard for Linux A.12.00.40 must be installed on all the nodes in the cluster.
All the cluster nodes must have the following minimum supported versions of Open Java (or) IBM Java
installed Open Java.
72 Prerequisites
The following are the prerequisites required to perform attach and detach disk operations in a DLS
mechanism:
• You must choose as to how you want to perform attach and detach operations via vCenter Server (or)
to the ESXi host.
• After you choose vCenter Server (or) to the ESXi host, then both must be listening on port 443 — https
443/TCP.
• Specify in the Serviceguard Credential Store(SCS), the VCenter server login credentials (or) the ESX
Host login credential. For more information about how to configure ESXi host or vCenter server in
cluster.
Procedure
Storage Requirements
1. The VMware Datastores containing the VMDK disks/files configured in the package must be created
on a shared disk which is accessible to all VMs in the cluster. The Datastores themselves must be
configured as per VMware configuration guidelines.
2. The Virtual machine’s SCSI controller type must be VMware paravirtual.
3. The Virtual machine’s SCSI controller's SCSI Bus Sharing flag must be configured as "None" which
imply that virtual disks cannot be attached to two virtual machines anytime.
4. The VMDK disk can be of type RDM or Virtual disk (VMFS). If it is RDM, then both compatibility Mode
Physical and Virtual are supported. In a fully virtualized environment all the disk types (RDM or Virtual
disk (VMFS)) are supported. However, in a hybrid cluster, that is, a mix of physical and virtual
machines, only RDM disks in Physical compatibility Mode are supported.
5. When configuring the disk you are prompted to choose the "SCSI Controller Slot Number". The format
of this is "0:0" or "1:2", and so on. Where the first digit is the SCSI controller number and the second
digit is the slot on the controller where the disk is attached. Serviceguard requires that for a given disk
the "SCSI Controller Slot Number" where the disk will be attached in a VM must be the same; on all
the VM nodes in the cluster, where the package may run. This means when configuring the disks you
must ensure that the required "SCSI Controller Slot Number" for a disk is free on all the VMs in the
cluster.
NOTE: Ensure that the VMware virtual machines configured in the cluster must have unique UUID
across the vCenter or ESXi host.
Supported Configuration
Serviceguard supports the following configurations with VMware disks (RDM/VMFS):
Table Continued
Supported Configuration 73
2 RDM (Compatibility Mode in No Yes
Virtual)
3 VMFS No Yes
• Configuring SLS based storage (RDM) and DLS based storage (RDM or VMFS) in the same package
are not supported.
• Configuring both DLS based RDM disks and VMFS disks in the same package is not supported.
• Package with SLS based storage (RDM) and another package with DLS based storage (RDM or
VMFS) can coexist in a cluster.
Procedure
1. Create and populate Serviceguard Credential Store (SCS) utility with entries for all the required Esxi/
vCenter hosts on which VMware virtual nodes configured, which are planning to create a cluster. For
more details, see cmvmusermgmt (1m) manpage.
2. # cmvmusermgmt -U -H <Esxi/vCenter>
3. Add the appropriate ESX_HOST or VCENTER_SERVER parameter in the cluster configuration file.
For more information about these parameters and its description, see Specifying a
VCENTER_SERVER or ESX_HOST on page 196.
4. Create the package with VMFS module package parameters and apply the configuration. For more
information about how to add VMFS module package parameters, see Configuring DLS based
VMDK (VMFS/RDM) in the Package on page 129.
NOTE: Before reconfiguring ensure that the disks are sufficiently backed up.
Procedure
1. Configure Serviceguard Credential Store (SCS) of all required Esxi or vCenter hosts on which
VMware virtual nodes configured, which are participating in a cluster. For more information to add
ESX Host to SCS, see cmvmusermgmt manpage.
#cmvmusermgmt -U -H <Esxi or vCenter host>
4. Move all other running packages if any to Node B, and then halt node A.
#cmhaltnode
b. Change the SCSI Controller Bus sharing mode from Physical to "None".
c. In the existing configuration, if the disk is attached to the same SCSI controller and slot number
on both the VMs (Node A and Node B), then the same can be reused. If the SCSI controller and
slot number are different for the disk on the two VMs, then you must reconfigure to ensure that
the disk attaches to the same SCSI controller and slot number on both the VMs (Node A and
Node B). If the slot numbers that we choose to use are used in other RDM disks in other
packages, then those packages must also be brought down.
9. If there are other packages running on node B, move then to Node A and repeat the steps 4 through
8 till last node in a cluster.
10. Get the existing package configuration.
#cmgetconf -p pkg1 > pkg1.ascii
11. You must upgrade the existing package pkg1 to have the new VMFS related parameters. Run the
following command to create a new package ascii file as "pkg1_new.ascii":
#cmmakepkg -u pkg1.ascii -m sg/vmfs pkg1_new.ascii
12. Edit the pkg2.ascii, and add the values for VMFS related parameters (VMDK NAME, Datastore
name, Type of VMware virtual disk and SCSI controller slot number (in X:Y format)). For more
information on parameters, see Configuring DLS based VMDK (VMFS/RDM) in the Package on
page 129.
13. Apply the new package configuration with the VMFS parameters.
cmapplyconf -P <pkg1_new.ascii>
After the node is reset, all the applications and workloads running on that node fail over to another
healthy node. You can enable or disable Root Disk Monitoring at the node or at the cluster level. By
default, root disk monitoring option is disabled.
• If a node is the only active node in the cluster and if the root disk fails, Serviceguard will not reset that
node.
• Serviceguard will not take any action on the packages which are in failed state when root disk
monitoring feature detects root disk failure and subsequently resets the system. Those packages not
in failed state on the affected node of a cluster would become eligible for Serviceguard initiated
failover operation.
• If you are using mapper devices for root disk, ensure that the disk names are configured with user
friendly names like /dev/mapper/mpathX.
For more information about Root Disk Monitoring, see Configuring Root Disk Monitoring parameter
Responses to Failures
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.
1. The node contacts the other nodes and tries to re-form the cluster without the failed node.
2. If the remaining nodes are a majority or can obtain the cluster lock, they form a new cluster without the
failed node.
3. If the remaining nodes are not a majority or cannot get the cluster lock, they halt (system reset).
Responses to Failures 77
Example
Situation. Assume a two-node cluster, with Package1 running on SystemA and Package2 running on
SystemB. Volume group vg01 is exclusively activated on SystemA; volume group vg02is exclusively
activated on SystemB. Package IP addresses are assigned to SystemA and SystemB respectively.
Failure. Only one LAN has been configured for both heartbeat and data traffic. During the course of
operations, heavy application traffic monopolizes the bandwidth of the network, preventing heartbeat
packets from getting through.
Since SystemA does not receive heartbeat messages from SystemB, SystemA attempts to re-form as a
one-node cluster. Likewise, since SystemB does not receive heartbeat messages from SystemA,
SystemB also attempts to reform as a one-node cluster. During the election protocol, each node votes for
itself, giving both nodes 50 percent of the vote. Because both nodes have 50 percent of the vote, both
nodes now vie for the cluster lock. Only one node will get the lock.
Outcome. Assume SystemA gets the cluster lock. SystemA re-forms as a one-node cluster. After re-
formation, SystemA will make sure all applications configured to run on an existing clustered node are
running. When SystemA discovers Package2 is not running in the cluster it will try to start Package2 if
Package2 is configured to run on SystemA.
SystemB recognizes that it has failed to get the cluster lock and so cannot re-form the cluster. To release
all resources related toPackage2 (such as exclusive access to volume group vg02 and the Package2 IP
address) as quickly as possible, SystemB halts (system reset).
For more information on cluster failover, see the white paper Optimizing Failover Time in a Serviceguard
Environment (version A.11.19 or later) at http://www.hpe.com/info/linux-serviceguard-docs (Select
“White Papers”). For troubleshooting information, see Cluster Re-formations Caused by
MEMBER_TIMEOUT Being Set too Low.
• If service_fail_fast_enabled is set to yes in the package configuration file, Serviceguard will reboot
the node if there is a failure of that specific service.
• If node_fail_fast_enabled is set to yes in the package configuration file, and the package fails,
Serviceguard will halt (reboot) the node on which the package is running.
For more information, see Package Configuration Planning and Configuring Packages and Their
Services .
• In case of simple resources, failure of a resource must trigger the monitoring script to set the status of
a resource to 'down' using the cmsetresource command.
• In case of extended resources, the value fetched by the monitoring script can be set using the
cmsetresource command.
The Serviceguard Package Manager evaluates this value against the generic_resource_up_criteria set
for a resource in the packages where it is configured. If the value that is set (current_value) does not
satisfy the generic_resource_up_criteria, then the generic resource is marked as 'down' on that node.
NOTE: If a simple resource is down on a particular node, it is down on that node for all the packages
using it whereas, in case of an extended resource the resource may be up on a node for a particular
package and down for another package, since it is dependent on the generic_resource_up_criteria.
Choosing Switching and Failover Behavior provides advice on choosing appropriate failover behavior.
See Parameters for Configuring Generic Resources.
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 service_restart 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.
• General Planning
• Hardware Planning
• Power Supply Planning
• Cluster Lock Planning
• Volume Manager Planning
• Cluster Configuration Planning
• Package Configuration Planning
Blank Planning Worksheets on page 380 contains a set of blank worksheets which you may find useful
as an offline record of important details of the configuration.
NOTE: Planning and installation overlap considerably, so you may not be able to complete the
worksheets before you proceed to the actual configuration. In that case, fill in the missing elements to
document the system as you proceed with the configuration.
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:
• Set the Maximum Configured Packages parameter (described later in this chapter under Cluster
Configuration Planning high enough to accommodate the additional packages you plan to add.
• Networks should be pre-configured into the cluster configuration if they will be needed for packages
you will add later while the cluster is running. See LAN Information .
See Cluster and Package Maintenance, for more information about changing the cluster configuration
dynamically, that is, while the cluster is running.
• Lock LUN is not supported on iSCSI storage device. Hence, Quorum server is the only supported
quorum mechanism that can be used for arbitration.
• Live migration of KVM guests is not supported when the KVM guests are configured as Serviceguard
cluster nodes.
Lock LUN is not supported on iSCSI storage device. Hence, Quorum server is the only supported quorum
mechanism that can be used for arbitration.
• Cluster with VMware, RHEV, Hyper-V, or KVM guests from a single host as cluster nodes (cluster-in-a-
box; not recommended)
NOTE: This configuration is not recommended because failure of the host brings down all the nodes in
the cluster which is a single point of failure.
• Cluster with VMware, RHEV, Hyper-V, or KVM guests from multiple hosts as cluster nodes
• Cluster with VMware, RHEV, Hyper-V, or KVM guests and physical machines as cluster nodes
NOTE:
• Guests running on different Hypervisor (VMware, RHEV, Hyper-V, or KVM guests) must not be
configured as cluster nodes in the same cluster.
• Cluster with VMware from a single host as cluster nodes configuration must be avoided in
Serviceguard-xdc environment. For more information about Serviceguard-xdc support with VMware
virtual machines, see HPE Serviceguard Extended Distance Cluster for Linux A.12.00.40 Deployment
Guide .
• KVM guests cannot be used as cluster nodes in the Serviceguard-xdc environment.
For more information about how to integrate VMware and KVM guests as Serviceguard cluster nodes,
see the following white paper at http://www.hpe.com/info/linux-serviceguard-docs:
NOTE:
When migrating a VM cluster node for any maintenance activities, you might find that more than half of
the cluster nodes are running on one host. In this situation, the host becomes a single point of failure,
because failure of the host would cause the entire cluster to go down. To resolve this problem, you should
reset the configuration to equal node distribution across the hosts as soon as possible.
Prerequisites
When you use the following configurations, the vMotion is supported in the VMs used as Serviceguard
cluster nodes.
The following are the prerequisites:
• The boot image or boot disk of the guests must reside on shared disks; they must be accessible from
both the source and the destination hosts.
• The source and destination hosts must be managed by a common VMware vCenter server instance.
The same vCenter must be configured in the Serviceguard cluster.
◦ To configure the vCenter in Serviceguard cluster using Serviceguard Manager GUI, see Editing a
cluster section in Serviceguard Manager Online Help.
• An SLS environment would not require vCenter to be configured but to support vMotion, configuring
vCenter is a pre-requisite. To configure vCenter in Serviceguard cluster follow below steps:
◦ Create and populate Serviceguard Credential Store (SCS) utility with entries for the required
vCenter on which VMware virtual nodes are configured, which are part of existing Serviceguard
cluster. For more details, see cmvmusermgmt (1m) manpage.
◦ Add the appropriate VCENTER_SERVER parameter in the cluster configuration file. For more
information about these parameters and its description, see Specifying a VCENTER_SERVER or
ESX_HOST.
• When using Statically Linked Storage (SLS), it must be configured with Fiber Channel or iSCSI; all the
configurations must be completed as mentioned in the Shared Storage Configuration for vMotion when
using SLS and NPIV section in HPE Serviceguard for Linux with VMware virtual machines whitepaper
available at http://www.hpe.com/info/linux-serviceguard-docs.
• Ensure that required cluster and package resources (network and storage) are available on the target
hosts.
• The Migrate overlay lists the discovered available destination Esxi hosts in data center to which the
node can be migrated. You can now choose the destination host to Migrate. On successful
Migration, you will see the notification in the activity Page.
4. The node migrates from source host to selected destination host. This operation status is logged in the
Activity sidebar.
NOTE: When an active cluster node is migrated and the reattachment of the node post migration fails,
check the package and cluster logs for failures. Analyze and fix the issues to restart the cluster nodes.
To restart the node, use select Actions → Run to reattach the node back to the cluster.
Serviceguard and VMware HA can be configured to exist in the same cluster. Configure Serviceguard and
VMware HA for Statically linked storage (SLS) environment in a cluster. For Dynamically linked storage
(DLS) environment, you must configure appropriate VCENTER_SERVER parameter in the cluster
configuration file. For more information about this parameter and its description, see Specifying a
VCENTER_SERVER or ESX_HOST.
• All hosts that run Serviceguard virtual machines must be managed by a vCenter Server system. For
more information about vCenter Server system see, Specifying a VCENTER_SERVER or
ESX_HOST.
• All the virtual machines of Serviceguard cluster are from the hosts which are part of the same DRS
cluster.
NOTE: When you configure a Serviceguard cluster between VMs coming from DRS enabled hosts
and VMs from non-DRS enabled hosts, then there is a possibility that application can failover to VMs
running on non-DRS hosts. If this is not the desired behavior, then it is recommended to have
application package to be configured with VMs nodes that are part of DRS enabled hosts. For more
information about configuring nodes for a package see, configured_node under failover_policy
section.
• All hosts which are part of VMware DRS cluster must have shared storage.
• All virtual machines which are part of Serviceguard cluster must have shared storage configuration as
defined by Serviceguard.
• The VMware HA and FT features in VMware cluster is disabled.
• Serviceguard packages are configured with dynamically linked storages (DLS) disk access mode.
For more information about configuring DLS storage see, Storage configuration type in a VMware
environment.
• (Optional) VMware tools are installed on all virtual machines of the cluster.
For more information about additional requirements for VMware DRS and vMotion, see Serviceguard
support for VMware Migrate (vMotion).
For more information about VMware DRS cluster and its other requirements from VMware see, vSphere
Resource Management guide of VMware.
• Manual
• Partially Automated
• Fully Automated
Serviceguard cluster with VMware DRS cluster supports all three types of DRS automation levels. The
DRS automation level allows you to specify whether the recommendations are automatically applied by
the system (in case of fully automated mode) or allows you to apply the recommendations (in case of
manual mode) before the virtual machine is migrated.
NOTE: VMware DPM feature will be supported only if the standby hosts are part of VMware DRS cluster.
• The VMware DRS cluster is configured within the hosts of the single data center site.
• The VM-VM affinity rules or VM-Host affinity rules are configured such that the virtual machines are
within the datacenter site.
• VMware DRS is supported only with Serviceguard DLS type of storage configurations with vCenter
details (VCENTER_SERVER parameter) in cluster configuration file. SLS type storage configuration is
not supported.
• Storage DRS is not supported.
• VMware DRS with HA and FT feature is not supported in Serviceguard environment.
• VMware DRS in Serviceguard cluster is not supported with lock LUN.
• Configuring VMware DRS cluster across the Metrocluster or Coninentalcluster datacenter is not
supported. For complete understanding and description of VMware DRS features and its settings see,
VMware documentation.
• Uses the storage replication mechanism between the protected site and the recovery site for disaster
recovery of the protected site virtual infrastructure.
• It helps create virtual machine groups which will be administered or recovered together.
• It helps create a recovery plan for the virtual machines located at protected site. Recovery plan
execution results in recovery of virtual machines at the recovery site.
• You can test the recovery plan any time at the recovery site to assess the preparedness of recovery
site.
NOTE: Currently only ABR is supported as the data replication mechanism to configure Serviceguard and
SRM.
NOTE: While configuring RDM, ensure that the RDM mapping file is stored on the data store which is
created on RCVG LUN. That is, store the RDM mapping file on a VMFS volume covered by a replicated
LUN. If the mapping file is not available on the VMFS volume, then an RDM mapping file will not be
available in the recovery site for the recovery VM to use.
Prerequisites
• In the SRM environment, if you have configured the packages with DLS through Virtual Machine File
System (VMFS) or a mix of SLS and DLS type of configurations, then do not set AUTOSTART_CMCLD
to 1 in the $SGAUTOSTART file in the protected site cluster configuration.
• The DLS configuration is supported with only VCENTER_SERVER option in the cluster configuration. All
the hosts that run Serviceguard virtual machines in SRM environment must be managed by a vCenter
Server system. For more information about vCenter Server system see, Specifying a
VCENTER_SERVER or ESX_HOST.
• When DLS disk configuration is used for application data, then the DLS disk must be configured on
replicated LUN. For more information on storage configuration with DLS in VMware environment see,
Storage configuration type in a VMware environment.
• When you run the recovery plan, the datastore names used by packages might get renamed with the
prefix snap-xxx. This leads to the DLS packages start process to fail. For the successful recovery of
the packages with DLS type of configuration, you must complete the following steps to fix the
datastore name in the protected and the recovery sites.
1. In the vSphere web client, clickSite Recovery > Sites and select a site.
2. On the Manage tab, click Advanced Settings.
3. Click Storage Provider.
4. Click Edit to modify the storage provider settings.
5. Select the storageProvider.fixRecoveredDatastoreNames check box.
6. Click OK to save the changes.
Procedure
1. In the vSphere web client, select Site Recovery > Recovery Plans and select a recovery plan.
2. On the Related Objects tab, click Virtual Machines.
3. Right-click on the virtual machine and select Configure Recovery.
4. On the Recovery Properties tab, select Post-Power on Steps.
5. Click the plus icon to add the custom recovery step.
A dialog box appears.
6. Enter the following command on a single line with no carriage returns.
/bin/bash $SGSBIN/cmsrmconfig –u <username of the recovery site vCenter> -p
<Password of recovery site vCenter> &> < directory/output_file>
Where, $SGSBIN refers to /usr/local/cmcluster/bin/ in RHEL and /opt/cmcluster/bin in
SLES virtual machines and <directory/output_file> refers to the script location.
The execution status of the cmsrmconfig script is directed to the syslog. View the syslog for the
status of the script execution.
7. Repeat step 6 for every VM in the protection group.
• Using DHCP for SRM IP customization on Serviceguard cluster VMs is not supported as it assigns IP
addresses dynamically to network interfaces of VMs. This leads to the failure of the cluster and
package operations such as start.
• VMware SRM does not support having two IPv6 addresses for a network interface. However
Serviceguard supports this feature. Due to this restriction, if any cluster with more than one IPv6
address with VMware SRM is not supported.
• Manual IP customization for bond interface is not supported by SRM. Hence do not configure bond
interface in Serviceguard, instead configure multiple heartbeat networks.
• PACKAGE_NAME
• MONITORED_SUBNET
• PACKAGE_NETMASK_IP
• IP_ADDRESS
This network map file also contains the quorum server information of the protected site.
Update and distribute the network map file
After creating the network map file, you must update the file with network information such as heartbeat
network, package relocatable IP address, subnet motioning details, and quorum server details which are
valid at recovery site.
CAUTION: Hewlett Packard Enterprise strongly recommends that recovery site values must be
correct and valid. Be extremely cautious while entering the values for recovery site. Any wrong
value will lead to unrecoverable errors and unsuccessful recovery of cluster at the recovery site.
Use the -d option to distribute the network map file to all the configured cluster nodes. During the copy
operation, if any of the cluster nodes are not reachable or down, then the command fails to copy the file to
that node. You must manually copy the map file to the node or run the -d command again when the node
comes up or becomes reachable.
NOTE: The recovery site IP network information of srm-ip-config file must match the recovery plan
customization IP of each VM. Also the package IP and monitored subnet information must be in
accordance with the recovery site IP addresses.
NOTE: Any change in VMs network configuration at any of the sites require that the srm-ip-config file
must be recreated, updated, and distributed to all virtual machines in the cluster. This file must be kept
up-to-date and maintained to be in sync with network and quorum server configuration details of
Serviceguard configured cluster nodes.
NOTE: At the time of recovery plan execution, unavailability of quorum service to the Serviceguard cluster
VMs which are being recovered will lead to the failure of cluster and package start operation.
• Quorum Server network configuration should not be changed for cluster nodes configured with uniform
IP address across the protected and recovery sites.
• With non-uniform IP address configuration used between the protected and recovery sites, the srm-
ip-config file must be updated and retained for site recovery operation with quorum server
configuration details such as QUORUM_NAME and QUORUM_IP_1.
• Prior to recovery of Serviceguard cluster nodes at the recovery site, Quorum Server node must be
recovered first by assigning higher priority to it for recovery operation.
• Quorum Server node network details corresponding to protected and recovery site should be updated
in /etc/hosts file of all cluster nodes.
• The number of IP addresses and network interfaces used for quorum server node must be the same
for protected and recovery sites.
Restrictions
• Serviceguard does not support including multiple priority group virtual machines of SRM site to be part
of a cluster.
• In the Serviceguard cluster you cannot configure some network interfaces to have uniform IP
addresses, whereas the rest of the interfaces to have non-uniform IP addresses across the SRM sites.
All nodes of a cluster must have either uniform or non-uniform IP address configuration between the
protected and recovery sties.
• For non-uniform IP/subnet addresses between the sites, Serviceguard is supported with only manual
IP customization of SRM..
• Serviceguard does not support migrating from one type of networking address (IPv4/IPv6) to other
type of address (IPv6/IPv4) during recovery. That is, an IPv4 address cannot be migrated to a IPv6
address and the other way around.
• SAP HANA toolkit package configuration should not be included for SRM recovery.
• Oracle data guard toolkit is supported only with a LUN which is part of RCVG group.
• Storage vMotion with VMware SRM in Serviceguard environment is not supported.
• When the recovery plan is tested on the Serviceguard cluster nodes running at protected site, SRM
recovery plan does not bring up the cluster and packages at recovery site.
• SRM network map file srm-ip-config must not be created or present under $SGRUN for uniform IP
address configuration between the sites. Keeping this file in uniform IP configuration will lead to failure
of recovery plan.
96 Restrictions
Summary of Recommendations
• HPE recommends to keep the shutdown action for a clustered VM as “Shutdown guest OS before
power off”.
• HPE recommends to keep a sync option of a storage between sites in such a way that required
configuration files of Serviceguard cluster must be available at the recovery site during recovery plan
execution.
• Type of replication (synchronous or asynchronous) selected for ABR depends on your business
requirements. HPE recommends that srm-ip-config residing disks of cluster nodes must be kept in
sync with the protected and recovery sites configured with non-uniform IP addresses. Failure to
comply with this recommendation might lead to unsuccessful SRM recovery.
• As the bond interface configuration is not supported, HPE recommends to configure the cluster in
SRM environment with dual heartbeat interface.
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.
You may also find it useful to record the information on the Hardware worksheet Hardware Worksheet
on page 380 indicating which device adapters occupy which slots and updating the details as you create
the cluster configuration. Use one form for each node (server).
SPU Information
SPU information includes the basic characteristics of the server systems you are using in the cluster.
You may want to record the following on the Hardware worksheet Hardware Worksheet on page 380 :
Server Series Number
Enter the series number, for example, DL980 G7.
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.
Hewlett Packard Enterprise recommends that you configure heartbeats on all subnets, including those to
be used for client data.
Collect the following information for each LAN interface:
Subnet Name
The IP address for the subnet. Note that heartbeat IP addresses must be on the same subnet on
each node.
Summary of Recommendations 97
Interface Name
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.
IP Address
The IP address to be used on this interface.
An IPv4 address is a string of 4 digits separated with decimals, in this form:
nnn.nnn.nnn.nnn
An IPV6 address is a string of 8 hexadecimal values separated with colons, in this form:
xxx:xxx:xxx:xxx:xxx:xxx:xxx:xxx
For more details of IPv6 address format, see IPv6 Network Support.
Kind of LAN Traffic
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.
This information is used in creating the subnet groupings and identifying the IP addresses used in the
cluster and package configuration files.
Shared Storage
FibreChannel and iSCSI can be used for clusters of up to 32 nodes.
FibreChannel
FibreChannel cards can be used to connect up to 32 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.
NOTE:
Multipath capabilities are supported by FibreChannel HBA device drivers and the Linux Device Mapper.
Check with the storage device documentation for details.
iSCSI
You can use the storage link based on IP to connect up to 32 nodes to a disk array containing storage.
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.
You can use the worksheet to record the names of the device files that correspond to each LUN for the
Fibre-Channel-attached and iSCSI attached storage unit.
98 Shared Storage
Bus Type
Indicate the type of bus. Supported buses are SAS (Serial Attached SCSI) and FibreChannel.
LUN Number
Indicate the number of the LUN as defined in the storage unit.
Slot Number
Indicate the slot number(s) into which the SCSI or FibreChannel interface card(s) are inserted in the
backplane of the computer.
Address
Enter the bus hardware path number, which is the numeric part of the host parameter, which can be
seen on the system by using the following command:
cat /proc/scsi/scsi
• du
• df
• mount
• vgdisplay -v
• lvdisplay -v
See the manpages for these commands for information about specific usage. The commands should be
issued from all nodes after installing the hardware and rebooting the system. The information will be
useful when doing LVM and cluster configuration.
• You cannot use more than one type of lock in the same cluster.
• An iSCSI storage device does not support configuring a lock LUN.
• Can be used with up to 150 clusters, not exceeding 300 nodes total.
• Can support a cluster with any supported number of nodes.
• Can support a cluster with any supported number of nodes.
• Can communicate with the cluster on up to two subnets (a primary and an alternate).
IMPORTANT:
If you plan to use a Quorum Server, make sure you read the HPE Serviceguard Quorum Server
Version A.12.00.30 Release Notes before you proceed. You can find them at http://www.hpe.com/
info/linux-serviceguard-docs (Select HP Serviceguard Quorum Server Software). You should
also consult the Quorum Server white papers at the same location.
• You must upgrade all the nodes in the cluster and Quorum Server to version A.12.00.30.
• Configure the cluster to use Smart Quorum. For more information on Smart Quorum features, see
Understanding the Smart Quorum on page 324.
• Choose your one preferred workload.
sc_site SiteA
sc_site SiteB
You must choose your preferred workload package for the following:
• When preferred workload is running, the site running it will always win the quorum.
• When preferred workload is not running, the site to reach the Quorum Server first wins the quorum.
You will also notice that the required monitor scripts and the generic resource is generated by the site
controller.
For Example,
Generic Resource Snapshot:
generic_resource_name sitecontroller_genres
generic_resource_evaluation_type during_package_start
generic_resource_up_criteria >1
For Example,
Monitoring service Snapshot:
generic_resource_up_criteria >1
service_name sitecontroller_service
service_cmd "$SGCONF/scripts/sg/sc_mon.sh monitor"
service_restart none
service_fail_fast_enabled no
service_halt_timeout 300
service_halt_on_maintenance no
4. Set the dependency on the most critical package created in step 2. In the following example, the
dependency is set to the most critical package, which is CRITICAL_PKG = UP.
For Example:
dependency_name mydep
dependency_condition CRITICAL_PKG = UP
dependency_location same_node
5. Enable the Smart Quorum in the cluster. To use Smart Quorum feature, you must enable
QS_SMART_QUORUM parameter in the cluster configuration file. For more information about this
IMPORTANT: You must have both Serviceguard and Quorum Server version A.12.00.30, or later to
support the Smart Quorum server feature.
• The volume groups that contain high availability applications, services, or data must be on a bus or
buses available to the primary node and all adoptive nodes.
• High availability applications, services, and data should be placed in volume groups that are separate
from non-high availability applications, services, and data.
• You must group high availability applications, services, and data, whose control needs to be
transferred together, on a single volume group or a series of volume groups.
• You must not group two different high availability applications, services, or data, whose control needs
to be transferred independently, on the same volume group.
• Your root disk must not belong to a volume group that can be activated on another node.
VxVM Planning
You can create storage groups using the LVM (Logical Volume Manager, described in the previous
section) or using Veritas VxVM software.
When designing a storage configuration using VxVM disk groups, consider the following:
• High availability applications, services, and data must be placed in separate disk groups from non-high
availability applications, services, and data.
• You must not group two different high availability applications, services, or data, whose control needs
to be transferred independently, onto the same disk group.
• Your root disk can belong to an LVM or VxVM volume group that is not shared among cluster nodes.
Easy Deployment
Easy deployment is a feature that provides a quick and simple way to create a cluster. Easy deployment
automates the security, shared storage, and networking configuration required by the package and
cluster. Also, easy deployment simplifies cluster lock configuration. These can be achieved by using
cmquerycl, cmpreparestg, and cmdepolycl commands as described in the following sections.
cmquerycl -N
The cmquerycl queries available network configuration and generates network template.
Example
cmquerycl –n node1 –n node2 –N <network_template_file>
The template file generated from the previous command must be populated with the appropriate IP
addresses and subnet details. This file is then provided as input to the cmdeploycl command (see
section Full Network Probing on page 195) which applies the network configuration during cluster
creation.
cmpreparestg
The cmpreparestg creates LVM volume groups and VxVM disk groups from available shared disks. It
can also modify existing LVM volume groups and VxVM disk groups that are configured on one or more of
the cluster nodes. For more information, see cmpreparestg (1m) manpage.
Examples
Create a new LVM volume group “lvmvg” and import it to nodes node1, node2, node3, and node4:
cmpreparestg -l lvmvg -n node1 -n node2 -n node3 -n node4 -p /dev/sdz
Create a new VxVM disk group “cvmdg” and import it to nodes node1, node2, node3, and node4:
cmpreparestg -g cvmdg -n node1 -n node2 -n node3 -n node4 -p /dev/sdz
cmpreparecl
The cmpreparecl script allows you to ease the process of setting up the servers participating in the
cluster. It also checks for the availability of ports used by Serviceguard Linux, starts the xinetd services,
updates specific files, and sets up the firewall. As of Serviceguard A.11.20.10, the cmpreparecl script is
supported.
NOTE: After you run the cmpreparecl script, you can start the cluster configuration.
Advantages
Limitations
• All the nodes that are part of the cluster must be known before hand.
NOTE: After the configuration is complete, you cannot add the nodes.
IMPORTANT: The nodes which are given as inputs should not have cluster configured in them.
Before you start, you should have done the planning and preparation as described in previous
sections. You must also do the following:
• Install Serviceguard on each node that is to be configured into the cluster; see Installing and
Updating Serviceguard .
You must have superuser capability on each node.
• Make sure all the nodes have access to at least one fully configured network.
• Make sure all the subnets used by the prospective nodes are accessible to all the nodes.
106 cmdeploycl
cmpreparecl –n <node1> —n <node2> -p
2. Run the cmpreparecl command with the nodes on which the cluster needs to be configured:
cmpreparecl –n <node1> —n <node2>
a. Verifies the availability of ports required by Serviceguard. For information about port requirements
on Red Hat Enterprise Linux Server and SUSE Linux Enterprise Server, see the following
documents available at http://www.hpe.com/info/linux-serviceguard-docs:
c. Enables the ident protocol daemon. Starts authd on Red Hat Enterprise Linux Server and starts
identd on SUSE Linux Enterprise Server.
g. The host names of the nodes and quorum if specified, their IP addresses are validated and
updated in the /etc/hosts file.
NOTE: The modified files are backed up in the same directory as the original files with ".original"
extension and the output is logged to the /tmp/cmpreparecl.log file. This log file is a cumulative
log of the configuration done on the node. Each time you run cmpreparecl, logs are appended with
appropriate time stamp.
For more information, and other options, see manpages for cmpreparecl (1m).
NOTE: For heartbeat configuration requirements, see the discussion of the HEARTBEAT_IP parameter
later in this chapter. For more information about managing the speed of cluster re-formation, see the
discussion of the MEMBER_TIMEOUT parameter, and further discussion under What Happens when a
Node Times Out, and, for troubleshooting, Cluster Re-formations Caused by MEMBER_TIMEOUT
Being Set too Low.
• IPv4-only
• IPv6-only
• Mixed
IPv4-only means that Serviceguard will try to resolve the hostnames to IPv4 addresses only.
IMPORTANT: You can configure an IPv6 heartbeat, or stationary or relocatable IP address, in any
mode: IPv4-only, IPv6-only, or mixed. You can configure an IPv4 heartbeat, or stationary or
relocatable IP address, in IPv4-only or mixed mode.
IPv6-only means that Serviceguard will try to resolve the hostnames to IPv6 addresses only.
Mixed means that when resolving the hostnames, Serviceguard will try both IPv4 and IPv6 address
families.
You specify the address family the cluster will use in the cluster configuration file (by setting
HOSTNAME_ADDRESS_FAMILY to IPV4, IPV6, or ANY), or by means of the -a of cmquerycl (1m);
see Specifying the Address Family for the Cluster Hostnames. The default is IPV4. See the
subsections that follow for more information and important rules and restrictions.
NOTE:
This applies only to hostname resolution. You can have IPv6 heartbeat and data LANs no matter what the
HOSTNAME_ADDRESS_FAMILY parameter is set to. (IPv4 heartbeat and data LANs are allowed in IPv4
and mixed mode.)
108 About Hostname Address Families: IPv4-Only, IPv6-Only, and Mixed Mode
NOTE: How the clients of IPv6-only cluster applications handle hostname resolution is a matter for the
discretion of the system or network administrator; there are no Hewlett Packard Enterprise requirements
or recommendations specific to this case.
In IPv6-only mode, all Serviceguard daemons will normally use IPv6 addresses for communication among
the nodes, although local (intra-node) communication may occur on the IPv4 loopback address.
For more information about IPv6, see IPv6 Network Support.
Rules and Restrictions for IPv6-Only Mode
• Serviceguard does not support VMware SUSE Linux Enterprise Server guests running in IPv6–only
mode as cluster nodes.
• Red Hat 5 and later versions clusters are not supported.
NOTE: This also applies if HOSTNAME_ADDRESS_FAMILY is set to ANY; Red Hat 5 supports only
IPv4-only clusters.
• All addresses used by the cluster must be in each node's /etc/hosts file. In addition, the file must
contain the following entry:
::1 localhost ipv6-localhost ipv6-loopback
For more information and recommendations about hostname resolution, see Configuring Name
Resolution.
• All addresses must be IPv6, apart from the node's IPv4 loopback address, which cannot be removed
from /etc/hosts.
• The node's public LAN address (by which it is known to the outside world) must be the last address
listed in /etc/hosts.
Otherwise there is a possibility of the address being used even when it is not configured into the
cluster.
NOTE: This also applies if HOSTNAME_ADDRESS_FAMILY is set to ANY. See Allowing Root
Access to an Unconfigured Node for more information.
• If you use a Quorum Server, you must make sure that the Quorum Server hostname (and the alternate
Quorum Server address specified by QS_ADDR, if any) resolve to IPv6 addresses, and you must use
Quorum Server version A.12.00.00. See the latest Quorum Server release notes for more information;
you can find them at http://www.hpe.com/info/linux-serviceguard-docs.
NOTE: The Quorum Server itself can be an IPv6–only system; in that case it can serve IPv6–only and
mixed-mode clusters, but not IPv4–only clusters.
• If you use a Quorum Server, and the Quorum Server is on a different subnet from cluster, you must
use an IPv6-capable router.
• Hostname aliases are not supported for IPv6 addresses, because of operating system limitations.
NOTE: This applies to all IPv6 addresses, whether HOSTNAME_ADDRESS_FAMILY is set to IPV6 or
ANY.
If you decide to migrate the cluster to IPv6-only mode, you should plan to do so while the cluster is down.
NOTE: This also applies if HOSTNAME_ADDRESS_FAMILY is set to IPv6; Red Hat 5 supports only
IPv4-only clusters.
• The hostname resolution file on each node (for example, /etc/hosts) must contain entries for all the
IPv4 and IPv6 addresses used throughout the cluster, including all STATIONARY_IP and
HEARTBEAT_IP addresses as well any private addresses. There must be at least one IPv4 address in
this file (in the case of /etc/hosts, the IPv4 loopback address cannot be removed). In addition, the
file must contain the following entry:
::1 localhost ipv6-localhost ipv6-loopback
For more information and recommendations about hostname resolution, see Configuring Name
Resolution.
• Hostname aliases are not supported for IPv6 addresses, because of operating system limitations.
NOTE: This applies to all IPv6 addresses, whether HOSTNAME_ADDRESS_FAMILY is set to IPV6 or
ANY.
NOTE: See Reconfiguring a Cluster on page 285 for a summary of changes you can make while the
cluster is running.
NOTE: In addition, the following characters must not be used in the cluster name if you are using the
Quorum Server: at-sign (@), equal-sign (=), or-sign (|), semicolon (;).
These characters are deprecated, meaning that you should not use them, even if you are not using
the Quorum Server.
All other characters are legal. The cluster name can contain up to 39 characters.
CAUTION: Make sure that the cluster name is unique within the subnets configured on the
cluster nodes; under some circumstances Serviceguard may not be able to detect a duplicate
name and unexpected problems may result.
In particular make sure that two clusters with the same name do not use the same quorum
server; this could result in one of the clusters failing to obtain the quorum server’s arbitration
services when it needs them, and thus failing to re-form.
HOSTNAME_ADDRESS_FAMILY
Specifies the Internet Protocol address family to which Serviceguard will try to resolve cluster node
names and Quorum Server host names. Valid values are IPV4, IPV6, and ANY. The default is IPV4.
• IPV4 means Serviceguard will try to resolve the names to IPv4 addresses only.
• IPV6 means Serviceguard will try to resolve the names to IPv6 addresses only.
◦ ANY means Serviceguard will try to resolve the names to both IPv4 and IPv6 addresses.
IMPORTANT: See About Hostname Address Families: IPv4-Only, IPv6-Only, and Mixed
Mode for important information. See also the latest Serviceguard release notes at
http://www.hpe.com/info/linux-serviceguard-docs.
QS_HOST
The fully-qualified hostname or IP address of a host system outside the current cluster that is
providing quorum server functionality. It must be (or resolve to) an IPv4 address on Red Hat 5. On
SLES 11, it can be (or resolve to) either an IPv4 or an IPv6 address if
HOSTNAME_ADDRESS_FAMILY is set to ANY, but otherwise must match the setting of
IMPORTANT: See also About Hostname Address Families: IPv4-Only, IPv6-Only, and
Mixed Mode for important information about requirements and restrictions in an IPv6–only
cluster.
Can be changed while the cluster is running; see What Happens when You Change the Quorum
Configuration Online for important information.
QS_ADDR
An alternate fully-qualified hostname or IP address for the quorum server. It must be (or resolve to) an
IPv4 address on Red Hat 5 and Red Hat 6. On SLES 11, it can be (or resolve to) either an IPv4 or an
IPv6 address if HOSTNAME_ADDRESS_FAMILY is set to ANY, but otherwise must match the setting
of HOSTNAME_ADDRESS_FAMILY. This parameter is used only if you use a quorum server and
want to specify an address on an alternate subnet by which it can be reached. On SLES 11, the
alternate subnet need not use the same address family as QS_HOST if
HOSTNAME_ADDRESS_FAMILY is set to ANY. For more information, see Cluster Lock Planning
on page 100 and Specifying a Quorum Server.
IMPORTANT: For special instructions that may apply to your version of Serviceguard and the
Quorum Server see “Configuring Serviceguard to Use the Quorum Server” in the latest version
HPE Serviceguard Quorum Server Version A.12.00.30 Release Notes, at http://
www.hpe.com/info/linux-serviceguard-docs (Select HP Serviceguard Quorum Server
Software).
Can be changed while the cluster is running; see What Happens when You Change the Quorum
Configuration Online for important information.
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). Minimum is 10,000,000 (10 seconds). Maximum is
2,147,483,647 (approximately 35 minutes).
Can be changed while the cluster is running; see What Happens when You Change the Quorum
Configuration Online for important information.
QS_TIMEOUT_EXTENSION
You can use the QS_TIMEOUT_EXTENSION to increase the time interval after which the current
connection (or attempt to connect) to the quorum server is deemed to have failed; but do not do so
until you have read the HPE Serviceguard Quorum Server Version A.12.00.30 Release Notes, and in
particular the following sections in that document: “About the QS Polling Interval and Timeout
Extension”, “Network Recommendations”, and “Setting Quorum Server Parameters in the Cluster
Configuration File”.
Can be changed while the cluster is running; see What Happens when You Change the Quorum
Configuration Online for important information.
QS_SMART_QUORUM
This parameter can be set to either ON or OFF. By default, QS_SMART_QUORUM parameter is
commented. This can be enabled only in a site-aware cluster (that is, where sites are configured). If
NODE_NAME
The hostname of each system that will be a node in the cluster.
CAUTION: Make sure that the node name is unique within the subnets configured on the
cluster nodes; under some circumstances Serviceguard may not be able to detect a duplicate
name and unexpected problems may result.
Do not use the full domain name. For example, enter ftsys9, not ftsys9.cup.hp.com. A cluster
can contain up to 32 nodes.
IMPORTANT: Node names must be 39 characters or less, and are case-sensitive; for each
node, the node_name in the cluster configuration file must exactly match the corresponding
node_name in the package configuration file (see Configuring Packages and Their
Services ) and these in turn must exactly match the hostname portion of the name specified in
the node’s networking configuration. (Using the above example, ftsys9 must appear in
exactly that form in the cluster configuration and package configuration files, and as
ftsys9.cup.hp.com in the DNS database).
CAUTION: Make sure that the Esxi host name is unique within the subnets configured on the
cluster nodes; under certain circumstances Serviceguard may not be able to detect a duplicate
name or IP address and unexpected problems may result.
VCENTER_SERVER
Specifies host name, aliases, or IP address of vCenter server. This parameter is cluster-wide. Only
one vCenter server is supported. If you specify VCENTER_SERVER parameter, then you must not
specify ESX_HOST parameter for any of the VMWare guest nodes configured in the cluster. This is
an optional parameter.
CAUTION: Make sure that the VMware vCenter name is unique within the subnets configured
on the cluster nodes; under certain circumstances Serviceguard may not be able to detect a
duplicate name or IP address and unexpected problems may result.
NOTE: The IP address host name resolution for the VMware vCenter server used in the cluster
configuration must be populated in the local /etc/hosts file of every cluster nodes. For more
information, see Configuring Name Resolution.
All VMware vCenter host addresses must be IPv4.
CLUSTER_LOCK_LUN
The pathname of the device file to be used for the lock LUN on each node. The pathname can
contain up to 39 characters.
See Setting up a Lock LUN on page 178 and Specifying a Lock LUN on page 195
Can be changed while the cluster is running; see Updating the Cluster Lock LUN Configuration
Online. See also What Happens when You Change the Quorum Configuration Online for
important information.
NOTE: An iSCSI storage device does not support configuring a lock LUN.
SITE
The name of a site (defined by SITE_NAME) to which the node identified by the preceding
NODE_NAME entry belongs. Can be used only in a site-aware disaster recovery cluster, which
requires Metrocluster (additional Hewlett Packard Enterprise software); see the documents listed
under Cross-Subnet Configurations for more information.
If SITE is used, it must be used for each node in the cluster (that is, all the nodes must be associated
with some defined site, though not necessarily the same one).
If you are using SITEs, you can restrict the output of cmviewcl (1m) to a given site by means of the
-S <sitename> option. In addition, you can configure a site_preferred or
site_preferred_manual failover_policy for a package.
IMPORTANT: SITE must be 39 characters or less, and are case-sensitive; each SITE entry
must exactly match with one of the SITE_NAME entries. Duplicate SITE entries are not
allowed.
NOTE: Any subnet that is configured in this cluster configuration file as a SUBNET for IP monitoring
purposes, or as a monitored_subnet in a package configuration file (see Package Configuration
Planning) must be specified in the cluster configuration file via NETWORK_INTERFACE and either
STATIONARY_IP or HEARTBEAT_IP. Similarly, any subnet that is used by a package for relocatable
addresses should be configured into the cluster via NETWORK_INTERFACE and either
STATIONARY_IP or HEARTBEAT_IP. For more information about relocatable addresses, see
Stationary and Relocatable IP Addresses and Monitored Subnets on page 56 and the
descriptions of the package ip_ parameters.
For information about changing the configuration online, see Changing the Cluster Networking
Configuration while the Cluster Is Running on page 290.
HEARTBEAT_IP
IP notation indicating this node's connection to a subnet that will carry the cluster heartbeat.
NOTE: Any subnet that is configured in this cluster configuration file as a SUBNET for IP monitoring
purposes, or as a monitored_subnet in a package configuration file ( see Package Configuration
Planning) must be specified in the cluster configuration file via NETWORK_INTERFACE and either
STATIONARY_IP or HEARTBEAT_IP. Similarly, any subnet that is used by a package for relocatable
addresses should be configured into the cluster via NETWORK_INTERFACE and either
STATIONARY_IP or HEARTBEAT_IP. For more information about relocatable addresses, see
Stationary and Relocatable IP Addresses and Monitored Subnets on page 56 and the
descriptions of the package ip_ parameters.
You cannot configure more than one heartbeat IP address on an interface; only one HEARTBEAT_IP
is allowed for each NETWORK_INTERFACE.
NOTE: The use of a private heartbeat network is not advisable if you plan to use Remote Procedure
Call (RPC) protocols and services. RPC assumes that each network adapter device or I/O card is
connected to a route-able network. An isolated or private heartbeat LAN is not route-able, and could
cause an RPC request-reply, directed to that LAN, to timeout without being serviced.
NFS, NIS and NIS+, and CDE are examples of RPC based applications that are frequently used.
Other third party and home-grown applications may also use RPC services through the RPC API
libraries. If necessary, consult with the application vendor.
STATIONARY_IP
This node's IP address on each subnet that does not carry the cluster heartbeat, but is monitored for
packages.
NOTE: Any subnet that is configured in this cluster configuration file as a SUBNET for IP monitoring
purposes, or as a monitored_subnet in a package configuration file (see Package Configuration
Planning) must be specified in the cluster configuration file via NETWORK_INTERFACE and either
STATIONARY_IP or HEARTBEAT_IP. Similarly, any subnet that is used by a package for relocatable
addresses should be configured into the cluster via NETWORK_INTERFACE and either
STATIONARY_IP or HEARTBEAT_IP. For more information about relocatable addresses, see
Stationary and Relocatable IP Addresses and Monitored Subnets on page 56 and the
descriptions of the package ip_ parameters.
NOTE: cmapplyconf will fail if any node defines a capacity and any package has
min_package_node as its failover_policy or automatic as its failback_policy.
To specify more than one capacity for a node, repeat these parameters for each capacity. You can
specify a maximum of four capacities per cluster, unless you use the reserved CAPACITY_NAME
package_limit; in that case, you can use only that capacity throughout the cluster.
For all capacities other than package_limit, the default weight for all packages is zero, though you
can specify a different default weight for any capacity other than package_limit; see the entry for
WEIGHT_NAME and WEIGHT_DEFAULT later in this list.
See About Package Weights for more information.
Can be changed while the cluster is running; will trigger a warning if the change would cause a
running package to fail.
MEMBER_TIMEOUT
The amount of time, in microseconds, after which Serviceguard declares that the node has failed and
begins re-forming the cluster without this node.
Default value: 14 seconds (14,000,000 microseconds).
This value leads to a failover time of between approximately 18 and 22 seconds, if you are using a
quorum server, or a Fiber Channel cluster lock, or no cluster lock. Increasing the value to 25 seconds
increases the failover time to between approximately 29 and 39 seconds. The time will increase by
between 5 and 13 seconds if you are you using a SCSI cluster lock or dual Fibre Channel cluster
lock).
Maximum supported value: 300 seconds (300,000,000 microseconds).
If you enter a value greater than 60 seconds (60,000,000 microseconds), cmcheckconf and
cmapplyconf will note the fact, as confirmation that you intend to use a large value.
Minimum supported values:
With the lowest supported value of 3 seconds, a failover time of 4 to 5 seconds can be achieved.
Keep the following guidelines in mind when deciding how to set the value.
Guidelines: You need to decide whether it's more important for your installation to have fewer (but
slower) cluster re-formations, or faster (but possibly more frequent) re-formations:
• To ensure the fastest cluster re-formations, use the minimum value applicable to your cluster. But
keep in mind that this setting will lead to a cluster re-formation, and to the node being removed
from the cluster and rebooted, if a system hang or network load spike prevents the node from
sending a heartbeat signal within the MEMBER_TIMEOUT value. More than one node could be
affected if, for example, a network event such as a broadcast storm caused kernel interrupts to be
turned off on some or all nodes while the packets are being processed, preventing the nodes from
sending and processing heartbeat messages.
See Cluster Re-formations Caused by MEMBER_TIMEOUT Being Set too Low on page 356
for troubleshooting information.
• For fewer re-formations, use a setting in the range of 10 to 25 seconds (10,000,000 to 25,000,000
microseconds), keeping in mind that a value larger than the default will lead to slower re-
formations than the default. A value in this range is appropriate for most installations
See also What Happens when a Node Times Out on page 77, Cluster Daemon: cmcld on page
28, and the white paper Optimizing Failover Time in a Serviceguard Environment (version A.11.19
and later) at http://www.hpe.com/info/linux-serviceguard-docs.
Can be changed while the cluster is running.
AUTO_START_TIMEOUT
The amount of time a node waits before it stops trying to join a cluster during automatic cluster
startup. All nodes wait this amount of time for other nodes to begin startup before the cluster
completes the operation. The time should be selected based on the slowest boot time in the cluster.
Enter a value equal to the boot time of the slowest booting node minus the boot time of the fastest
booting node plus 600 seconds (ten minutes).
Default is 600,000,000 microseconds.
Can be changed while the cluster is running.
NETWORK_POLLING_INTERVAL
Specifies the Interval at which Serviceguard periodically polls all the LAN Interfaces (link-level and the
ones configured for IP MONITOR)
Default is 2,000,000 microseconds (2 seconds). This means that the network manager will poll each
network interface every 2 seconds, to make sure it can still send and receive information.
The minimum value is 1,000,000 (1 second) and the maximum value supported is 30 seconds.
• Serviceguard also uses this parameter to calculate the number of consecutive packets that each
LAN interface can miss/receive to mark a LAN interface DOWN/UP.
When an interface is monitored at IP-Level, and the NETWORK_POLLING_INTERVAL is defined
to be 8 seconds or more, then the number of consecutive packets that each LAN interface can
miss/receive to be marked DOWN/UP is 2.
For example, If NETWORK_POLLING_INTERVAL is defined to be 10 seconds, then the detection
of failure/recovery for a interface at IP Level will happen between 10 to 20 seconds.
The following are the failure/recovery detection times for different values of Network Polling Interval
(NPI) for an IP monitored Ethernet interface:
1 ~ NPI x 8 - NPI x 9
2 ~ NPI x 4 - NPI x 5
3 ~ NPI x 3 - NPI x 4
4 to 8 ~ NPI x 2 - NPI x 3
IMPORTANT: Hewlett Packard Enterprise strongly recommends using the default. Changing
this value can affect how quickly the link-level and IP-level monitors detect a network failure.
See Monitoring LAN Interfaces and Detecting Failure: Link Level on page 60.
• For extended-distance clusters using software mirroring across data centers over links between
iFCP switches; it must be set to the switches' maximum R_A_TOV value.
• For switches and routers connecting an NFS server and cluster-node clients that can run
packages using the NFS-mounted file system; see Planning for NFS-mounted File Systems on
page 126.
To set the value for the CONFIGURED_IO_TIMEOUT_EXTENSION, you must first determine the
Maximum Bridge Transit Delay (MBTD) for each switch and router. The value should be in the
vendors' documentation. Set the CONFIGURED_IO_TIMEOUT_EXTENSION to the sum of the
values for the switches and routers. If there is more than one possible path between the NFS
server and the cluster nodes, sum the values for each path and use the largest number.
CAUTION: Serviceguard supports NFS-mounted file systems only over switches and
routers that support MBTD. If you are using NFS-mounted file systems, you must set
CONFIGURED_IO_TIMEOUT_EXTENSION as described here.
For more information about MBTD, see the white paper Support for NFS as a filesystem type with
HPE Serviceguard A.11.20 on HP-UX and Linux available at http://www.hpe.com/info/linux-
serviceguard-docs.
NOTE: cmquerycl (1m) detects first-level routers in the cluster (by looking for gateways in each
node's routing table) and lists them here as polling targets. If you run cmquerycl with the -w full
option (for full network probing) it will also verify that the gateways will work correctly for monitoring
purposes.
Can be changed while the cluster is running; must be removed if the preceding SUBNET entry is
removed.
WEIGHT_NAME, WEIGHT_DEFAULT
Default value for this weight for all packages that can have weight; see Rules and Guidelines on
page 149. WEIGHT_NAME specifies a name for a weight that exactly corresponds to a
CAPACITY_NAME specified earlier in the cluster configuration file. (A package has weight; a node
has capacity.) The rules for forming WEIGHT_NAME are the same as those spelled out for
CAPACITY_NAME earlier in this list.
These parameters are optional, but if they are defined, WEIGHT_DEFAULT must follow
WEIGHT_NAME, and must be set to a floating-point value between 0 and 1000000. If they are not
specified for a given weight, Serviceguard will assume a default value of zero for that weight. In either
case, the default can be overridden for an individual package via the weight_name and weight_value
parameters in the package configuration file.
For more information and examples, see Defining Weights on page 147.
For the reserved weight and capacity package_limit, the default weight is always one. This default
cannot be changed in the cluster configuration file, but it can be overridden for an individual package
in the package configuration file.
• GENERIC_RESOURCE_NAME
• GENERIC_RESOURCE_TYPE
• GENERIC_RESOURCE_CMD
• GENERIC_RESOURCE_SCOPE
• GENERIC_RESOURCE_RESTART
• GENERIC_RESOURCE_HALT_TIMEOUT
GENERIC_RESOURCE_NAME app_mon
GENERIC_RESOURCE_TYPE simple
GENERIC_RESOURCE_CMD /usr/bin/app_monitor.sh
GENERIC_RESOURCE_SCOPE NODE
GENERIC_RESOURCE_RESTART 35
GENERIC_RESOURCE_HALT_TIMEOUT 60000000
GENERIC_RESOURCE_TYPE
Generic resources can be of two types - Simple and Extended.
Simple generic resource type
• For a simple resource, the monitoring mechanism is based on the status of the resource.
• The status can be UP, DOWN, or UNKNOWN.
• The default status is UNKNOWN; UP and DOWN can be set using the cmsetresource(1m)
command.
• For an extended resource, the monitoring mechanism is based on the current value of the
resource.
• The default current value is 0.
• Valid values are positive integer values ranging from 1 to 2147483647.
NOTE: You can get or set the status/value of a simple/extended generic resource using the
cmgetresource(1m) and cmsetresource(1m) commands respectively. See Getting and
Setting the Status/Value of a Simple/Extended Cluster Generic Resource on page 211 and the
manpages for more information.
A single cluster can have a combination of simple and extended resources, but a given generic
resource cannot be configured as a simple resource and as an extended resource. It must be either
simple generic resource or extended generic resource.
GENERIC_RESOURCE_CMD
It is the command to be executed to start and stop the monitoring of a cluster generic resource. The
command that runs the program or function for this GENERIC_RESOURCE_CMD, for
example, /usr/bin/cpu_monitor.sh
Only Serviceguard environment variables defined in the /etc/cmcluster.conf file or an absolute
pathname can be used with generic resource command; neither the PATH variable nor any other
environment variable is passed to the command. The default shell is /bin/sh. For example,
• GENERIC_RESOURCE_CMD $SGCONF/cluster_generic_resource/script.sh
• GENERIC_RESOURCE_CMD /etc/cmcluster/cluster_generic_resource/script.sh
• GENERIC_RESOURCE_CMD /usr/local/cmcluster/conf/generic_resource/
script.sh
Care must be taken when defining the cluster generic resource run commands. Each run command
must be executed in the following order:
• Serviceguard monitors the process ID (PID) of the process the run command creates.
• When the command exits, Serviceguard generic resource daemon (cmresourced) determines
that a failure has occurred and takes appropriate action of restarting the generic resource
command. This is true based on value for parameter generic resource restart.
• If a generic resource run command is a shell script that runs some other command and then exits,
Serviceguard will consider this normal exit as a failure.
Ensure that each generic resource run command is the name of an actual generic resource and that
its process remains alive until the actual cluster stops.
GENERIC_RESOURCE_SCOPE
You can set the scope type to node.
The Node Scope generic resource value is unique to a node reflecting the health of an underlaying
monitored resource. The status or the value for the resource being monitored can be different on
various nodes in the cluster.
GENERIC_RESOURCE_RESTART
The number of times Serviceguard will attempt to re-run the GENERIC_RESOURCE_CMD. Valid values
are unlimited, none or any positive integer value. Default is none.
If the value is unlimited, the generic resource command will be restarted an infinite number of times. If
the value is none, the command will not be restarted.
GENERIC_RESOURCE_HALT_TIMEOUT
The length of time, in microseconds, Serviceguard will wait for the command to halt before forcing
termination of the cluster generic resource process. The maximum value is 120000000 microseconds
(2 minutes). The value should be large enough to allow any cleanup required by the generic resource
to complete.
If no value is specified, a zero timeout will be assumed, meaning that Serviceguard will not wait for
any time before terminating the process.
The GENERIC_RESOURCE_HALT_TIMEOUT is a number of micro seconds. This timeout is used to
determine the length of time Serviceguard will wait for the command specified under
GENERIC_RESOURCE_CMD to halt before a SIGKILL signal is sent to force the termination of the
command. In the event of a halt, Serviceguard will first send a SIGTERM signal to terminate the
command. If the command does not halt, Serviceguard will wait for the specified
GENERIC_RESOURCE_HALT_TIMEOUT, then send the SIGKILL signal to force the command to
terminate. This timeout value should be large enough to allow all cleanup processes associated with
the command to complete. If the GENERIC_RESOURCE_HALT_TIMOEOUT is not specified, a zero
timeout will be assumed, meaning the cluster software will not wait at all before sending the SIGKILL
signal to halt the command.
The maximum value recommended for GENERIC_RESOURCE_HALT_TIMEOUT is 120000000 (2
minutes).
NOTE: To prevent an operator from accidentally activating volume groups on other nodes in the cluster,
versions A.11.16.07 and later of Serviceguard for Linux include a type of VG activation protection. This is
based on the “hosttags” feature of LVM2.
This feature is not mandatory, but Hewlett Packard Enterprise strongly recommends you implement it as
you upgrade existing clusters and create new ones. See Enabling Volume Group Activation Protection
on page 185 for instructions. However, if you are using PR feature this step is not required.
Create a list by package of volume groups, logical volumes, and file systems. Indicate which nodes need
to have access to common file systems at different times.
Hewlett Packard Enterprise recommends that you use customized logical volume names that are different
from the default logical volume names (lvol1, lvol2, etc.). Choosing logical volume names that
represent the high availability applications that they are associated with (for example, lvoldatabase)
will simplify cluster administration.
To further document your package-related volume groups, logical volumes, and file systems on each
node, you can add commented lines to the /etc/fstab file. The following is an example for a database
application:
CAUTION: Do not use /etc/fstab to mount file systems that are used by Serviceguard
packages.
For information about creating, exporting, and importing volume groups, see Creating the Logical
Volume Infrastructure on page 181.
NOTE: Ensure that the NFS module is loaded during boot time for the configurations using NFS file
systems as part of the package configuration.
• Networking among the Serviceguard nodes must be configured in such a way that a single failure in
the network does not cause a package failure.
• Only NFS client-side locks (local locks) are supported.
Server-side locks are not supported.
• Because exclusive activation is not available for NFS-imported file systems, you must take the
following precautions to ensure that data is not accidentally overwritten.
◦ The server must be configured so that only the cluster nodes have access to the file system.
◦ The NFS file system used by a package must not be imported by any other system, including other
nodes in the cluster.
◦ The nodes should not mount the file system on boot; it should be mounted only as part of the
startup for the package that uses it.
◦ The NFS file system should be used by only one package.
◦ While the package is running, the file system should be used exclusively by the package.
◦ If the package fails, do not attempt to restart it manually until you have verified that the file system
has been unmounted properly.
• Hewlett Packard Enterprise recommends that you avoid a single point of failure by ensuring that the
NFS server is highly available.
NOTE: If network connectivity to the NFS Server is lost, the applications using the imported file system
may hang and it may not be possible to kill them. If the package attempts to halt at this point, it may
not halt successfully.
For more information, see HPE Serviceguard Toolkit for NFS on Linux User Guide available at http://
www.hpe.com/info/linux-serviceguard-docs. This guide includes instructions for setting up a sample
package that uses an NFS-imported file system.
See also the description of fs_name on page 242, fs_type on page 242, and the other file system-
related package parameters.
Table Continued
Failover packages can be also configured so that IP addresses switch from a failed NIC to a standby NIC
on the same node and the same physical subnet.
2. Edit the package configuration file and specify the VMFS parameters (as shown in the snippet):
If the disk_type is of VMFS, then the package configuration looks as below:
vmdk_file_name cluster/abc.vmdk
datastore_name sg_datastore
scsi_controller 1:1
disk_type VMFS
If the disk_type is of RDM, then the package configuration looks as below:
vmdk_file_name cluster/xyz.vmdk
datastore_name sg_datastore
scsi_controller 1:2
disk_type RDM
3. After editing the package configuration file, verify the content of the package configuration file:
cmcheckconf -v -P $SGCONF/pkg1/vmfspkg.conf
cmcheckconf: Verification completed with no errors found.
Use the cmapplyconf command to apply the configuration.
6. Start the package. As part of the package start, the VMDK disks will be attached to the node.
cmrunpkg vmfspkg
• generic_resource_name: defines the logical name used to identify a generic resource in a package.
• generic_resource_evaluation_type: defines when the status of a generic resource is evaluated. This
can be set to during_package_start or before_package_start. If not specified, DPS is
considered as default.
• generic_resource_up_criteria: defines a criterion to determine the 'up' condition for a generic resource.
It also determines whether a generic resource is a simple resource or an extended resource. This
parameter requires an operator and a value. The operators ==, !=, >, <, >=, and <= are allowed.
Values must be positive integer values ranging from 1 to 2147483647.
1. Create a package configuration file that contains the generic resource module:
cmmakepkg $SGCONF/pkg1/pkg1.conf
Package template is created.
This file must be edited before it can be used.
NOTE: To generate a configuration file adding the generic resource module to an existing package
(enter the command all on one line):
cmmakepkg -i $SGCONF/pkg1/pkg1.conf -m sg/generic_resource
2. Perform this step to use an existing cluster generic resource in package. If you are adding a new
generic resource to package skip this step and proceed to step 3.
generic_resource_name sfm_cpu
generic_resource_evaluation_type before_package_start
generic_resource_up_criteria <= 40
For step by step procedure to add the generic resource to package see, Using Cluster Generic
Resources in package configuration.
3. Perform this step to add a new generic resource to package. If you are use an existing cluster generic
resource in package skip this step and proceed to step 4.
Edit the package configuration file and specify the generic resource parameters (as shown in the
snippet):
service_name cpu_monitor
service_cmd $SGCONF/generic_resource_monitors/cpu_monitor.sh
service_halt_timeout 10
generic_resource_name sfm_cpu
generic_resource_evaluation_type before_package_start
generic_resource_up_criteria <= 40
NOTE: Generic resources must be configured to use the monitoring script. It is the monitoring script
that contains the logic to monitor the resource and set the status of a generic resource accordingly by
using cmsetresource(1m).
These scripts must be written by end-users according to their requirements. The monitoring script
must be configured as a service in the package if the monitoring of the resource is required to be
started and stopped as a part of the package.
This can be achieved by configuring a service_name and a service_cmd, by providing the full path
name of the monitoring script as the service_cmd value as shown in the step. The service_name
and generic_resource_name need not be the same. However, it would be a good practice to do it,
so that it would be easier to identify the monitor.
Hewlett Packard Enterprise provides a template that describes how a monitoring script can be written.
For more information on monitoring scripts and the template, see Monitoring Script for Generic
Resources on page 392 and Template of a Monitoring Script on page 395.
If the generic_resource_up_criteria is specified, the given resource is considered to be an extended
generic resource, else it is a simple generic resource. For the description of generic resources
parameters, see Package Parameter Explanations on page 226. See Using the Generic
Resources Monitoring Service on page 47.
4. After editing the package configuration file, verify the content of the package configuration file:
cmcheckconf -v -P $SGCONF/pkg1/pkg1.conf
cmcheckconf: Verification completed with no errors found.
Use the cmapplyconf command to apply the configuration
5. When verification completes without errors, apply the package configuration file. This adds the
package configuration information (along with generic resources) to the binary cluster configuration file
in the $SGCONF directory and distributes it to all the cluster nodes.
Policy_Parameters:
POLICY_NAME CONFIGURED_VALUE
Failover configured_node
Failback manual
Script_Parameters:
ITEM STATUS NODE_NAME NAME
Generic Resource unknown node1 sfm_cpu
Generic Resource unknown node2 sfm_cpu
Node_Switching_Parameters:
NODE_TYPE STATUS SWITCHING NAME
Primary up enabled node1
Alternate up enabled node2
Other_Attributes:
ATTRIBUTE_NAME ATTRIBUTE_VALUE
Style modular
Priority no_priority
The cmviewcl -v -f line output (snippet) will be as follows:
cmviewcl -v -f line -p pkg1 | grep generic_resource
generic_resource:sfm_cpu|name=sfm_cpu
generic_resource:sfm_cpu|evaluation_type=before_package_start
generic_resource:sfm_cpu|up_criteria="<= 40"
generic_resource:sfm_cpu|node:node1|status=unknown
generic_resource:sfm_cpu|node:node1|current_value=0
generic_resource:sfm_cpu|node:node2|status=unknown
generic_resource:sfm_cpu|node:node2|current_value=0
NOTE: The default status of a generic resource is UNKNOWN and the default current_value is "0"
unless the status/value of a simple/extended generic resource is set using the cmsetresource
command.
7. Start the package. As part of the package start, the monitoring script will start the monitoring of the
generic resource and set the status accordingly. This is valid in case of adding service_cmd into
package configuration. However in case of adding cluster generic resource into package; start of
package will not run any monitoring script as it would have started as part of
GENERIC_RESOURCE_CMD of cluster start itself.
◦ Modification of resource type from a simple resource to an extended resource is allowed only if the
generic_resource_evaluation_type is during_package_start in all the running packages that
currently use the resource.
NOTE: pkg1 can depend on more than one other package, and pkg2 can depend on another package or
packages; we are assuming only two packages in order to make the rules as clear as possible.
• pkg1 will not start on any node unless pkg2 is running on that node.
• pkg1’s package_type and failover_policy constrain the type and characteristics of pkg2, as follows:
◦ If pkg1 is a multi-node package, pkg2 must be a multi-node or system multi-node package. (Note
that system multi-node packages are not supported for general use.)
◦ If pkg1 is a failover package and its failover_policy is min_package_node, must be a multi-node
or system multi-node package.
◦ If pkg1 is a failover package and its failover_policy is configured_node, pkg2 must be:
◦ This means that if pkg1 is configured to run on any node in the cluster (*), pkg2 must also be
configured to run on any node.
NOTE: If pkg1 lists all the nodes, rather than using the asterisk (*), pkg2 must also list them.
◦ Preferably the nodes should be listed in the same order if the dependency is between packages
whose failover_policy is configured_node; cmcheckconf and cmapplyconf will warn you if
they are not.
• A package cannot depend on itself, directly or indirectly. That is, not only must pkg1 not specify itself
in the dependency_condition, but pkg1 must not specify a dependency on pkg2 if pkg2 depends on
pkg1, or if pkg2 depends on pkg3 which depends on pkg1, etc.
NOTE: This applies only when the packages are automatically started (package switching enabled);
cmrunpkg will never force a package to halt.
Keep in mind that you do not have to set priority, even when one or more packages depend on another.
The default value, no_priority, may often result in the behavior you want. For example, if pkg1
depends on pkg2, and priority is set to no_priority for both packages, and other parameters such as
node_name and auto_run are set as recommended in this section, then pkg1 will normally follow pkg2 to
wherever both can run, and this is the common-sense (and may be the most desirable) outcome.
The following examples express the rules as they apply to two failover packages whose failover_policy is
configured_node. Assume pkg1 depends on pkg2, that node1, node2 and node3 are all specified
(in some order) under node_name in the configuration file for each package, and that failback_policy is
set to automatic for each package.
1. auto_run should be set to yes for all the packages involved; the examples assume that it is.
2. Priorities express a ranking order, so a lower number means a higher priority (10 is a higher priority
than 30).
Hewlett Packard Enterprise recommends assigning values in increments of 20 so as to leave gaps in
the sequence; otherwise you may have to shuffle all the existing priorities when assigning priority to a
new package.
no_priority, the default, is treated as a lower priority than any numerical value.
3. All packages with no_priority are by definition of equal priority, and there is no other way to assign
equal priorities; a numerical priority must be unique within the cluster. See priority on page 232 for
more information.
If pkg1 depends on pkg2, and pkg1’s priority is lower than or equal to pkg2’s, pkg2’s node order
dominates. Assuming pkg2’s node order is node1, node2, node3, then:
• On startup:
◦ pkg2 will start on node1, or node2 if node1 is not available or does not at present meet all of its
dependencies, etc.
– pkg1will start on whatever node pkg2 has started on (no matter where that node appears on
pkg1’s node_name list) provided all of pkg1’s other dependencies are met there.
– If the node where pkg2 has started does not meet all pkg1’s dependencies, pkg1 will not start.
• On failover:
◦ If pkg2 fails on node1, pkg2 will fail over to node2 (or node3 if node2 is not available or does not
currently meet all of its dependencies, etc.)
– pkg1 will fail over to whatever node pkg2 has restarted on (no matter where that node appears
on pkg1’s node_name list) provided all of pkg1’s dependencies are met there.
– If the node where pkg2 has restarted does not meet all pkg1’s dependencies, pkg1 will not
restart.
• On failback:
◦ If both packages have moved from node1 to node2 and node1becomes available, pkg2will fail
back to node1 only if pkg2’s priority is higher than pkg1’s :
– If pkg2’s priority is higher than pkg1’s, pkg2 will fail back to node1; pkg1 will fail back to
node1 provided all of pkg1’s other dependencies are met there;
– if pkg2 has failed back to node1 and node1 does not meet all of pkg1’s dependencies,
pkg1 will halt.
If pkg1 depends on pkg2, and pkg1’s priority is higher than pkg2’s, pkg1’s node order dominates.
Assuming pkg1’s node order is node1, node2, node3, then:
• On startup:
◦ pkg2will start on node1, provided it can run there (no matter where node1 appears on pkg2’s
node_name list).
– If pkg2 is already running on another node, it will be dragged to node1, provided it can run
there.
◦ If pkg2 cannot start on node1, then both packages will attempt to start on node2 (and so on).
Note that the nodes will be tried in the order of pkg1’s node_name list, and pkg2 will be dragged to
the first suitable node on that list whether or not it is currently running on another node.
• On failover:
◦ If pkg1 fails on node1, pkg1will select node2 to fail over to (or node3 if it can run there and
node2 is not available or does not meet all of its dependencies; etc.)
◦ pkg2 will be dragged to whatever node pkg1 has selected, and restart there; then pkg1 will restart
there.
• On failback:
◦ If both packages have moved to node2 and node1 becomes available, pkg1 will fail back to
node1 if both packages can run there;
Extended Dependencies
To the capabilities provided by Simple Dependencies on page 136, extended dependencies add the
following:
• You can specify whether the package depended on must be running or must be down.
You define this condition by means of the dependency_condition, using one of the literals UP or DOWN
(the literals can be upper or lower case). We'll refer to the requirement that another package be down
as an exclusionary dependency; see Rules for Exclusionary Dependencies on page 141.
• You can specify where the dependency_condition must be satisfied: on the same node, a different
node, all nodes, or any node in the cluster.
You define this by means of the dependency_location parameter, using one of the literals same_node,
different_node, all_nodes, or any_node.
different_node and any_node are allowed only if dependency_condition is UP. all_nodes is
allowed only if dependency_condition is DOWN.
See Rules for different_node and any_node Dependencies on page 141.
For more information about the dependency_ parameters, see the definitions starting with
dependency_name, and the cmmakepkg (1m) manpage.
IMPORTANT: If you have not already done so, read the discussion of Simple Dependencies
before you go on.
The interaction of the legal values of dependency_location and dependency_condition creates the
following possibilities:
• Same-node dependency: a package can require that another package be UP on the same node.
• Different-node dependency: a package can require that another package be UP on a different node.
• Any-node dependency: a package can require that another package be UP on any node in the cluster.
• Same-node exclusion: a package can require that another package be DOWN on the same node. (But
this does not prevent that package from being UP on another node.)
• All-nodes exclusion: a package can require that another package be DOWN on all nodes in the cluster.
• Priority (discussed in detail under Dragging Rules for Simple Dependencies) must be set for at least
one of the packages in an exclusionary relationship.
In case of any failover or enabling of global switching, the package starts on the eligible node:
◦ When a higher priority package fails over to a node on which a lower priority package with mutually
exclusive dependency is running, the higher priority package can force the lower priority package
to halt or (in the case of a same-node exclusion) move to another eligible node, if any.
◦ When a lower priority package fails over to another node on which the higher priority package with
mutually exclusive dependency is running, the lower priority package fails to start.
• If you start a package manually using cmrunpkg command on a node on which another mutually
exclusive package is running, then cmrunpkg command fails with the following message:
Unable to execute command. Package <pkg_1> a same node exclusionary dependency on package <pkg_2>
cmrunpkg: Unable to start some package or package instances
• dependency_location must be either same_node or all_nodes, and must be the same for both
packages.
• Both packages must be failover packages whose failover_policy is configured_node.
• The priority of the package depended on must be higher than or equal to the priority of the dependent
package and the priorities of that package's dependents.
◦ For example, if pkg1 has a different_node or any_node dependency on pkg2, pkg2's priority
must be higher than or equal to pkg1's priority and the priority of any package that depends on
pkg1 to be UP. pkg2's node order dominates when Serviceguard is placing the packages.
NOTE: Dependent packages are halted even in the case of different_node or any_node
dependency. For example, if pkg1 running on node1 has a different_node or any_node
dependency on pkg2 running on node2, and pkg2 fails over to node3, pkg1 will be halted and
restarted as described below.
By default the packages are halted in the reverse of the order in which they were started; and if the
halt script for any of the dependent packages hangs, the failed package will wait indefinitely to
complete its own halt process. This provides the best chance for all the dependent packages to halt
cleanly, but it may not be the behavior you want. You can change it by means of the
successor_halt_timeout parameter. (A successor is a package that depends on another package.)
If the failed package's successor_halt_timeout is set to zero, Serviceguard will halt the dependent
packages in parallel with the failed package; if it is set to a positive number, Serviceguard will halt the
packages in the reverse of the start order, but will allow the failed package to halt after the
successor_halt_timeout number of seconds whether or not the dependent packages have completed
their halt scripts.
3. Halts packages the failing package depends on, starting with the package this package immediately
depends on. The packages are halted only if:
Otherwise the failing package halts and the packages it depends on continue to run
4. Starts the packages the failed package depends on (those halted in step 3, if any).
If the failed package has been able to drag the packages it depends on to the adoptive node,
Serviceguard starts them in the reverse of the order it halted them in the previous step (that is, the
package that does not depend on any other package is started first).
• The parameter descriptions for priority and dependency_, and the corresponding comments in the
package configuration template file
• The cmmakepkg (1m) manpage
• The white paper Serviceguard’s Package Dependency Feature, which you can find at http://
www.hpe.com/info/linux-serviceguard-docs
Simple Method
Use this method if you simply want to control the number of packages that can run on a given node at any
given time. This method works best if all the packages consume about the same amount of computing
resources.
If you need to make finer distinctions between packages in terms of their resource consumption, use the
Comprehensive Method instead.
To implement the simple method, use the reserved keyword package_limit to define each node's
capacity. In this case, Serviceguard will allow you to define only this single type of capacity, and
corresponding package weight, in this cluster. Defining package weight is optional; for package_limit it
will default to 1 for all packages, unless you change it in the package configuration file.
Example 1
For example, to configure a node to run a maximum of ten packages at any one time, make the following
entry under the node's NODE_NAME entry in the cluster configuration file:
NODE_NAME node1
...
CAPACITY_NAME package_limit
CAPACITY_VALUE 10
Now all packages will be considered equal in terms of their resource consumption, and this node will
never run more than ten packages at one time. (You can change this behavior if you need to by modifying
the weight for some or all packages, as the next example shows.) Next, define the CAPACITY_NAME
and CAPACITY_VALUE parameters for the remaining nodes, setting CAPACITY_NAME to
package_limit in each case. You may want to set CAPACITY_VALUE to different values for different
nodes. A ten-package capacity might represent the most powerful node, for example, while the least
powerful has a capacity of only two or three.
NOTE: Serviceguard does not require you to define a capacity for each node. If you define the
CAPACITY_NAME and CAPACITY_VALUE parameters for some nodes but not for others, the nodes for
which these parameters are not defined are assumed to have limitless capacity; in this case, those nodes
would be able to run any number of eligible packages at any given time.
If some packages consume more resources than others, you can use the weight_name and weight_value
parameters to override the default value (1) for some or all packages. For example, suppose you have
three packages, pkg1, pkg2, and pkg3. pkg2 is about twice as resource-intensive as pkg3 which in turn
is about one-and-a-half times as resource-intensive as pkg1. You could represent this in the package
configuration files as follows:
• For pkg2:
weight_name package_limit
weight_value 6
• For pkg3:
weight_name package_limit
weight_value 3
• If you use the reserved CAPACITY_NAME package_limit, then this is the only type of capacity and
weight you can define in this cluster.
• If you use the reserved CAPACITY_NAME package_limit, the default weight for all packages is 1.
You can override this default in the package configuration file, via the weight_name and weight_value
parameters, as in the example above.
(The default weight remains 1 for any package to which you do not explicitly assign a different weight
in the package configuration file.)
• If you use the reserved CAPACITY_NAME package_limit, weight_name, if used, must also be
package_limit.
• You do not have to define a capacity for every node; if you don't, the node is assumed to have
unlimited capacity and will be able to run any number of eligible packages at the same time.
• If you want to define only a single capacity, but you want the default weight to be zero rather than 1, do
not use the reserved name package_limit. Use another name (for example,
resource_quantity) and follow the Comprehensive Method. This is also a good idea if you think
you may want to use more than one capacity in the future.
To learn more about configuring weights and capacities, see the documents listed under For More
Information.
Comprehensive Method
Use this method if the Simple Method does not meet your needs. (Make sure you have read that section
before you proceed.) The comprehensive method works best if packages consume differing amounts of
computing resources, so that simple one-to-one comparisons between packages are not useful.
Defining Capacities
Begin by deciding what capacities you want to define; you can define up to four different capacities for the
cluster.
You may want to choose names that have common-sense meanings, such as “processor”, “memory”, or
“IO”, to identify the capacities, but you do not have to do so. In fact it could be misleading to identify single
resources, such as “processor”, if packages really contend for sets of interacting resources that are hard
to characterize with a single name. In any case, the real-world meanings of the names you assign to node
capacities and package weights are outside the scope of Serviceguard. Serviceguard simply ensures that
for each capacity configured for a node, the combined weight of packages currently running on that node
does not exceed that capacity.
For example, if you define a CAPACITY_NAME and weight_name processor, and a CAPACITY_NAME
and weight_name memory, and a node has a processor capacity of 10 and a memory capacity of 1000,
Serviceguard ensures that the combined processor weight of packages running on the node at any one
time does not exceed 10, and that the combined memory weight does not exceed 1000. But Serviceguard
has no knowledge of the real-world meanings of the names processor and memory; there is no
mapping to actual processor and memory usage and you would get exactly the same results if you used
the names apples and oranges.
For example, suppose you have the following configuration:
• A two node cluster running four packages. These packages contend for resource we'll simply call A
and B.
• pkg3 uses insignificant amount (zero) of the A capacity and 35 of the B capacity.
pkg1 and pkg2 together require 100 of the A capacity and 30 of the B capacity. This means pkg1 and
pkg2 cannot run together on either of the nodes. While both nodes have sufficient B capacity to run both
packages at the same time, they do not have sufficient A capacity.
pkg3 and pkg4 together require 20 of the A capacity and 75 of the B capacity. This means pkg3 and
pkg4 cannot run together on either of the nodes. While both nodes have sufficient A capacity to run both
packages at the same time, they do not have sufficient B capacity.
Example 2
To define these capacities, and set limits for individual nodes, make entries such as the following in the
cluster configuration file:
CLUSTER_NAME cluster_23
...
NODE_NAME node1
...
NOTE: You do not have to define capacities for every node in the cluster. If any capacity is not defined for
any node, Serviceguard assumes that node has an infinite amount of that capacity. In our example, not
defining capacity A for a given node would automatically mean that node could run pkg1 and pkg2 at the
same time no matter what A weights you assign those packages; not defining capacity B would mean the
node could run pkg3 and pkg4 at the same time; and not defining either one would mean the node could
run all four packages simultaneously.
When you have defined the nodes' capacities, the next step is to configure the package weights; see
Defining Weights.
Defining Weights
Package weights correspond to node capacities, and for any capacity/weight pair, CAPACITY_NAME and
weight_name must be identical.
You define weights for individual packages in the package configuration file, but you can also define a
cluster-wide default value for a given weight, and, if you do, this default will specify the weight of all
packages that do not explicitly override it in their package configuration file.
NOTE:
There is one exception: system multi-node packages cannot have weight, so a cluster-wide default weight
does not apply to them.
1. Configure a cluster-wide default weight and let the package use that default.
2. Configure a cluster-wide default weight but override it for this package in its package configuration file.
3. Do not configure a cluster-wide default weight, but assign a weight to this package in its package
configuration file.
4. Do not configure a cluster-wide default weight and do not assign a weight for this package in its
package configuration file.
NOTE: Option 4 means that the package is “weightless” as far as this particular capacity is concerned,
and can run even on a node on which this capacity is completely consumed by other packages.
(You can make a package “weightless” for a given capacity even if you have defined a cluster-wide
default weight; simply set the corresponding weight to zero in the package's cluster configuration file.)
Pursuing the example started under Defining Capacities, we can now use options 1 and 2 to set weights
for pkg1 through pkg4.
Example 4
In pkg1's package configuration file:
weight_name A
weight_value 60
In pkg2's package configuration file:
weight_name A
weight_value 40
In pkg3's package configuration file:
weight_name B
weight_value 35
weight_name A
weight_value 0
In pkg4's package configuration file:
weight_name B
weight_value 40
IMPORTANT: weight_name in the package configuration file must exactly match the corresponding
CAPACITY_NAME in the cluster configuration file. This applies to case as well as spelling:
weight_name a would not match CAPACITY_NAME A.
You cannot define a weight unless the corresponding capacity is defined: cmapplyconf will fail if
you define a weight in the package configuration file and no node in the package's node_name list
has specified a corresponding capacity in the cluster configuration file; or if you define a default
weight in the cluster configuration file and no node in the cluster specifies a capacity of the same
name.
• Since we did not configure a B weight for pkg1 or pkg2, these packages have the default B weight
(15) that we set in the cluster configuration file in Example 3. Similarly, pkg4 has the default A weight
(20).
• We have configured pkg3 to have a B weight of 35, but no A weight.
• pkg1 will consume all of node2's A capacity; no other package that has A weight can run on this node
while pkg1is running there.
But node2 could still run pkg3 while running pkg1, because pkg3 has no A weight, and pkg1 is
consuming only 15 units (the default) of node2's B capacity, leaving 35 available to pkg3 (assuming
no other package that has B weight is already running there).
• Similarly, if any package that has A weight is already running on node2, pkg1 will not be able to start
there (unless pkg1 has sufficient priority to force another package or packages to move). This is true
whenever a package has a weight that exceeds the available amount of the corresponding capacity on
the node.
• You can define a maximum of four capacities, and corresponding weights, throughout the cluster.
NOTE: But if you use the reserved CAPACITY_NAME package_limit, you can define only that
single capacity and corresponding weight. See Simple Method.
• Node capacity is defined in the cluster configuration file, via the CAPACITY_NAME and
CAPACITY_VALUE parameters.
• Capacities can be added, changed, and deleted while the cluster is running. This can cause some
packages to be moved, or even halted and not restarted.
• Package weight can be defined in cluster configuration file, via the WEIGHT_NAMEand
WEIGHT_DEFAULTparameters, or in the package configuration file, via the weight_name and
weight_value parameters, or both.
• Weights can be assigned (and WEIGHT_DEFAULTs, apply) only to multi-node packages and to
failover packages whose failover_policy is configured_node and whose failback_policy is
manual.
• If you define weight (weight_name and weight_value) for a package, make sure you define the
corresponding capacity (CAPACITY_NAME and CAPACITY_VALUE) in the cluster configuration file
for at least one node on the package's node_name list . Otherwise cmapplyconf will fail when you try
to apply the package.
• Weights (both cluster-wide WEIGHT_DEFAULTs, and weights defined in the package configuration
files) can be changed while the cluster is up and the packages are running. This can cause some
packages to be moved, or even halted and not restarted.
For more information about weights, see the comments under weight_name and weight_value in:
For further discussion and use cases, see the white paper Using Serviceguard’s Node Capacity and
Package Weight Feature at http://www.hpe.com/info/linux-serviceguard-docs.
• pkg1 is configured to run on nodes turkey and griffon. It has a weight of 1 and a priority of 10. It
is down and has switching disabled.
• pkg2 is configured to run on nodes turkey and griffon. It has a weight of 1 and a priority of 20. It
is running on node turkey and has switching enabled.
• turkey and griffon can run one package each ( package_limit is set to 1).
If you enable switching for pkg1, Serviceguard will halt the lower-priority pkg2 on turkey. It will then
start pkg1 on turkey and restart pkg2 on griffon.
If neither pkg1 nor pkg2 had priority, pkg2 would continue running on turkey and pkg1 would run on
griffon.
Example 2
• pkg1 is configured to run on nodes turkeyand griffon. It has a weight of 1 and a priority of 10. It is
running on node turkey and has switching enabled.
• pkg2 is configured to run on nodes turkey and griffon. It has a weight of 1 and a priority of 20. It
is running on node turkey and has switching enabled.
• pkg3 is configured to run on nodes turkey and griffon. It has a weight of 1 and a priority of 30. It
is down and has switching disabled.
• pkg3 has a same_node dependency on pkg2
• turkey and griffon can run two packages each (package_limit is set to 2).
150 How Package Weights Interact with Package Priorities and Dependencies
If you enable switching for pkg3, it will stay down because pkg2, the package it depends on, is running
on node turkey, which is already running two packages (its capacity limit). pkg3 has a lower priority
than pkg2, so it cannot drag it to griffon where they both can run.
• To the node that has the least used capacity, if the node capacity is INFINITE.
• To the node that has the highest capacity remaining, if the node capacity is finite.
Parameters
LOAD_BALANCING
You can set the LOAD_BALANCING parameter ON or OFF in the cluster configuration file. If you enable
LOAD_BALANCING parameter, load sensitive fail over takes place. By default, the LOAD_BALANCING
parameter is set to OFF.
Keyword
You can specify the following keyword for CAPACITY_VALUE in the cluster configuration file:
INFINITE
Sets the CAPACITY_VALUE to INFINITE for a node. This means that the node is eligible to run a
package with respect to weight constrains.
NOTE: This value helps you ensure a configuration, that is, when some nodes fail, all the workloads are
balanced and placed on the remaining nodes without bringing any of the nodes down.
Limitations
• Capacity must be set to either INFINTE or a finite value for all the nodes in the cluster.
• All nodes in the cluster must be configured with only one capacity, and packages can be configured
with the corresponding weight when the LOAD_BALANCING parameter is set to ON.
• The failover policy for a package must always be CONFIGURED_NODE. Other failover policies are not
allowed when the LOAD_BALANCING parameter is set to ON.
Recommendation
If the LOAD_BALANCING parameter is ON, Hewlett Packard Enterprise recommends that packages
must set their weight_value other than the default value of zero.
3. Configure a weight corresponding to the capacity defined in the cluster configuration file.
NOTE: cmrunpkg <pkg_name> always starts the package on the local node only. Hence, there
might be an imbalance in cluster when the load balancing is configured.
2. Apply the package configuration and enable autorun for the packages, when cluster is down:
cmruncl
3. Enable autorun for a package, so that the package starts on the most eligible node:
cmmodpkg –e <pkg_name>...
• The most eligible node is the node which has the least capacity used (when capacity is INFINITE) or
the node with maximum remaining capacity (when capacity is finite).
• In the cmviewcl -v -f line output capacity:x|percent_used field is always zero when the
corresponding capacity is infinite.
Examples
CAPACITY_VALUE parameter set to INFINITE
Scenario 1: Staring a package with cmruncl command
NODE_NAME test1
CAPACITY_NAME test_capacity
CAPACITY_VALUE INFINITE
3. Repeat step 2 for all the nodes in the cluster.
4. Create packages with weight_name and weight_value in the package configuration file:
weight_name test_capacity
weight_value <value>
package:pkg1|weight:test_capacity|name=test_capacity
package:pkg1|weight:test_capacity|value=7
package:pkg2|weight:test_capacity|name=test_capacity
package:pkg2|weight:test_capacity|value=9
package:pkg3|weight:test_capacity|name=test_capacity
package:pkg3|weight:test_capacity|value=10
package:pkg4|weight:test_capacity|name=test_capacity
package:pkg4|weight:test_capacity|value=4
package:pkg5|weight:test_capacity|name=test_capacity
package:pkg5|weight:test_capacity|value=4
Examples 153
Figure 30: Load Distributed across the Nodes with CAPACITY_VALUE set to INFINITE
6. Now, forcefully halt Node 1 using cmhaltnode –f command to test failover of pkg3, which is
currently running on Node 1. The figure shows the failover of pkg3 on Node 3.
When the capacity and weights are configured in a cluster, the package fails over to the node that has
the least used capacity. Since the Node 3 has the least used capacity of 7, the pkg3 with weight of 10
fails over to Node 3.
7. Now, forcefully halt Node 3 using cmhaltnode –f command to test failover of pkg1 and pkg3, which
is currently running on Node 3. The figure shows the failover of pkg3 on Node 4 and pkg1 on Node 2.
When the capacity and weights are configured in a cluster, the package fails over to the node that has
the least used capacity. Since the Node 4 has the least used capacity of 8, the pkg3 with weight of 10
fails over to Node 4 and the pkg1 with weight of 7 fails over to Node 2. The figure shows that pkg1 and
pkg2 running on Node 2 and pkg4, pkg5, and pkg3 running on Node 4.
# cmviewcl
test1_cluster up
UNOWNED_PACKAGES
PACKAGE STATUS STATE AUTO_RUN NODE
pkg3 down halted disabled unowned
pkg5 down halted disabled unowned
NODE_NAME node1
CAPACITY_NAME test_capacity
CAPACITY_VALUE INFINITE
3. Create four packages with the following weight_name and weight_value and dependency
conditions:
package:pkg1|weight:test_capacity|name=test_capacity
package:pkg1|weight:test_capacity|value=1
package:pkg2|weight:test_capacity|name=test_capacity
package:pkg2|weight:test_capacity|value=2
package:pkg3|weight:test_capacity|name=test_capacity
package:pkg3|weight:test_capacity|value=3
package:pkg4|weight:test_capacity|name=test_capacity
package:pkg4|weight:test_capacity|value=4
dependency_name: pkg2dep
dependency_condition: pkg2=up
dependency_location: same_node
dependency_name: pkg4dep
dependency_condition: pkg4=up
dependency_location: different_node
The packages are sorted according to the cumulative weight of the dependency tree, where, pkg1 and
pkg2 have cumulative weight of 3 and pkg3 and pkg4 have cumulative weight of 7.
Scenario 4: Packages with and without dependencies configured for load sensitive placement:
NODE_NAME test1
CAPACITY_NAME test_capacity
CAPACITY_VALUE INFINITE
3. Create eight packages with the following weight_name and weight_value and dependency
conditions:
package:pkg1|weight:test_capacity|name=test_capacity
package:pkg1|weight:test_capacity|value=13
package:pkg2|weight:test_capacity|name=test_capacity
package:pkg2|weight:test_capacity|value=25
package:pkg3|weight:test_capacity|name=test_capacity
package:pkg3|weight:test_capacity|value=4
package:pkg4|weight:test_capacity|name=test_capacity
package:pkg4|weight:test_capacity|value=22
package:pkg5|weight:test_capacity|name=test_capacity
package:pkg5|weight:test_capacity|value=19
package:pkg6|weight:test_capacity|name=test_capacity
package:pkg6|weight:test_capacity|value=11
package:mnpkg1|weight:test_capacity|name=test_capacity
package:mnpkg1|weight:test_capacity|value=50
package:mnpkg2|weight:test_capacity|name=test_capacity
package:mnpkg2|weight:test_capacity|value=3
dependency_name: pkg2dep
dependency_condition: pkg2=up
dependency_location: same_node
dependency_name: pkg4dep
dependency_condition: pkg4=up
dependency_location: different_node
dependency_name: pkg6dep
dependency_condition: pkg6=up
dependency_location: any_node
Similarly, the remaining packages are placed according to the dependency condition and load as follows:
NOTE: In rare scenarios, you might happen to see that even though the packages are sorted according
to the weight, they do not start on the nodes they are expected to. This is because there might be a delay
in starting the package due to dependency conditions not being satisfied. This might result in starting a
package of lesser weight before a heavy weight package.
For example, in scenario 3 the load sensitive placement tries to place pkg6 and assigns Node3. Since it is
unable to start the package, pkg4 is considered for placement since it has different node dependency and
pkg6 is not considered. Therefore, the placement of package is as follows:
NODE1 test1
CAPACITY_NAME test_capacity
CAPACITY_VALUE 11
NODE2 test2
CAPACITY_NAME test_capacity
CAPACITY_VALUE 14
NODE3 test3
CAPACITY_NAME test_capacity
CAPACITY_VALUE 8
NODE4 test4
CAPACITY_NAME test_capacity
CAPACITY_VALUE 7
3. Create packages with weight_name and weight_value in the package configuration file:
weight_name test_capacity
weight_value <value>
For example, consider creating five packages with different weight_value as shown:
package:pkg1|weight:test_capacity|name=test_capacity
package:pkg1|weight:test_capacity|value=4
package:pkg2|weight:test_capacity|name=test_capacity
package:pkg2|weight:test_capacity|value=3
package:pkg3|weight:test_capacity|name=test_capacity
package:pkg3|weight:test_capacity|value=7
package:pkg4|weight:test_capacity|name=test_capacity
package:pkg4|weight:test_capacity|value=10
package:pkg5|weight:test_capacity|name=test_capacity
package:pkg5|weight:test_capacity|value=6
First, the pkg4 is placed on Node 2, as this is the first node with highest remaining capacity.
Then, pkg3 is placed on Node 1, pkg5 is placed on Node 3, pkg1 is placed on Node 4, and pkg2 is
placed on Node 1.
5. Now, forcefully halt Node 4 using cmhaltnode –f command to test failover of pkg1, which is
currently running on Node 4. The figure shows the failover of pkg1 on Node 2.
When finite capacity is configured in a cluster, the package fails over to the node that has the highest
remaining capacity. Since the Node 2 has the highest remaining capacity of 4, the pkg1 with weight of
4 fails over to Node 2.
• On package startup and shutdown, as essentially the first and last functions the package performs.
These scripts are invoked by means of the parameter external_pre_script; or
• During package execution, after volume-groups and file systems are activated, and IP addresses are
assigned, and before the service and resource functions are executed; and again, in the reverse order,
on package shutdown. These scripts are invoked by means of the parameter external_script.
NOTE: Only Serviceguard environment variables defined in the /etc/cmcluster.conf file or absolute
pathname can be used with external_pre_script and external_script parameters.
The scripts are also run when the package is validated by cmcheckconf and cmapplyconf.
A package can make use of both kinds of script, and can launch more than one of each kind; in that case
the scripts will be executed in the order they are listed in the package configuration file (and in the reverse
order when the package shuts down).
In some cases you can rename or replace an external script while the package that uses it is running; see
Renaming or Replacing an External Script Used by a Running Package on page 295.
Each external script must have three entry points: start, stop, and validate, and should exit with one
of the following values:
• 0 - indicating success.
• 1 - indicating the package will be halted, and should not be restarted, as a result of failure in this script.
• 2 - indicating the package will be restarted on another node, or halted if no other node is available.
The script can make use of a standard set of environment variables (including the package name,
SG_PACKAGE, and the name of the local node, SG_NODE) exported by the package manager or the
master control script that runs the package; and can also call a function to source in a logging function
and other utility functions. One of these functions, sg_source_pkg_env(), provides access to all the
parameters configured for this package, including package-specific environment variables configured via
the pev_ parameter.
NOTE: Some variables, including SG_PACKAGE, and SG_NODE, are available only at package run and
halt time, not when the package is validated. You can use SG_PACKAGE_NAME at validation time as a
substitute for SG_PACKAGE.
function validate_command
{
typeset -i ret=0
typeset -i i=0
typeset -i found=0
# check PEV_ attribute is configured and within limits
if [[ -z PEV_MONITORING_INTERVAL ]]
then
sg_log 0 "ERROR: PEV_MONITORING_INTERVAL attribute not configured!"
ret=1
elif (( PEV_MONITORING_INTERVAL < 1 ))
then
sg_log 0 "ERROR: PEV_MONITORING_INTERVAL value ($PEV_MONITORING_INTERVAL) not within legal limits!"
ret=1
fi
# check monitoring service we are expecting for this package is configured
while (( i < ${#SG_SERVICE_NAME[*]} ))
do
function start_command
{ sg_log 5 "start_command"
function stop_command
{
sg_log 5 "stop_command"
# log current PEV_MONITORING_INTERVAL value, PEV_ attribute can be changed
# while the package is running
sg_log 0 "PEV_MONITORING_INTERVAL for $SG_PACKAGE_NAME is $PEV_MONITORING_INTERVAL"
return 0
}
typeset -i exit_val=0
case ${1} in
start)
start_command $*
exit_val=$?
;;
stop)
stop_command $*
exit_val=$?
;;
validate)
validate_command $*
exit_val=$?
;;
*)
sg_log 0 "Unknown entry point $1"
;;
esac
exit $exit_val
NOTE:
cmhalt operations interact with all the packages and should not be used from external scripts.
• failure - set if the package halts because of the failure of a subnet, resource, or service it depends
on
• user_halt - set if the package is halted by a cmhaltpkg or cmhaltnode command, or by
corresponding actions in Serviceguard Manager
• automatic_halt - set if the package is failed over automatically because of the failure of a package
it depends on, or is failed back to its primary node automatically (failback_policy = automatic)
You can add custom code to the package to interrogate this variable, determine why the package halted,
and take appropriate action. For modular packages, put the code in the package’s external script (see
About External Scripts).
For example, if a database package is being halted by an administrator (SG_HALT_REASON set to
user_halt) you would probably want the custom code to perform an orderly shutdown of the database;
on the other hand, a forced shutdown might be needed if SG_HALT_REASON is set to failure,
indicating thatthe package is halting abnormally (for example, because of the failure of a service it
depends on).
last_halt_failed Flag
cmviewcl -v -f line displays a last_halt_failed flag.
NOTE:
last_halt_failed appears only in the line output of cmviewcl, not the default tabular format; you
must use the -f line option to see it.
The value of last_halt_failed is no if the halt script ran successfully, or has not run since the node
joined the cluster, or has not run since the package was configured to run on the node; otherwise it is
yes.
• For modular packages, you must configure two new parameters in the package configuration file to
allow packages to fail over across subnets:
• You should not use the wildcard (*) for node_name in the package configuration file, as this could
allow the package to fail over across subnets when a node on the same subnet is eligible; failing over
across subnets can take longer than failing over on the same subnet. List the nodes in order of
preference instead of using the wildcard.
• Deploying applications in this environment requires careful consideration; see Implications for
Application Deployment.
• If a monitored_subnet is configured for PARTIALmonitored_subnet_access in a package’s
configuration file, it must be configured on at least one of the nodes on the node_name list for that
package.
Conversely, if all of the subnets that are being monitored for this package are configured for PARTIAL
access, each node on the node_name list must have at least one of these subnets configured.
◦ As in other cluster configurations, a package will not start on a node unless the subnets configured
on that node, and specified in the package configuration file as monitored subnets, are up.
• The hostname used by the package is correctly remapped to the new relocatable IP address.
• The application that the package runs must be configured so that the clients can reconnect to the
package’s new relocatable IP address.
In the worst case (when the server where the application was running is down), the client may
continue to retry the old IP address until TCP’s tcp_timeout is reached (typically about ten minutes), at
which point it will detect the failure and reset the connection.
For more information, see the white paper Technical Considerations for Creating a Serviceguard Cluster
that Spans Multiple IP Subnets at http://www.hpe.com/info/linux-serviceguard-docs (Select HP
Serviceguard).
Configuring monitored_subnet_access
In order to monitor subnet 15.244.65.0 or 15.244.56.0, depending on where pkg1 is running, you
would configure monitored_subnet and monitored_subnet_access in pkg1’s package configuration file
as follows:
monitored_subnet 15.244.65.0
monitored_subnet_access PARTIAL
monitored_subnet 15.244.56.0
monitored_subnet_access PARTIAL
NOTE:
Configuring monitored_subnet_access as FULL (or not configuring monitored_subnet_access) for either
of these subnets will cause the package configuration to fail, because neither subnet is available on all
the nodes.
Configuring ip_subnet_node
Now you need to specify which subnet is configured on which nodes. In our example, you would do this
by means of entries such as the following in the package configuration file:
ip_subnet 15.244.65.0
ip_subnet_node nodeA
ip_subnet_node nodeB
ip_address 15.244.65.82
ip_address 15.244.65.83
ip_subnet 15.244.56.0
ip_subnet_node nodeC
ip_subnet_node nodeD
ip_address 15.244.56.100
ip_address 15.244.56.101
1. Make sure the root user’s path includes the Serviceguard executables. If the Serviceguard commands
are not accessible, run the following commands:
. /etc/profile.d/serviceguard.sh (for Bourne-type shells)
. /etc/profile.d/serviceguard.csh (for C-type shells)
2. Edit the /etc/man.config file for Red Hat Enterprise Linux Server and /etc/manpath.config
file for SUSE Linux Enterprise Server to include the following:
For Red Hat Enterprise Linux Server:
MANPATH /usr/local/cmcluster/doc/man
For SUSE Linux Enterprise Server:
‘MANDATORY_MANPATH` /opt/cmcluster/doc/man
This will allow use of the Serviceguard man pages.
NOTE: For more information and advice, see the white paper Securing Serviceguard at http://
www.hpe.com/info/linux-serviceguard-docs (Select HP Serviceguard -> White Papers).
NOTE: When you upgrade a cluster from Version A.11.15 or earlier, entries in $SGCONF/cmclnodelist
are automatically updated to Access Control Policies in the cluster configuration file. All non-root user-
hostname pairs are assigned the role of Monitor.
NOTE: If you are using private IP addresses for communication within the cluster, and these addresses
are not known to DNS (or the name resolution service you use) these addresses must be listed in /etc/
hosts.
For requirements and restrictions that apply to IPv6–only clusters and mixed-mode clusters, see Rules
and Restrictions for IPv6-Only Mode and Rules and Restrictions for Mixed Mode, respectively, and the
latest version of the Serviceguard release notes.
For example, consider a two node cluster (gryf and sly) with two private subnets and a public subnet.
These nodes will be granting access by a non-cluster node (bit) which does not share the private
subnets. The /etc/hosts file on both cluster nodes should contain:
15.145.162.131 gryf.uksr.hp.com gryf
10.8.0.131 gryf.uksr.hp.com gryf
10.8.1.131 gryf.uksr.hp.com gryf
15.145.162.132 sly.uksr.hp.com sly
10.8.0.132 sly.uksr.hp.com sly
10.8.1.132 sly.uksr.hp.com sly
15.145.162.150 bit.uksr.hp.com bit
Keep the following rules in mind when creating entries in a Serviceguard node's/etc/hosts:
1. NODE_NAME in the cluster configuration file must be identical to the hostname which is the first
element of a fully qualified domain name (a name with four elements separated by periods). This
hostname is what is returned by the hostname(1) command. For example, the NODE_NAME should
be gryf rather than gryf.uksr.hp.com. For more information, see the NODE_NAME entry under
Cluster Configuration Parameters on page 111.
NOTE: Serviceguard recognizes only the hostname (the first element) in a fully qualified domain name (a
name like those in the example above). This means, for example, that gryf.uksr.hp.com and
gryf.cup.hp.com cannot be nodes in the same cluster, as Serviceguard would see them as the same
host gryf.
If applications require the use of hostname aliases, the Serviceguard hostname must be one of the
aliases in all the entries for that host. For example, if the two-node cluster in the previous example were
configured to use the alias hostnames alias-node1 and alias-node2, then the entries in /etc/
hosts should look something like this:
15.145.162.131 gryf.uksr.hp.com gryf1 alias-node1
10.8.0.131 gryf.uksr.hp.com gryf2 alias-node1
10.8.1.131 gryf.uksr.hp.com gryf3 alias-node1
15.145.162.132 sly.uksr.hp.com sly1 alias-node2
10.8.0.132 sly.uksr.hp.com sly2 alias-node2
10.8.1.132 sly.uksr.hp.com sly3 alias-node2
NOTE: If such a hang or error occurs, Serviceguard and all protected applications will continue working
even though the command you issued does not. That is, only the Serviceguard configuration commands
(and corresponding Serviceguard Manager functions) are affected, not the cluster daemon or package
services.
The procedure that follows shows how to create a robust name-resolution configuration that will allow
cluster nodes to continue communicating with one another if a name service fails.
Procedure
1. Edit the /etc/hosts file on all nodes in the cluster. Add name resolution for all heartbeat IP
addresses, and other IP addresses from all the cluster nodes; see Configuring Name Resolution for
discussion and examples.
NOTE: For each cluster node, the public-network IP address must be the first address listed. This
enables other applications to talk to other nodes on public networks.
2. If you are using DNS, make sure your name servers are configured in /etc/resolv.conf, for
example:
search cup.hp.com
nameserver 15.243.128.51
nameserver 15.243.160.51
3. Edit or create the /etc/nsswitch.conf file on all nodes and add the following text, if it does not
already exist:
If a line beginning with the string hosts: already exists, then make sure that the text immediately to
the right of this string is (on one line):
files [NOTFOUND=continue UNAVAIL=continue] dns [NOTFOUND=return UNAVAIL=return]
or
This step is critical, allowing the cluster nodes to resolve hostnames to IP addresses while DNS, NIS,
or the primary LAN is down.
4. Create a $SGCONF/cmclnodelist file on all nodes that you intend to configure into the cluster, and
allow access by all cluster nodes. See .
NOTE: Hewlett Packard Enterprise recommends that you also make the name service itself highly
available, either by using multiple name servers or by configuring the name service into a Serviceguard
package.
Channel Bonding
Channel bonding of LAN interfaces is implemented by the use of the bonding driver, which is installed in
the kernel at boot time.
• Mode 0, which is used for load balancing, uses all slave devices within the bond in parallel for data
transmission. This can be done when the LAN interface cards are connected to an Ethernet switch,
with the ports on the switch configured as Fast EtherChannel trunks. Two switches should be cabled
together as an HA grouping to allow package failover.
• For high availability, in which one slave serves as a standby for the bond and the other slave transmits
data, install the bonding module in mode 1. This is most appropriate for dedicated heartbeat
connections that are cabled through redundant network hubs or switches that are cabled together.
• Mode 4, which is used for dynamic link aggregation, creates aggregation groups that share the same
speed and duplex settings. It utilizes all slaves in the active aggregator according to the 802.3ad
specification.
NOTE: Hewlett Packard Enterprise recommends you to set the LACP (Link Aggregation Control
Protocol) timer value to short at the switches to enable faster detection and reconciliation from the link
failures.
NOTE:
Hewlett Packard Enterprise recommends that you do the bonding configuration from the system console,
because you will need to restart networking from the console when the configuration is done.
Sample Configuration
Configure the following files to support LAN redundancy. For a single failover only one bond is needed.
2. Create an ifcfg-ethn file for each interface in the bond. All interfaces should have SLAVE and
MASTER definitions. For example, in a bond that uses eth0 and eth1, edit the ifcfg-eth0 file to
appear as follows:
DEVICE=eth0
USERCTL=no
ONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=none
Edit the ifcfg-eth1 file to appear as follows:
DEVICE=eth1
USERCTL=no
ONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=none
For Red Hat 5 and Red Hat 6 only, add a line containing the hardware (MAC) address of the interface
to the corresponding ifcfg-ethn slave file, for example:
HWADDR=00:12:79:43:5b:f4
NOTE: During configuration, you need to make sure that the active slaves for the same bond on each
node are connected the same hub or switch. You can check on this by examining the file /proc/net/
bonding/bond<x>/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 on a Red Hat system:
/etc/rc.d/init.d/network restart
NOTE: It is better not to restart the network from outside the cluster subnet, as there is a chance the
network could go down before the command can complete.
/sbin/ifconfig
NOTE: Do not change the UNIQUE and _nm_name parameters. You can leave MTU and
REMOTE_IPADDR in the file as long as they are not set.
NOTE: Use ifconfig to find the relationship between eth IDs and the MAC addresses.
Restarting Networking
Restart the networking subsystem. From the console of any node in the cluster, execute the following
command on a SUSE system:
/etc/init.d/network restart
NOTE:
It is better not to restart the network from outside the cluster subnet, as there is a chance the network
could go down before the command can complete.
If there is an error in any of the bonding configuration files, the network may not function properly. If this
occurs, check each configuration file for errors, then try to start the network again.
The following example of the fdisk dialog shows that the disk on the device file /dev/sdc is set to
Smart Array type partition, and appears as follows:
fdisk /dev/sdc
• Hewlett Packard Enterprise recommends that you can configure the same multipath device name for
all the LUNs on various nodes of a cluster, so that the administration of the cluster can be made
easier.
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
fdisk -l /dev/sdc
NOTE: fdisk may not be available for SUSE on all platforms. In this case, using YAST2 to set up the
partitions is acceptable.
Patches can be downloaded from Hewlett Packard Enterprise Support Center at http://www.hpe.com/
info/hpesc.
If udev device is selected as This is supported, but the same udev rules must be used across all
lock LUN. nodes in the cluster for the whole LUN or the partitioned LUN.
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. If possible,
avoid using private volume groups, especially LVM boot volumes. Minor numbers increment with
each logical volume, and mismatched numbers of logical volumes between nodes can cause a
failure of LVM (and boot, if you are using an LVM boot volume).
NOTE: Except as noted in the sections that follow, 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’ve distributed the LVM configuration to all the cluster nodes, you will be able to use LVM
commands to switch volume groups between nodes. (To avoid data corruption, a given volume group
must be active on only one node at a time).
Before you configure volume group on Red Hat Enterprise Linux 7 or later and SUSE Linux Enterprise
Server 12 or later, you must disable the lvm2 metadata daemon so that up to date volume group data is
seen on all nodes in the cluster. For more information about how to disable lvm metadata daemon on
RHEL 7 and SLES 12, see the following:
• Redhat Enterprise Linux version 7 Logical Volume Manager Administration available at https://
access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/
Logical_Volume_Manager_Administration/index.html
• Storage Administration Guide SUSE Linux Enterprise Server 12 available at https://www.suse.com/
documentation/sles-12/pdfdoc/stor_admin/stor_admin.pdf
NOTE: Enabling the LVM metadata daemon on any Red Hat Enterprise Linux or SUSE Linux Enterprise
Server versions may result in volume group activation problems. Hence this daemon must be disabled by
default on all versions.
Limitation
• Serviceguard supports Multipathing only with Device Mapper (DM) multipath. The cmpreparestg
command might fail to create the LVM volume group, if device has multiple paths but mapper device is
not configured and only one of the path has been provided.
For example, if a device has two paths /dev/sdx and /dev/sdy. Device Mapper devices has not
been configured and if one of the paths will be used with cmpreparestg, then cmpreparestg
• On Red Hat Enterprise Linux 7, Serviceguard supports only user friendly named mapper device to
create LVM volume group. For information about how to setup user friendly named mapper device,
see Red Hat Enterprise Linux 7 DM Multipath Configuration and Administration available at https://
access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/pdf/DM_Multipath/
Red_Hat_Enterprise_Linux-7-DM_Multipath-en-US.pdf.
fdisk -l
In this example, the disk described by device file /dev/sda has already been partitioned for Linux, into
partitions named /dev/sda1 - /dev/sda7. The second internal device /dev/sdb and the two external
devices /dev/sdc and /dev/sdd have not been partitioned.
NOTE: fdisk may not be available for SUSE on all platforms. In this case, using YAST2 to set up the
partitions is acceptable.
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.
The following steps create the new partition:
# fdisk <DeviceName>
4. First cylinder (1-nn, default 1): Enter Accept the default starting cylinder
1
5. Last cylinder or +size or +sizeM Enter Accept the default, which is the last
or +sizeK (1-nn, default nn): 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/sdc
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 1Last cylinder or +size or +sizeM or +sizeK (1-4067, default 4067): Enter
Using default value 4067
2. Respond to the prompts as shown in the following table to set a partition type:
fdisk /dev/sdc
Command (m for help): t
Partition number (1-4): 1
HEX code (type L to list codes): 8e
3. Repeat this process for each device file that you will use for shared storage.
fdisk /dev/sdd
fdisk /dev/sdf
fdisk /dev/sdg
4. 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: fdisk may not be available for SUSE on all platforms. In this case, using YAST2 to set up the
partitions is acceptable.
Procedure
2. Uncomment the line in /etc/lvm/lvm.conf that begins # volume_list =, and edit it to include
all of the node's "private" volume groups (those not shared with the other cluster nodes), including the
root volume group.
5. Run vgscan:
vgscan
NOTE: At this point, the setup for volume-group activation protection is complete. Serviceguard adds a
tag matching the uname -n value of the owning node to each volume group defined for a package
when the package runs and deletes the tag when the package halts. The command vgs -o +tags
vgname will display any tags that are set for a volume group.
The sections that follow take you through the process of configuring volume groups and logical
volumes, and distributing the shared configuration. When you have finished that process, use the
procedure under Testing the Shared Configuration on page 188 to verify that the setup has been
done correctly.
Building Volume Groups: Example for Smart Array Cluster Storage (MSA 2000 Series)
NOTE: For information about setting up and configuring the MSA 2000 for use with Serviceguard, see
HPE Serviceguard for Linux Version A.11.19 or later Deployment Guide at http://www.hpe.com/info/
linux-serviceguard-docs.
Use Logical Volume Manager (LVM) on your system to create volume groups that can be activated by
Serviceguard packages. This section provides an example of creating Volume Groups on LUNs created
on MSA 2000 Series storage. For more information on LVM, see the Logical Volume Manager How To,
which you can find at http://tldp.org/HOWTO/HOWTO-INDEX/howtos.html.
Before you start, partition your LUNs and label them with a partition type of 8e (Linux LVM). Use the type
t parameter of the fdisk command to change from the default of 83 (Linux).
Do the following on one node:
NOTE: You can create a single logical volume or multiple logical volumes using cmpreparestg (1m). If
you use cmpreparestg, you can skip the following steps.
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
NOTE: The files /etc/lvmtab and /etc/lvmtab.d may not exist on some distributions. In that
case, ignore references to these files.
pvcreate -f /dev/sda1
186 Building Volume Groups: Example for Smart Array Cluster Storage (MSA 2000 Series)
pvcreate -f /dev/sdb1
pvcreate -f /dev/sdc1
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, we add the LUNs /dev/sda1 and /dev/sdb1 to volume group vgpkgA, and /dev/sdc1
to vgpkgB:
NOTE: Use vgchange --addtag only if you are implementing volume-group activation protection.
Remember that volume-group activation protection, if used, must be implemented on each node.
Procedure
1. Use Logical Volume Manager (LVM) to create volume groups that can be activated by Serviceguard
packages.
For an example showing volume-group creation on LUNs, see Building Volume Groups: Example
for Smart Array Cluster Storage (MSA 2000 Series) on page 186. (For Fibre Channel storage you
would use device-file names such as those used in the section Creating Partitions on page 183).
2. On Linux distributions that support it, enable activation protection for volume groups. See Enabling
Volume Group Activation Protection on page 185.
3. To store data on these volume groups you must create logical volumes. The following creates a 500
Megabyte logical volume named /dev/vgpkgA/lvol1 and a one Gigabyte logical volume
named /dev/vgpkgA/lvol2 in volume group vgpkgA:
lvcreate -L 1G vgpkgA
4. Create a file system on one of these logical volumes, and mount it in a newly created directory:
NOTE: You can create file systems using the cmpreparestg (1m)command. If you use
cmpreparestg, you can skip this step.
mke2fs -j /dev/vgpkgA/lvol1
mkdir /extra
NOTE: For information about supported filesystem types, see the fs_type discussion on.
5. To test that the file system /extra was created correctly and with high availability, you can create a
file on it, and read it.
cat /extra/LVM-test.conf
NOTE: Be careful if you use YAST or YAST2 to configure volume groups, as that may cause all volume
groups on that system to be activated. After running YAST or YAST2, check to make sure that volume
groups for Serviceguard packages not currently running have not been activated, and use LVM
commands to deactivate any that have. For example, use the command vgchange -a n /dev/
sgvg00 to deactivate the volume group sgvg00.
Procedure
1. On ftsys9, activate the volume group, mount the file system that was built on it, write a file in the
shared file system and look at the result:
vgchange --addtag $(uname -n) vgpkgB
NOTE: If you are using the volume-group activation protection feature of Serviceguard for Linux, you
must use vgchange --addtag to add a tag when you manually activate a volume group. Similarly,
you must remove the tag when you deactivate a volume group that will be used in a package (as
shown at the end of each step).
Use vgchange --addtag and vgchange --deltag only if you are implementing volume-group
activation protection. Remember that volume-group activation protection, if used, must be
implemented on each node.
Serviceguard adds a tag matching the uname -n value of the owning node to each volume group
defined for a package when the package runs; the tag is deleted when the package is halted. The
command vgs -o +tags vgname will display any tags that are set for a volume group.
vgchange -a y vgpkgB
mount /dev/vgpkgB/lvol1 /extra
echo ‘Written by’ ‘hostname‘ ‘on’ ‘date‘ > /extra/datestamp
cat /extra/datestamp
You should see something like the following, showing the date stamp written by the other node:
Written by ftsys9.mydomain on Mon Jan 22 14:23:44 PST 2006
Now unmount the volume group again:
umount /extra
vgchange -a n vgpkgB
vgchange --deltag $(uname -n) vgpkgB
2. On ftsys10, activate the volume group, mount the file system, write a date stamp on to the shared
file, and then look at the content of the file:
vgchange --addtag $(uname -n) vgpkgB
vgchange -a y vgpkgB
mount /dev/vgpkgB/lvol1 /extra
echo ‘Written by’ ‘hostname‘ ‘on’ ‘date‘ >> /extra/datestamp
cat /extra/datestamp
Now unmount the volume group again, and remove the tag you added in step 1:
umount /extra
vgchange -a n vgpkgB
vgchange --deltag $(uname -n) vgpkgB
NOTE: The volume activation protection feature of Serviceguard for Linux requires that you add the
tag as shown at the beginning of the above steps when you manually activate a volume group.
Similarly, you must remove the tag when you deactivate a volume group that will be used in a package
(as shown at the end of each step). As of Serviceguard for Linux A.11.16.07, a tag matching the
uname -n value of the owning node is automatically added to each volume group defined for a
package when the package runs; the tag is deleted when the package is halted. The command vgs -
o +tags vgname will display any tags that are set for a volume group.
If a disk in a volume group must be replaced, you can restore the old disk’s metadata on the new disk by
using the vgcfgrestore command. See “Replacing Disks” in the “Troubleshooting” chapter.
NOTE:
You do not need to perform these actions if you have implemented volume-group activation protection as
described under Enabling Volume Group Activation Protection on page 185.
NOTE:
Be careful if you use YAST or YAST2 to configure volume groups, as that may cause all volume groups to
be activated. After running YAST or YAST2, check that volume groups for Serviceguard packages not
currently running have not been activated, and use LVM commands to deactivate any that have. For
example, use the command vgchange -a n /dev/sgvg00 to deactivate the volume group sgvg00.
Red Hat
NOTE:
These commands make the disk and its data unusable by LVM and allow it to be initialized by VxVM.
(The commands should only be used if you have previously used the disk with LVM and do not want to
save the data on it.)
You can remove LVM header data from the disk as in the following example (note that all data on the disk
are erased):
pvremove /dev/sda
Then, use the vxdiskadm program to initialize multiple disks for VxVM or use the vxdisksetup
command to initialize one disk at a time, as in the following example:
/usr/lib/vxvm/bin/vxdisksetup -i sda
NOTE: You can use cmpreparestg (1m) to create a VxVM disk group. If you use cmpreparestg, you
do not need to perform the procedures that follow, but it is a good idea to read them so that you
understand what cmpreparestg does for you.
Use vxdiskadm or use the vxdg command, to create disk groups, as in the following example:
vxdg init logdata sda
Verify the configuration with the following command:
vxdg list
NAME STATE ID
logdata enabled 972078742.1084.node1
NOTE: You can create a single logical volume or multiple logical volumes using cmpreparestg (1m). If
you use cmpreparestg, you can skip this step, but it is a good idea to read them so that you understand
what cmpreparestg does for you.
Use the vxassist command to create logical volumes. The following is an example:
vxassist -g logdata make log_files 1024m
This command creates a 1024 MB volume named log_files in a disk group named logdata. The volume
can be referenced with the block device file /dev/vx/dsk/logdata/log_files or the raw (character)
device file /dev/vx/rdsk/logdata/log_files. Verify the configuration with the following command:
vxprint -g logdata
NOTE: The specific commands for creating mirrored and multi-path storage using VxVM are described in
the Veritas Volume Manager Reference Guide.
NOTE:
You can create file systems by means of the cmpreparestg (1m) command. If you use
cmpreparestg, you can skip the following steps, but it is a good idea to read them so that you
understand what cmpreparestg does for you.
Use the following commands to create a file system for mounting on the logical volume just created:
4. Check to ensure the file system is present, then unmount the file system:
umount /logs
IMPORTANT: See NODE_NAME under Cluster Configuration Parameters on page 111 for
important information about restrictions on the node name.
NOTE: Hewlett Packard Enterprise strongly recommends that you modify the file so as to send heartbeat
over all possible networks.
The manpage for the cmquerycl command further explains the parameters that appear in this file. Many
are also described in Planning and Documenting an HA Cluster. Modify your /etc/cmcluster/
clust1.config file as needed.
cmquerycl Options
IMPORTANT: See About Hostname Address Families: IPv4-Only, IPv6-Only, and Mixed Mode
for a full discussion, including important restrictions for IPv6–only and mixed modes.
If you use the -a option, Serviceguard will ignore the value of the HOSTNAME_ADDRESS_FAMILY
parameter in the existing cluster configuration, if any, and attempt to resolve the cluster and Quorum
Server hostnames as specified by the -a option:
• If you specify -a ipv4 , each of the hostnames must resolve to at least one IPv4 address; otherwise
the command will fail.
• Similarly, if you specify -a ipv6, each of the hostnames must resolve to at least one IPv6 address;
otherwise the command will fail.
• If you specify -a any, Serviceguard will attempt to resolve each hostname to an IPv4 address, then, if
that fails, to an IPv6 address.
• -h ipv4 tells Serviceguard to discover and configure only IPv4 subnets. If it does not find any eligible
subnets, the command will fail.
• -h ipv6 tells Serviceguard to discover and configure only IPv6 subnets. If it does not find any eligible
subnets, the command will fail.
• If you don't use the -h option, Serviceguard will choose the best available configuration to meet
minimum requirements, preferring an IPv4 LAN over IPv6 where both are available. The resulting
configuration could be IPv4 only, IPv6 only, or a mix of both. You can override Serviceguard's default
choices by means of the HEARTBEAT_IP parameter, discussed under Cluster Configuration
Parameters on page 111; that discussion also spells out the heartbeat requirements.
• The -h and -c options are mutually exclusive.
NOTE: This option must be used to discover actual or potential nodes and subnets in a cross-subnet
configuration. See Obtaining Cross-Subnet Information. It will also validate IP Monitor polling targets;
see Monitoring LAN Interfaces and Detecting Failure: IP Level, and POLLING_TARGET under
Cluster Configuration Parameters on page 111.
NOTE:
An iSCSI storage device does not support configuring a lock LUN.
NOTE: To remove the configured VCENTER_SERVER or ESX_HOST parameter all the packages having
Dynamically linked storage configuration must be deleted from the cluster.
The Serviceguard connects to the configured vCenter or Esxi host in the cluster to attach and detach the
VMFS disks configured in the package to ensure their exclusive access to the VMware Virtual machines.
When you issue attach and detach instructions, Serviceguard must authenticate the session using the
vCenter Server or Esxi host logging credentials. These credentials must be stored in the Serviceguard
Credential Store (SCS). To create SCS, you must use cmvmusermgmt utility which capture and store
vCenter server and Esxi host user credentials on virtual machines configured to be part of the cluster.
These credentials must have already been created on vCenter server or Esxi hosts prior to their use in
Serviceguard cluster. When Serviceguard nodes communicate with the vCenter server or Esxi host to
manage VMFS disks, they need to authenticate themselves using the user credentials stored in the SCS.
The cmvmusermgmt utility must be used to manage the SCS.
If the cluster is already configured and the SCS is to be created or updated, then cmvmusermgmt utility
can be executed on any of the cluster nodes. The changes to the SCS will automatically be distributed to
all the configured cluster nodes. However, when updating the SCS if any of the cluster nodes are not
reachable or down, then the SCS on such node must be synchronized using the sync option once the
node is reachable.
If the cluster has to be created and the SCS is already created on the future cluster nodes, then the
cluster creation operation (cmapplyconf) must be executed on the node where the cmvmusermgmt
utility was used to create the SCS. This will automatically distribute the SCS to all the cluster nodes.
The SCS must be created before applying the cluster with VCENTER_SERVER or ESX_HOST on the
node where the cluster configuration is applied.
Serviceguard validates the details provided in the SCS file and will be copied to all the nodes configured
in the cluster.
• The user account provided for the Esxi host or vCenter server must have administrative privileges or
must be a root user. If the user is created on vCenter, then the same user with same privileges must
be created on ESXi also. If you do not want to use the administrator user account or the root user,
create a role with the required privileges for VMwareDisks resource functionality and assign this role to
the user. The role assigned to the user account must have the following privileges:
If required you can add additional privileges. For more information about how to create a role and add
a user to the created role, see VMware product documentation.
• If the vCenter or Esxi host password expires, you must run cmvmusermgmt command to update the
SCS file.
• Hewlett Packard Enterprise recommends you to run cmcheckconf command periodically to ensure
that the SCS file contents are verified.
• You must either use IP address or hostname of a VMware vCenter or Esxi host with cmvmusermgmt
command.
A cluster lock LUN or quorum server, is required for two-node clusters. To obtain a cluster configuration
file that includes Quorum Server parameters, use the -q option of the cmquerycl command, specifying
a Quorum Server hostname or IP address, for example (all on one line):
cmquerycl -q <QS_Host> -n ftsys9 -n ftsys10 -C <ClusterName>.conf
To specify an alternate hostname or IP address by which the Quorum Server can be reached, use a
command such as (all on one line):
cmquerycl -q <QS_Host> <QS_Addr> -n ftsys9 -n ftsys10 -C <ClusterName>.conf
Enter the QS_HOST (IPv4 or IPv6 on SLES 11; IPv4 only on Red Hat 5 and Red Hat 6), optional
QS_ADDR (IPv4 or IPv6 on SLES 11; IPv4 only on Red Hat 5 and Red Hat 6) ,
QS_POLLING_INTERVAL, and optionally a QS_TIMEOUT_EXTENSION; and also check the
HOSTNAME_ADDRESS_FAMILY setting, which defaults to IPv4. See the parameter descriptions under
Cluster Configuration Parameters on page 111.
5 lan1 (nodeC)
lan1 (nodeD)
6 lan2 (nodeC)
lan2 (nodeD)
IP subnets:
IPv4:
IPv6:
1 15.13.164.0
15.13.172.0
2 15.13.165.0
15.13.182.0
3 15.244.65.0
4 15.244.56.0
In the Route connectivity section, the numbers on the left (1-4) identify which subnets are routed to
each other (for example, 15.13.164.0 and 15.13.172.0).
IMPORTANT: Note that in this example subnet 15.244.65.0, used by NodeA and NodeB, is not
routed to 15.244.56.0, used by NodeC and NodeD.
But subnets 15.13.164.0 and 15.13.165.0, used by NodeA and NodeB, are routed respectively
to subnets 15.13.172.0 and 15.13.182.0, used by NodeC and NodeD. At least one such
routing among all the nodes must exist for cmquerycl to succeed.
For information about configuring the heartbeat in a cross-subnet configuration, see the HEARTBEAT_IP
parameter discussion under Cluster Configuration Parameters on page 111.
NOTE:
Remember to tune kernel parameters on each node to ensure that they are set high enough for the
largest number of packages that will ever run concurrently on that node.
◦ Access-control policy - one of these rules, comprising the three parameters USER_NAME,
USER_HOST, USER_ROLE. See Setting up Access-Control Policies.
• Access roles - the set of roles that can be defined for cluster users (Monitor, Package Admin, Full
Admin).
Levels of Access
Serviceguard recognizes two levels of access, root and non-root:
• Root access: Full capabilities; only role allowed to configure the cluster.
As Access Roles shows, users with root access have complete control over the configuration of the
cluster and its packages. This is the only role allowed to use the cmcheckconf, cmapplyconf,
cmdeleteconf, and cmmodnet -a commands.
In order to exercise this Serviceguard role, you must log in as the root user (superuser) on a node in
the cluster you want to administer. Conversely, the root user on any node in the cluster always has full
Serviceguard root access privileges for that cluster; no additional Serviceguard configuration is
needed to grant these privileges.
IMPORTANT: Users on systems outside the cluster can gain Serviceguard root access
privileges to configure the cluster only via a secure connection (rsh or ssh).
◦ (all-packages) Package Admin: Allowed to perform package administration, and use cluster and
package view commands.
These users can run and halt any package in the cluster, and change its switching behavior, but
cannot configure or create packages. Unlike single-package Package Admin, this role is defined in
the cluster configuration file. Package Admin includes the cluster-wide privileges of the Monitor
role.
IMPORTANT: A remote user (one who is not logged in to a node in the cluster, and is not
connecting via rsh or ssh) can have only Monitor access to the cluster.
(Full Admin and Package Admin can be configured for such a user, but this usage is deprecated.
As of Serviceguard A.11.18 configuring Full Admin or Package Admin for remote users gives
them Monitor capabilities. See Setting up Access-Control Policies for more information.)
NOTE: For more information and advice, see the white paper Securing Serviceguard at http://
www.hpe.com/info/linux-serviceguard-docs (Select HP Serviceguard -> White Papers).
Define access-control policies for a cluster in the cluster configuration file; see Cluster Configuration
Parameters on page 111. To define access control for a specific package, use user_host and related
parameters in the package configuration file. You can define up to 200 access policies for each cluster. A
root user can create or modify access control policies while the cluster is running.
NOTE: Once nodes are configured into a cluster, the access-control policies you set in the cluster and
package configuration files govern cluster-wide security; changes to the “bootstrap” cmclnodelist file
are ignored (see Allowing Root Access to an Unconfigured Node).
Access control policies are defined by three parameters in the configuration file:
NOTE: The commands must be issued on USER_HOST but can take effect on other nodes; for
example, patrick can use bit’s command line to start a package on gryf (assuming bit and
gryf are in the same cluster).
◦ A specific node name - Use the hostname portion (the first part) of a fully-qualified domain name
that can be resolved by the name service you are using; it should also be in each node’s /etc/
hosts. Do not use an IP addresses or the fully-qualified domain name. If there are multiple
hostnames (aliases) for an IP address, one of those must match USER_HOST. See Configuring
Name Resolution for more information.
◦ MONITOR
◦ FULL_ADMIN
◦ PACKAGE_ADMIN
MONITOR and FULL_ADMIN can be set only in the cluster configuration file and they apply to the entire
cluster. PACKAGE_ADMIN can be set in the cluster configuration file or a package configuration file. If it
is set in the cluster configuration file, PACKAGE_ADMIN applies to all configured packages; if it is set in
a package configuration file, it applies to that package only. These roles are not exclusive; for
example, more than one user can have the PACKAGE_ADMIN role for the same package.
NOTE: You do not have to halt the cluster or package to configure or modify access control policies.
IMPORTANT: Wildcards do not degrade higher-level roles that have been granted to individual
members of the class specified by the wildcard. For example, you might set up the following policy
to allow root users on remote systems access to the cluster:
USER_NAME root
USER_HOST ANY_SERVICEGUARD_NODE
USER_ROLE MONITOR
This does not reduce the access level of users who are logged in as root on nodes in this cluster;
they will always have full Serviceguard root-access capabilities.
Consider what would happen if these entries were in the cluster configuration file:
# Policy 1:
USER_NAME john
USER_HOST bit
USER_ROLE PACKAGE_ADMIN
# Policy 2:
USER_NAME john
USER_HOST bit
USER_ROLE MONITOR
# Policy 3:
USER_NAME ANY_USER
USER_HOST ANY_SERVICEGUARD_NODE
USER_ROLE MONITOR
In the above example, the configuration would fail because user john is assigned two roles. (In any case,
Policy 2 is unnecessary, because PACKAGE_ADMIN includes the role of MONITOR).
Policy 3 does not conflict with any other policies, even though the wildcard ANY_USER includes the
individual user john.
Procedure
1. Create a cluster configuration file that contains the generic resource parameters.
cmquerycl -v -C $SGCONF/cluster.conf -n node1 -n node2 –q <quorum_server>
2. Edit the cluster configuration file and specify the generic resource parameters.
GENERIC_RESOURCE_NAME cpu_monitor
GENERIC_RESOURCE_TYPE extended
GENERIC_RESOURCE_CMD “$SGCONF/generic_resource_monitors/cpu_monitor.sh 20”
GENERIC_RESOURCE_SCOPE node
GENERIC_RESOURCE_RESTART 25
GENERIC_RESOURCE_HALT_TIMEOUT 60000000
NOTE: Cluster generic resources must be configured to use the monitoring script via
GENERIC_RESOURCE_CMD parameter. It is the generic resource command monitoring script that
contains the logic to monitor the resource and set the status of a generic resource accordingly by
using cmsetresource(1m).
These scripts must be written by end-users according to their requirements. The monitoring script
must be configured as a GENERIC_RESOURCE_CMD in the cluster if the monitoring of the resource is
required to be started and stopped as a part of the cluster.
Configure the monitoring script by providing the full path name of the monitoring script as the
GENERIC_RESOURCE_CMD value as shown in the step.
Hewlett Packard Enterprise provides a template that describes how a monitoring script can be written.
For more information on monitoring scripts and the template, see Monitoring Script for Cluster
Generic Resources. For the description of cluster generic resources parameters, see Cluster
Configuration Parameters and Using the Cluster Generic Resources Monitoring Service.
3. After editing the cluster configuration file, verify the content of the cluster configuration file.
cmcheckconf -v -C $SGCONF/cluster.conf
4. When verification completes without errors, apply the cluster configuration file. This adds the cluster
configuration information (along with cluster generic resources) to the binary cluster configuration file
in the $SGCONF directory and distributes it to all the cluster nodes.
cmapplyconf -C $SGCONF/cluster.conf
Quorum_Server_Status:
NAME STATUS STATE ADDRESS
qs_node unknown unknown 10.149.2.5
Network_Parameters:
INTERFACE STATUS NAME
PRIMARY unknown eth0
PRIMARY unknown eth3
PRIMARY unknown eth4
PRIMARY unknown bond0
Quorum_Server_Status:
NAME STATUS STATE ADDRESS
qs_node unknown unknown 10.149.2.5
Network_Parameters:
INTERFACE STATUS NAME
PRIMARY unknown eth0
PRIMARY unknown eth3
PRIMARY unknown eth4
PRIMARY unknown bond0
7. Start the cluster. As part of the cluster start, the monitoring script will start the monitoring of the generic
resource and set the status accordingly.
cmruncl
Prerequisites
Configure the cluster generic resource as described in the section Configuring Cluster Generic
Resources.
Procedure
1. Create a package configuration file that contains the generic resource module.
cmmakepkg $SGCONF/pkg1/pkg1.conf
Package template is created.
2. Edit the file before you use it.
3. Optional: To generate a configuration file by adding the generic resource module to an existing
package, enter the entire command in one line.
cmmakepkg -i $SGCONF/pkg1/pkg1.conf -m sg/generic_resource
4. Edit the package configuration file and specify the generic resource parameters.
generic_resource_name cpu_monitor
generic_resource_evaluation_type before_package_start
generic_resource_up_criteria <=30
NOTE: When using the cluster generic resource in a package, it is mandatory that corresponding
services should not be defined for package generic resource under the package configuration.
The service functionality has been defined in cluster generic resource by using
GENERIC_RESOURCE_CMD, GENERIC_RESOURCE_RESTART and
GENERIC_RESOURCE_HALT_TIMEOUT parameters.
CAUTION: Using cluster generic resource in package and adding the service functionality for the
same generic resource in package will result in unexpected problems.
5. After editing the package configuration file, verify the content of the package configuration file.
cmcheckconf -v -P $SGCONF/pkg1/pkg1.conf
6. When verification completes without errors, apply the package configuration file. This adds the
package configuration information (along with generic resources) to the binary cluster configuration file
in the $SGCONF directory and distributes it to all the cluster nodes.
cmapplyconf -P $SGCONF/pkg1/pkg1.conf
Policy_Parameters:
POLICY_NAME CONFIGURED_VALUE
Failover configured_node
Failback manual
Script_Parameters:
ITEM STATUS NODE_NAME NAME
Generic Resource unknown sgltt2 cpu_monitor
Generic Resource unknown sgltt4 cpu_monitor
Node_Switching_Parameters:
NODE_TYPE STATUS SWITCHING NAME
Primary down sgltt2
Alternate down sgltt4
Other_Attributes:
ATTRIBUTE_NAME ATTRIBUTE_VALUE
Style modular
Priority no_priority
8. Start the cluster. As part of the cluster start, the monitoring script will start the monitoring of the generic
resource and set the status accordingly. Also the cluster start will bring up the package if the
up_criteria is met.
cmruncl
cmruncl: Validating network configuration...
cmruncl: Network validation complete
Cluster successfully formed.
Check the syslog files on all nodes in the cluster to verify that no warnings occurred during startup.
cmviewcl -v
CLUSTER STATUS
sg_cluster up
Quorum_Server_Status:
NAME STATUS STATE ADDRESS
qs_node up running 10.149.2.5
Policy_Parameters:
POLICY_NAME CONFIGURED_VALUE
Failover configured_node
Failback manual
Script_Parameters:
ITEM STATUS MAX_RESTARTS RESTARTS NAME
Generic Resource up cpu_monitor
Node_Switching_Parameters:
NODE_TYPE STATUS SWITCHING NAME
Primary up enabled sgltt2 (current)
Alternate up enabled sgltt4
Other_Attributes:
ATTRIBUTE_NAME ATTRIBUTE_VALUE
Style modular
Priority no_priority
Quorum_Server_Status:
NAME STATUS STATE ADDRESS
qs_node up running 10.149.2.5
Network_Parameters:
INTERFACE STATUS NAME
PRIMARY up eth0
PRIMARY up eth3
PRIMARY up eth4
PRIMARY up bond0
The cmviewcl -v -f line output of running cluster with cluster generic resource configured in package
(snippet) will be as follows:
package:pkg1|generic_resource:cpu_monitor|name=cpu_monitor
package:pkg1|generic_resource:cpu_monitor|evaluation_type=before_package_start
package:pkg1|generic_resource:cpu_monitor|up_criteria="<=30"
package:pkg1|generic_resource:cpu_monitor|node:sgltt2|status=up
package:pkg1|generic_resource:cpu_monitor|node:sgltt2|current_value=1
package:pkg1|generic_resource:cpu_monitor|node:sgltt4|status=up
package:pkg1|generic_resource:cpu_monitor|node:sgltt4|current_value=1
package:pkg1|module_name:sg/generic_resource|module_name=sg/generic_resource
package:pkg1|module_name:sg/generic_resource|module_version=1
generic_resource:cpu_monitor|name=cpu_monitor
generic_resource:cpu_monitor|type=extended
generic_resource:cpu_monitor|define=cluster
generic_resource:cpu_monitor|scope=node
generic_resource:cpu_monitor|command="$SGCONF/generic_resource_monitors/cpu_monitor.sh 20"
generic_resource:cpu_monitor|max_restarts_allowed=25
generic_resource:cpu_monitor|halt_timeout=60000000
generic_resource:cpu_monitor|node:sgltt2|name=sgltt2
generic_resource:cpu_monitor|node:sgltt2|current_value=1
◦ GENERIC_RESOURCE_RESTART
◦ GENERIC_RESOURCE_HALT_TIMEOUT
Getting and Setting the Status/Value of a Simple/Extended Cluster Generic Resource 211
• Modification of GENERIC_RESOURCE_NAME is equivalent to removal of generic resource and addition
of new generic resource. Hence you can modify all the parameter values for the generic resource.
• Modification of GENERIC_RESOURCE_TYPE from a simple resource to an extended resource or
conversely from extended to simple resource is not allowed when the cluster is running.
• Modification of GENERIC_RESOURCE_CMD is not allowed when the cluster is running.
If the cluster is online the cmcheckconf command also verifies that all the conditions for the specific
change in configuration have been met.
You can use these commands to test cluster operation, as in the following:
2. When the cluster has started, make sure that cluster components are operating correctly:
cmviewcl -v
Make sure that all nodes and networks are functioning as expected. For more information, refer to the
chapter on “Cluster and Package Maintenance.”
3. Verify that nodes leave and enter the cluster as expected using the following steps:
• Halt the cluster. You can use Serviceguard Manager or the cmhaltnode command.
• Check the cluster membership to verify that the node has left the cluster. You can use the
Serviceguard Manager main page or the cmviewcl command.
• Start the node. You can use Serviceguard Manager or the cmrunnode command.
• Verify that the node has returned to operation. You can use Serviceguard Manager or the
cmviewcl command again.
4. Bring down the cluster. You can use Serviceguard Manager or the cmhaltcl -v -f command.
• The cluster is not running on any node, all cluster nodes must be reachable, and all must be
attempting to start up. In this case, the node attempts to form a cluster consisting of all configured
nodes.
• The cluster is already running on at least one node. In this case, the node attempts to join that cluster.
• Neither is true: the cluster is not running on any node, and not all the nodes are reachable and trying
to start. In this case, the node will attempt to start for the AUTO_START_TIMEOUT period. If neither of
these things becomes true in that time, startup will fail.
To enable automatic cluster start, set the flag AUTOSTART_CMCLD to 1 in the $SGAUTOSTARTfile
($SGCONF/cmcluster.rc) on each node in the cluster; the nodes will then join the cluster at boot time.
Here is an example of the $SGAUTOSTART file:
SGAUTOSTART=/usr/local/cmcluster/conf/cmcluster.rc
#*************************** CMCLUSTER *************************
AUTOSTART_CMCLD=1
NOTE: The /sbin/init.d/cmcluster file may call files that Serviceguard stores in$SGCONF/rc.
(See Understanding the Location of Serviceguard Files on page 169 for information about
Serviceguard directories on different Linux distributions.) This directory is for Serviceguard use only! Do
not move, delete, modify, or add files in this directory.
NOTE:
In the absence of crash dump, it is not possible to determine the cause of a reset. The
NODE_TOC_BEHAVIOR must be set to panic to capture the crash dump.
b. Ensure that cluster services are halted on the node. Then, unload the deadman module and restart
the SGSafetyTimer service:
#rmmod deadman
#service SGSafetyTimer restart
This loads deadman with new NODE_TOC_BEHAVIOR value, which can be verified as explained
previously.
216 NODE_TOC_BEHAVIOR
In a single-node cluster, a quorum server is not required, since there is no other node in the cluster. The
output from the cmquerycl command omits the quorum server information area if there is only one
node.
You still need to have redundant networks, but you do not need to specify any heartbeat LANs, since
there is no other node to send heartbeats to. In the cluster configuration file, specify all LANs that you
want Serviceguard to monitor. For LANs that already have IP addresses, specify them with the
STATIONARY_IP parameter, rather than the HEARTBEAT_IP parameter.
Single-Node Operation
Single-node operation occurs in a single-node cluster, or in a multi-node cluster in which all but one node
has failed, or in which you have shut down all but one node, which will probably have applications
running. As long as the Serviceguard daemon cmcld is active, other nodes can rejoin the cluster at a
later time.
If the cmcld daemon fails during single-node operation, it will leave the single node up and your
applications running. (This is different from the failure of cmcld in a multi-node cluster, which causes the
node to halt with a reboot, and packages to be switched to adoptive nodes.)
It is not necessary to halt the single node in this case, since the applications are still running, and no other
node is currently available for package switching.
CAUTION:
But you should not try to restart Serviceguard; data corruption might occur if another node were to
attempt to start up a new instance of an application that is still running on the single node. Instead,
choose an appropriate time to shut down and reboot the node. This will allow the applications to
shut down and Serviceguard to restart the cluster after the reboot.
Disabling identd
Ignore this section unless you have a particular need to disable identd.
You can configure Serviceguard not to use identd.
CAUTION: This is not recommended. Consult the white paper Securing Serviceguard at http://
www.hpe.com/info/linux-serviceguard-docs (Select HP Serviceguard -> White Papers) for
more information.
If you must disable identd, do the following on each node after installing Serviceguard but before each
node rejoins the cluster (For example, before issuing a cmrunnode or cmruncl).
For Red Hat and SUSE:
1. Change the value of the server_args parameter in the file /etc/xinetd.d/hacl-cfg from -c to -c
-i
2. Restart xinetd:
#systemctl restart qs.service
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 allow it to boot. If a
node is inaccessible, you will see a list of inaccessible nodes and 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.
1. Decide on the package’s major characteristics and choose the modules you need to include
(Choosing Package Modules).
2. Generate the package configuration file (Generating the Package Configuration File).
3. Edit the configuration file (Editing the Configuration File).
4. Verify and apply the package configuration (Verifying and Applying the Package Configuration).
5. Add the package to the cluster (Adding the Package to the Cluster).
To choose the right package modules, you need to decide the following things about the package you are
creating:
• What type of package it is; see Types of Package: Failover, Multi-Node, System Multi-Node.
• Which parameters need to be specified for the package (beyond those included in the base type,
which is normally failover, multi-node, or system-multi-node). See Package Modules and
Parameters.
When you have made these decisions, you are ready to generate the package configuration file; see
Generating the Package Configuration File.
• Failover packages. This is the most common type of package. Failover packages run on one node at a
time. If there is a failure, Serviceguard (or a user) can halt them, and then start them up on another
node selected from the package’s configuration list; see node_name.
• Multi-node packages. These packages run simultaneously on more than one node in the cluster.
Failures of package components such as applications, services, generic resource, or subnets, will
cause the package to be halted only on the node on which the failure occurred.
Relocatable IP addresses cannot be assigned to multi-node packages.
To generate a package configuration file that creates a multi-node package, include -m sg/
multi_node on the cmmakepkg command line. See Generating the Package Configuration File.
• System multi-node packages. System multi-node packages are supported only for applications
supplied by Hewlett Packard Enterprise.
• failover_policy
• failback_policy
• ip_subnet
• ip_address
Volume groups configured for packages of this type must be activated in shared mode.
For more information about types of packages and how they work, see How the Package Manager
Works. For information on planning a package, see Package Configuration Planning.
When you have decided on the type of package you want to create, the next step is to decide what
additional package-configuration modules you need to include; see Package Modules and Parameters.
• If a multi-node package has auto_run disabled (set to no in the package configuration file) it will not
start when the cluster is started. You can use cmmodpkg to enable package switching and start the
package for the first time. But if you then halt the multi-node package via cmhaltpkg, it can be re-
started only by means of cmrunpkg, not cmmodpkg.
• If a multi-node package is halted via cmhaltpkg, package switching is not disabled. This means that
the halted package will start to run on a rebooted node, if it is configured to run on that node and its
dependencies are met.
• When a multi-node package is started the first time (either at cluster startup, or subsequently if
auto_run is set to no, and package switching is then enabled) any dependent package will start on its
primary node. But if a multi-node package is halted along with its dependent packages, and the multi-
node package is then restarted, dependent packages which have had package switching re-enabled
will start on the first eligible node on which an instance of the multi-node package comes up; this may
not be the dependent packages’ primary node.
To ensure that dependent failover packages restart on their primary node if the multi-node packages
they depend on need to be restarted, make sure the dependent packages’ package switching is not
re-enabled before the multi-node packages are restarted. You can then either restart the dependent
NOTE: If you are going to create a complex package that contains many modules, you may want to skip
the process of selecting modules, and simply create a configuration file that contains all the modules:
cmmakepkg -m sg/all $SGCONF/pkg_sg_complex
(The output will be written to $SGCONF/pkg_sg_complex.)
log_level *
priority *
Table Continued
Table Continued
multi_node_all all parameters that can be used by a multi-node Use if you are
package; includes multi_node, dependency, creating a multi-
monitor_subnet, service, volume_group, node package that
filesystem, pev, external_pre, external, and requires most or all
acp modules. of the optional
parameters that are
available for this
type of package.
Table Continued
NOTE: The default form for parameter names in the modular package configuration file is lower case.
There are no compatibility issues; Serviceguard is case-insensitive as far as the parameter names are
concerned.
package_name
Any name, up to a maximum of 39 characters, that:
module_name
The module name. Do not change it. Used in the form of a relative path (for example, sg/failover) as
a parameter to cmmakepkg specify modules to be used in configuring the package. (The files reside in
the $SGCONF/modules directory; see Understanding the Location of Serviceguard Files on page 169
for the location of $SGCONF on your version of Linux.)
New for modular packages.
module_version
The module version. Do not change it.
New for modular packages.
package_type
The type can be failover, multi_node, or system multi_node. You can configure only failover or
multi-node packages; see Types of Package: Failover, Multi-Node, System Multi-Node.
Packages of one type cannot include the base module for another; for example, if package_type is
failover, the package cannot include the multi_node, or system_multi_node module.
package_name 227
package_description
The application that the package runs. This is a descriptive parameter that can be set to any value you
choose, up to a maximum of 80 characters. Default value is Serviceguard Package.
node_name
The node on which this package can run, or a list of nodes in order of priority, or an asterisk (*) to indicate
all nodes. The default is *. For system multi-node packages, you must specify node_name *.
If you use a list, specify each node on a new line, preceded by the literal node_name, for example:
node_name <node1>
node_name <node2>
node_name <node3>
The order in which you specify the node names is important. First list the primary node name (the node
where you normally want the package to start), then the first adoptive node name (the best candidate for
failover), then the second adoptive node name, followed by additional node names in order of preference.
In case of a failover, control of the package will be transferred to the next adoptive node name listed in
the package configuration file, or (if that node is not available or cannot run the package at that time) to
the next node in the list, and so on.
If a package is configured with a site_preferred or site_preferred_manual failover policy and if
you want to modify the default NODE_NAME, ensure that the NODE_NAME entries are grouped by sites.
For example, in the following configuration, a package with site_preferred policy can have
NODE_NAME entries in the order node2 , node1 , node 4, node3 but not node2, node3, node1 and
node4.
SITE_NAME A
NODE STATUS STATE
node1 up running
node2 up running
SITE_NAME B
NODE STATUS STATE
node3 up running
node4 up running
IMPORTANT: See Cluster Configuration Parameters for important information about node
names.
See About Cross-Subnet Failover for considerations when configuring cross-subnet packages,
which are further explained under Cross-Subnet Configurations.
auto_run
Can be set to yes or no. The default is yes.
For failover packages, yes allows Serviceguard to start the package (on the first available node listed
under node_name) on cluster start-up, and to automatically restart it on an adoptive node if it fails. no
prevents Serviceguard from automatically starting the package, and from restarting it on another node.
This is also referred to as package switching, and can be enabled or disabled while the package is
running, by means of the cmmodpkg command.
auto_run should be set to yes if the package depends on another package, or is depended on; see
About Package Dependencies.
228 package_description
For system multi-node packages, auto_run must be set to yes. In the case of a multi-node package,
setting auto_run to yes allows an instance to start on a new node joining the cluster; no means it will not.
node_fail_fast_enabled
Can be set to yes or no. The default is no.
yes means the node on which the package is running will be halted (reboot) if the package fails; no
means Serviceguard will not halt the system.
If this parameter is set to yes and one of the following events occurs, Serviceguard will halt the system
(reboot) on the node where the control script fails:
NOTE: If the package halt function fails with “exit 1”, Serviceguard does not halt the node, but sets
no_restart for the package, which disables package switching, setting auto_run to no and thereby
preventing the package from starting on any adoptive node.
Setting node_fail_fast_enabled to yes prevents Serviceguard from repeatedly trying (and failing) to start
the package on the same node.
Setting node_fail_fast_enabled to yes ensures that the package can fail over to another node even if the
package cannot halt successfully. Be careful when using node_fail_fast_enabled, as it will cause all
packages on the node to halt abruptly. For more information, see Responses to Failures and
Responses to Package and Service Failures .
For system multi-node packages, node_fail_fast_enabled must be set to yes.
run_script_timeout
The amount of time, in seconds, allowed for the package to start; or no_timeout. The default is
no_timeout. The maximum is 4294.
If the package does not complete its startup in the time specified by run_script_timeout, Serviceguard will
terminate it and prevent it from switching to another node. In this case, if node_fail_fast_enabled is set
to yes, the node will be halted (rebooted).
If no timeout is specified (no_timeout), Serviceguard will wait indefinitely for the package to start.
If a timeout occurs:
NOTE: If no_timeout is specified, and the script hangs, or takes a very long time to complete, during
the validation step (cmcheckconf (1m)), cmcheckconf will wait 20 minutes to allow the validation to
complete before giving up.
node_fail_fast_enabled 229
halt_script_timeout
The amount of time, in seconds, allowed for the package to halt; or no_timeout. The default is
no_timeout. The maximum is 4294.
If the package’s halt process does not complete in the time specified by halt_script_timeout, Serviceguard
will terminate the package and prevent it from switching to another node. In this case, if
node_fail_fast_enabled is set to yes, the node will be halted (reboot).
If a halt_script_timeout is specified, it should be greater than the sum of all the values set for
service_halt_timeout for this package.
If a timeout occurs:
If a halt-script timeout occurs, you may need to perform manual cleanup. See Troubleshooting Your
Cluster.
successor_halt_timeout
Specifies how long, in seconds, Serviceguard will wait for packages that depend on this package to halt,
before halting this package. Can be 0 through 4294, or no_timeout. The default is no_timeout.
• no_timeout means that Serviceguard will wait indefinitely for the dependent packages to halt.
• 0 means Serviceguard will not wait for the dependent packages to halt before halting this package.
script_log_file
The full pathname of the package’s log file. The default is$SGRUN/log/<package_name>.log . (See
Understanding the Location of Serviceguard Files on page 169 for more information about
Serviceguard pathnames.) See also log_level.
operation_sequence
Defines the order in which the scripts defined by the package’s component modules will start up. See the
package configuration file for details.
This parameter is not configurable; do not change the entries in the configuration file.
New for modular packages.
log_level
Determines the amount of information printed to stdout when the package is validated, and to the
script_log_file when the package is started and halted. Valid values are 0 through 5, but you should
normally use only the first two (0 or 1); the remainder (2 through 5) are intended for use by HHewlett
Packard Enterprise Support.
• 0 - informative messages
230 halt_script_timeout
• 4 - detailed debugging information
failover_policy
Specifies how Serviceguard decides where to start the package, or restart it if it fails. Can be set to
configured_node, min_package_node, site_preferred, or site_preferred_manual. The
default is configured_node.
• configured_nodemeans Serviceguard will attempt to start the package on the first available node in
the list you provide under node_name .
• min_package_node means Serviceguard will start the package on whichever node in the
node_name list has the fewest packages running at the time.
• site_preferred means Serviceguard will try all the eligible nodes on the local SITE before failing
the package over to a node on another SITE. This policy can be configured only in a Metrocluster with
site aware failover configuration; see the documents listed under Cross-Subnet Configurations for
more information.
• site_preferred_manual means Serviceguard will try to fail the package over to a node on the
local SITE. If there are no eligible nodes on the local SITE, the package will halt with global switching
enabled. You can then restart the package locally, when a local node is available, or start it on another
SITE. This policy can be configured only in a Metrocluster with site aware failover configuration; see
the documents listed under Cross-Subnet Configurations for more information.
NOTE:
This parameter can be set for failover packages only. If this package will depend on another package or
vice versa, see also About Package Dependencies.
failback_policy
Specifies whether or not Serviceguard will automatically move a package that is not running on its
primary node (the first node on its node_name list) when the primary node is once again available. Can
be set to automatic or manual. The default is manual.
• manual means the package will continue to run on the current node.
• automatic means Serviceguard will move the package to the primary node as soon as that node
becomes available, unless doing so would also force a package with a higher priority to move.
CAUTION: When the failback_policy is automatic and you set the NODE_NAME to '*', if you add,
delete, or rename a node in the cluster, the primary node for the package might change resulting in
the automatic failover of that package.
failover_policy 231
NOTE: When the failover_policy is site_preferred or site_preferred_manual, failback_policy
cannot be set to automatic.
This parameter can be set for failover packages only. If this package will depend on another package or
vice versa, see also About Package Dependencies.
priority
Assigns a priority to a failover package whose failback_policy is configured_node. Valid values are 1
through 3000, or no_priority. The default is no_priority. See also the dependency_ parameter
descriptions dependency_name.
priority can be used to satisfy dependencies when a package starts, or needs to fail over or fail back: a
package with a higher priority than the packages it depends on can force those packages to start or
restart on the node it chooses, so that its dependencies are met.
If you assign a priority, it must be unique in this cluster. A lower number indicates a higher priority, and a
numerical priority is higher than no_priority. Hewlett Packard Enterprise recommends assigning
values in increments of 20 so as to leave gaps in the sequence; otherwise you may have to shuffle all the
existing priorities when assigning priority to a new package.
IMPORTANT: Because priority is a matter of ranking, a lower number indicates a higher priority (20
is a higher priority than 40). A numerical priority is higher than no_priority.
dependency_name
A unique identifier for a particular dependency (see dependency_condition) that must be met in order
for this package to run (or keep running). It must be unique among this package's dependency_names.
The length and formal restrictions for the name are the same as for package_name.
Configure this parameter, along with dependency_condition and dependency_location, and optionally
priority priority, if this package depends on another package; for example, if this package depends on a
package named pkg2:
dependency_name pkg2dep
dependency_condition pkg2 = UP
dependency_location same_node
For more information about package dependencies, see About Package Dependencies.
dependency_condition
The condition that must be met for this dependency to be satisfied. As of Serviceguard A.11.18, the only
condition that can be set is that another package must be running.
The syntax is: <package_name> = UP, where <package_name> is the name of the package depended
on. The type and characteristics of the current package (the one we are configuring) impose the following
restrictions on the type of package it can depend on:
232 priority
• If the current package is a multi-node package, < package_name > must identify a multi-node or
system multi-node package.
• If the current package is a failover package and its failover_policy is min_package_node, <
package_name > must identify a multi-node or system multi-node package.
• If the current package is a failover package and configured_node is its failover_policy, <
package_name > must identify a multi-node or system multi-node package, or a failover package
whose failover_policy is configured_node.
dependency_location
Specifies where the dependency_condition must be met. The only legal value is same_node.
weight_name, weight_value
These parameters specify a weight for a package; this weight is compared to a node's available capacity
(defined by the CAPACITY_NAME and CAPACITY_VALUE parameters in the cluster configuration file) to
determine whether the package can run there.
Both parameters are optional, but if weight_value is specified, weight_name must also be specified, and
must come first. You can define up to four weights, corresponding to four different capacities, per cluster.
To specify more than one weight for this package, repeat weight_name and weight_value.
NOTE: But if weight_name is package_limit, you can use only that one weight and capacity
throughout the cluster. package_limit is a reserved value, which, if used, must be entered exactly in
that form. It provides the simplest way of managing weights and capacities; see Simple Method for more
information.
The rules for forming weight_name are the same as those for forming package_name. weight_name
must exactly match the corresponding CAPACITY_NAME.
weight_value is an unsigned floating-point value between 0 and 1000000 with at most three digits after
the decimal point.
You can use these parameters to override the cluster-wide default package weight that corresponds to a
given node capacity. You can define that cluster-wide default package weight by means of the
WEIGHT_NAME and WEIGHT_DEFAULT parameters in the cluster configuration file (explicit default). If
you do not define an explicit default (that is, if you define a CAPACITY_NAME in the cluster configuration
file with no corresponding WEIGHT_NAME and WEIGHT_DEFAULT), the default weight is assumed to
be zero (implicit default). Configuring weight_name and weight_value here in the package configuration
file overrides the cluster-wide default (implicit or explicit), and assigns a particular weight to this package.
For more information, see About Package Weights. See also the discussion of the relevant parameters
under Cluster Configuration Parameters, in the cmmakepkg (1m) and cmquerycl (1m) manpages,
and in the cluster configuration and package configuration template files.
monitored_subnet
The LAN subnet that is to be monitored for this package. You can specify multiple subnets; use a
separate line for each.
If you specify a subnet as a monitored_subnet the package will not run on any node not reachable via
that subnet. This normally means that if the subnet is not up, the package will not run. (For cross-subnet
configurations, in which a subnet may be configured on some nodes and not on others, see
monitored_subnet_access below, ip_subnet_node , and About Cross-Subnet Failover.)
dependency_location 233
Typically you would monitor the ip_subnet, specifying it here as well as in the ip_subnet parameter, but
you may want to monitor other subnets as well; you can specify any subnet that is configured into the
cluster (via the STATIONARY_IP parameter in the cluster configuration file). See Stationary and
Relocatable IP Addresses and Monitored Subnets for more information.
If any monitored_subnet fails, Serviceguard will switch the package to any other node specified by
node_name node_name which can communicate on all the monitored_subnets defined for this package.
See the comments in the configuration file for more information and examples.
monitored_subnet_access
In cross-subnet configurations, specifies whether each monitored_subnet is accessible on all nodes in
the package’s node_name list node_name, or only some. Valid values are PARTIAL, meaning that at
least one of the nodes has access to the subnet, but not all; and FULL, meaning that all nodes have
access to the subnet. The default is FULL, and it is in effect if monitored_subnet_access is not specified.
See also ip_subnet_node and About Cross-Subnet Failover.
New for modular packages.
ip_subnet
Specifies an IP subnet used by the package.
CAUTION: Hewlett Packard Enterprise recommends that this subnet be configured into the cluster.
You do this in the cluster configuration file by specifying a HEARTBEAT_IP or STATIONARY_IP
under a NETWORK_INTERFACE on the same subnet, for each node in this package's
NODE_NAME list. For example, an entry such as the following in the cluster configuration file
configures subnet 192.10.25.0 (lan1) on node ftsys9:
NODE_NAME ftsys9
NETWORK_INTERFACE lan1
HEARTBEAT_IP 192.10.25.18
SeeCluster Configuration Parameters for more information.
If the subnet is not configured into the cluster, Serviceguard cannot manage or monitor it, and in fact
cannot guarantee that it is available on all nodes in the package's node-name list node_name.
Such a subnet is referred to as an external subnet, and relocatable addresses on that subnet are
known as external addresses. If you use an external subnet, you risk the following consequences:
• If the subnet fails, the package will not fail over to an alternate node.
• Even if the subnet remains intact, if the package needs to fail over because of some other type
of failure, it could fail to start on an adoptive node because the subnet is not available on that
node.
For each subnet used, specify the subnet address on one line and, on the following lines, the relocatable
IP addresses that the package uses on that subnet. These will be configured when the package starts
and unconfigured when it halts.
For example, if this package uses subnet 192.10.25.0 and the relocatable IP addresses 192.10.25.12 and
192.10.25.13, enter:
ip_subnet 192.10.25.0
ip_address 192.10.25.12
ip_address 192.10.25.13
If you want the subnet to be monitored, specify it in the monitored_subnet parameter monitored_subnet
as well.
234 monitored_subnet_access
In a cross-subnet configuration, you also need to specify which nodes the subnet is configured on; see
ip_subnet_node below. See also monitored_subnet_access and About Cross-Subnet Failover.
This parameter can be set for failover packages only.
ip_subnet_node
In a cross-subnet configuration, specifies which nodes an ip_subnet is configured on. If no
ip_subnet_nodes are listed under an ip_subnet, it is assumed to be configured on all nodes in this
package’s node_name list node_name.
Can be added or deleted while the package is running, with these restrictions:
• The package must not be running on the node that is being added or deleted.
• The node must not be the first to be added to, or the last deleted from, the list of ip_subnet_nodes for
this ip_subnet.
ip_address
A relocatable IP address on a specified ip_subnet.
For more information about relocatable IP addresses, see Stationary and Relocatable IP Addresses
and Monitored Subnets.
This parameter can be set for failover packages only.
service_name
A service is a program or function which Serviceguard monitors as long the package is up. service_name
identifies this function and is used by the cmrunserv and cmhaltserv commands. You can configure a
maximum of 30 services per package and 900 services per cluster.
The length and formal restrictions for the name are the same as for package_name. service_name must
be unique among all packages in the cluster.
IMPORTANT: Restrictions on service names in previous Serviceguard releases were less stringent.
Packages that specify services whose names do not conform to the above rules will continue to run,
but if you reconfigure them, you will need to change the name; cmcheckconf and cmapplyconf
will enforce the new rules.
ip_subnet_node 235
service_cmd
The command that runs the program or function for this service_name, for example,
/usr/bin/X11/xclock -display 15.244.58.208:0
Only Serviceguard environment variables defined in the /etc/cmcluster.conf file or an absolute
pathname can be used with Service command; neither the PATH variable nor any other environment
variable is passed to the command. The default shell is /bin/sh. For example,
service_cmd $SGCONF/pkg1/script.sh
service_cmd /etc/cmcluster/pkg1/script.sh
service_cmd /usr/local/cmcluster/conf/pkg1/script.sh
service_cmd /opt/cmcluster/conf/pkg1/script.sh
service_cmd $SGSBIN/cmresserviced /dev/sdd1
NOTE: Be careful when defining service run commands. Each run command is executed in the following
way:
• Serviceguard monitors the process ID (PID) of the process the run command creates.
• When the command exits, Serviceguard determines that a failure has occurred and takes appropriate
action, which may include transferring the package to an adoptive node.
• If a run command is a shell script that runs some other command and then exits, Serviceguard will
consider this normal exit as a failure.
Make sure that each run command is the name of an actual service and that its process remains alive
until the actual service stops. One way to manage this is to configure a package such that the service is
actually a monitoring program that checks the health of the application that constitutes the main function
of the package, and exits if it finds the application has failed. The application itself can be started by an
external_script.
service_restart
The number of times Serviceguard will attempt to re-run the service_cmd. Valid values are unlimited,
none or any positive integer value. Default is none.
If the value is unlimited, the service will be restarted an infinite number of times. If the value is none,
the service will not be restarted.
service_fail_fast_enabled
Specifies whether or not Serviceguard will halt the node (reboot) on which the package is running if the
service identified by service_name fails. Valid values are yes and no. Default is no, meaning that failure
of this service will not cause the node to halt.
service_halt_on_maintenance
If service_halt_on_maintenance parameter is set to yes and the package is put into maintenance mode,
Serviceguard halts the service. Then, Serviceguard automatically restarts the failed services when the
package is taken out of maintenance mode.
236 service_cmd
service_halt_timeout
The length of time, in seconds, Serviceguard will wait for the service to halt before forcing termination of
the service’s process. The maximum value is 4294.
The value should be large enough to allow any cleanup required by the service to complete.
If no value is specified, a zero timeout will be assumed, meaning that Serviceguard will not wait for any
time before terminating the process.
generic_resource_name
Defines the logical name used to identify a generic resource in a package. This name corresponds to the
generic resource name used by the cmgetresource(1m) and cmsetresource(1m) commands.
Multiple generic_resource_name entries can be specified in a package.
The length and formal restrictions for the name are the same as for package_name.
Each name must be unique within a package, but a single resource can be specified across multiple
packages.
You can configure a maximum of 100 generic resources per cluster.
Each generic resource is defined by three parameters:
• generic_resource_name
• generic_resource_evaluation_type
• generic_resource_up_criteria
generic_resource_evaluation_type
Defines when the status of a generic resource is evaluated.
Valid values are during_package_start and before_package_start. The default is
during_package_start.
The resources that will be available during the course of start of the package must be configured with an
evaluation_type as during_package_start.
Monitoring for these generic resources can be started and stopped as a part of the package, and the
monitoring script can be configured as a service. This can be achieved by configuring a service_name
and a service_cmd containing the full path name of the monitoring executable/script. The monitoring of
the generic resource starts only when the monitoring scripts are started and not at the start of the
package.
For information on monitoring scripts, see Monitoring Script for Generic Resources.
If there is a common generic resource that needs to be monitored as a part of multiple packages, then the
monitoring of the generic resources can be started and stopped as a part of the cluster. The monitoring
script can be configured as a generic resource command. This can be achieved by configuring a
cluster_generic_resource and a generic_resource_cmd containing the full path name of the
service_halt_timeout 237
monitoring script. The monitoring of the generic resource starts only when the monitoring scripts are
started as part of cluster start up.
For information on how to configure cluster generic resource, see Configuring Cluster Generic
Resources and for monitoring scripts, see Monitoring Script for Cluster Generic Resources.
generic_resource_up_criteria
Defines a criterion to determine whether the status of a generic resource identified by
generic_resource_name is up.
Attribute requires a logical operator and a value. The operators ==, !=, >, <, >=, and <= are allowed.
Values must be positive integer values ranging from 1 to 2147483647.
NOTE: Operators other than the ones mentioned above are not supported. This attribute does not accept
more than one up criterion. For example, >> 10, << 100 are not valid.
Though values ranging from 1 to 2147483647 can be entered with the above mentioned operators, the
below four conditions are not allowed to be set:
< 1, > 2147483647, >= 1 and <= 2147483647
This is because:
• If you specify generic_resource_up_criteria < 1 or > 2147483647, for the status of a resource to be 'up'
you cannot enter values to satisfy the up_criteria condition. Hence, the resource can never be 'up'.
• Similarly, if you specify generic_resource_up_criteria >= 1 or <= 2147483647, the status will always be
'up' as the criteria is always met. You cannot enter values to dissatisfy the up_criteria to bring the
resource status to 'down'.
vmdk_file_name
Specifies the VMDK file name that represents the VMFS disk to be configured in the package. The
vmdk_file_name must be specified in such a way that the vmdk_file_name is preceded by the name of
the directory in which VMDK file resides.
For example,
<directory_name_where_vmdk_file_resides>/<vmdk_file_name>
Legal values for vmdk_file_name:
238 generic_resource_up_criteria
• Must not contain space, tab, or any other special characters
• Maximum length is 80 characters
NOTE:
• Ensure that it is already created on the Esxi host in which the VMware cluster nodes are mapped.
• If you change vmdk_file_name parameter in the host that is already configured as part of the package,
it might result in unexpected problem.
datastore_name
Specifies the name of the VMware datastore where the VMDK file resides. You must always configure
datastore_name on shared disk.
Legal values for datastore_name:
NOTE:
• Ensure that it is already created on the Esxi host in which the VMware cluster nodes are available.
• If you change datastore_name parameter in the host that is already configured as part of the package,
it might result in unexpected problem.
scsi_controller
Specifies the SCSI controller device information that describes the SCSI bus number and the slot on
which the VMDK file will be connected. For example, ifxyz.vmdk file uses the SCSI controller 1 and slot 1,
then scsi_controller value will be 1:1.
Legal values for scsi_controller:
A numeric value pair of the form X:Y, where X is SCSI controller (0-3) and Y is the slot number (0-6, 8-15)
as used in the VMDK configuration on host.
NOTE:
Ensure that it is already created on the VMware cluster nodes on which the package will be configured.
The scsi_controller parameter that are added as part of package configuration file must be available on all
VMware cluster nodes.
disk_type
Specifies the type of virtual disk to be added to the package. Legal values for disk_type can be RDM or
VMFS.
datastore_name 239
NOTE:
The value of disk_type can be selected while creating the VMDK file. The VMDK can be of type Virtual
disk or RDM. If the disk_type is Virtual disk, then specify as VMFS in the package configuration. If the
disk_type is RDM disk, then specify as RDM in the package configuration.
vgchange_cmd
Specifies the method of activation for each Logical Volume Manager (LVM) volume group identified by a
vg entry.
The default is vgchange -a y.
vxvol_cmd
Specifies the method of recovery for mirrored VxVM volumes.
If recovery is found to be necessary during package startup, by default the script will pause until the
recovery is complete. To change this behavior, comment out the line
vxvol_cmd "vxvol -g \${DiskGroup} startall"
in the configuration file and uncomment the line
vxvol_cmd "vxvol -g \${DiskGroup} -o bg startall"
This allows package startup to continue while mirror re-synchronization is in progress.
vg
Specifies an LVM volume group (one per vg, each on a new line) on which a file system (see fs_type)
needs to be mounted. A corresponding vgchange_cmd (see above) specifies how the volume group is to
be activated. The package script generates the necessary filesystem commands on the basis of the fs_
parameters (see File system parameters ).
vxvm_dg
Specifies a VxVM disk group (one per vxvm_dg, each on a new line) on which a file system needs to be
mounted. See the comments in the package configuration file and Creating a Storage Infrastructure
with VxVM on page 190, for more information.
vxvm_dg_retry
Specifies whether to retry the import of a VxVM disk group, using vxdisk scandisks to check for any
missing disks that might have caused the import to fail.
Legal values are yes and no. yes means vxdisk scandisks will be run in the event of an import
failure. The default is no.
IMPORTANT:
vxdisk scandisks can take a long time in the case of a large IO subsystem.
deactivation_retry_count
Specifies the number of times the package shutdown script will repeat an attempt to deactivate a disk
group (VxVM) and the minimum number of times for volume group (LVM) before failing. Legal value is
zero or any greater number. The default is 2.
240 vgchange_cmd
kill_processes_accessing_raw_devices
Specifies whether or not to kill processes that are using raw devices (for example, database applications)
when the package shuts down. Default is no. See the comments in the package configuration file for
more information.
concurrent_fsck_operations
The number of concurrent fsck operations allowed on file systems being mounted during package
startup.
Legal value is any number greater than zero. The default is 1.
If the package needs to run fsck on a large number of file systems, you can improve performance by
carefully tuning this parameter during testing (increase it a little at time and monitor performance each
time).
fs_mount_retry_count
The number of mount retries for each file system. Legal value is zero or any greater number. The default
is zero.
If the mount point is busy at package startup and fs_mount_retry_count is set to zero, package startup
will fail.
If the mount point is busy and fs_mount_retry_count is greater than zero, the startup script will attempt to
kill the user process responsible for the busy mount point (fuser -ku) and then try to mount the file
system again. It will do this the number of times specified by fs_mount_retry_count.
If the mount still fails after the number of attempts specified by fs_mount_retry_count, package startup will
fail.
fs_umount_retry_count
The number of umount retries for each file system.
kill_processes_accessing_raw_devices 241
Legal value is 1 or any greater number. The default is 1. Operates in the same way as
fs_mount_retry_count.
fs_name
This parameter, in conjunction with fs_directory, fs_type, fs_mount_opt, fs_umount_opt, and fs_fsck_opt,
specifies a filesystem that is to be mounted by the package.
fs_name must specify the block devicefile for a logical volume.
For an NFS-imported file system, the additional parameters required are fs_server, fs_directory, fs_type,
and fs_mount_opt; see fs_server for an example.
CAUTION: Before configuring an NFS-imported file system into a package, make sure you have
read and understood the rules and guidelines under Planning for NFS-mounted File Systems,
and configured the cluster parameter CONFIGURED_IO_TIMEOUT_EXTENSION, described under
Cluster Configuration Parameters on page 111.
File systems are mounted in the order you specify in the package configuration file, and unmounted in the
reverse order.
See File system parameters and the comments in the FILESYSTEMS section of the configuration file for
more information and examples. See also Volume Manager Planning , and the mount manpage.
NOTE: For filesystem types (see fs_type), a volume group must be defined in this file (using vg; see vg)
for each logical volume specified by an fs_name entry.
fs_server
The name or IP address (IPv4 or IPv6) of the NFS server for an NFS-imported file system. In this case,
you must also set fs_type to nfs, fs_mount_opt to -o llock on HPUX , and -o local_lock = all on Linux.
fs_name specifies the directory to be imported from fs_server, and fs_directory specifies the local mount
point.
For example:
fs_name /var/opt/nfs/share1
fs_server wagon
fs_directory /nfs/mnt/share1
fs_type nfs
#fs_mount_opt —o local_lock =all
#fs_umount_opt
#fs_fsck_opt
NOTE:
fs_umount_opt is optional and fs_fsck_opt is not used for an NFS-imported file system. (Both are left
commented out in this example.)
fs_directory
The root of the file system specified by fs_name.
See the mount manpage and the comments in the configuration file for more information.
fs_type
The type of the file system specified by fs_name.
For an NFS-imported file system, this must be set to nfs. See the example under fs_server.
242 fs_name
File System Types, Commands, and Platforms lists the supported file system types, commands, and
platforms.
WARNING: ext4 file system has a delayed allocation mechanism. Hence, the behavior of writing
files to disk is different from ext3. Unlike ext3, the ext4 file system does not write data to disk on
committing the transaction, so it takes longer for the data to be written to the disk. Your program
must use data integrity calls such as fsync() to ensure that data is written to the disk.
See the comments in the package configuration file template for more information.
fs_mount_opt
The mount options for the file system specified by fs_name. See the comments in the configuration file
for more information.
fs_umount_opt
The umount options for the file system specified by fs_name. See the comments in the configuration file
for more information.
fs_fsck_opt
The fsck options for the file system specified by fs_name (see fs_type).
NOTE: When using XFS file system you must use the xfs_repair command options instead of fsck
command options for this parameter.
fs_mount_opt 243
For more information, see the fsck and xfs_repair manpage, and the comments in the configuration
file.
pv
Physical volume on which persistent reservations (PR) will be made if the device supports it.
IMPORTANT:
This parameter is for use only by Hewlett Packard Enterprise partners, who should follow the
instructions in the package configuration file.
For information about Serviceguard's implementation of PR, see About Persistent Reservations.
pev_
Specifies a package environment variable that can be passed to external_pre_script, external_script, or
both, by means of the cmgetpkgenv command.
The variable name must be in the form pev_<variable_name> and contain only alphanumeric
characters and underscores. The letters pev (upper-case or lower-case) followed by the underscore (_)
are required.
The variable name and value can each consist of a maximum of MAXPATHLEN characters (4096 on
Linux systems).
You can define more than one variable. See About External Scripts, as well as the comments in the
configuration file, for more information.
external_pre_script
The full pathname of an external script to be executed before volume groups and disk groups are
activated during package startup, and after they have been deactivated during package shutdown; that is,
effectively the first step in package startup and last step in package shutdown. New for modular
packages. For restrictions, see service_cmd.
If more than one external_pre_script is specified, the scripts will be executed on package startup in the
order they are entered into the package configuration file, and in the reverse order during package
shutdown.
See About External Scripts, as well as the comments in the configuration file, for more information and
examples.
external_script
The full pathname of an external script. For restrictions, see service_cmd. This script is often the means
of launching and halting the application that constitutes the main function of the package. New for
modular packages.
The script is executed on package startup after volume groups and file systems are activated and IP
addresses are assigned, but before services are started; and during package shutdown after services are
halted but before IP addresses are removed and volume groups and file systems deactivated.
If more than one external_script is specified, the scripts will be executed on package startup in the order
they are entered into this file, and in the reverse order during package shutdown.
See About External Scripts, as well as the comments in the configuration file, for more information and
examples. See also service_cmd.
244 pv
user_host
The system from which a user specified by user_name user_name can execute package-administration
commands.
Legal values are any_serviceguard_node, or cluster_member_node, or a specific cluster node. If
you specify a specific node it must be the official hostname (the hostname portion, and only the
hostname portion, of the fully qualified domain name). As with user_name, be careful to spell the
keywords exactly as given.
user_name
Specifies the name of a user who has permission to administer this package. See also user_host
user_host and user_role; these three parameters together define the access control policy for this
package (see Controlling Access to the Cluster). These parameters must be defined in this order:
user_name, user_host, user_role.
Legal values for user_name are any_user or a maximum of eight login names from /etc/passwd on
user_host.
NOTE: Be careful to spell any_user exactly as given; otherwise Serviceguard will interpret it as a user
name.
Note that the only user_role that can be granted in the package configuration file is package_admin for
this particular package; you grant other roles in the cluster configuration file. See Setting up Access-
Control Policies for further discussion and examples.
user_role
Must be package_admin, allowing the user access to the cmrunpkg, cmhaltpkg, and cmmodpkg
commands (and the equivalent functions in Serviceguard Manager) and to the monitor role for the
cluster. See Controlling Access to the Cluster for more information.
cmmakepkg Examples
The cmmakepkg command generates a package configuration file. Some examples follow; see the
cmmakepkg (1m) manpage for complete information. All the examples create an editable configuration
file pkg1.conf in the $SGCONF/pkg1 directory.
user_host 245
NOTE: If you do not include a base module (or default or all) on the cmmakepkg command line,
cmmakepkg will ignore the modules you specify and generate a default configuration file containing all the
parameters.
For a complex package, or if you are not yet sure which parameters you will need to set, the default may
be the best choice; see the first example below.
You can use the-v option with cmmakepkg to control how much information is displayed online or
included in the configuration file. Valid values are 0, 1 and 2. -v 0 removes all comments; -v 1 includes a
brief heading for each parameter; -v 2 provides a full description of each parameter. The default is level
2.
• To generate a configuration file for a failover package that uses relocatable IP addresses and runs an
application that requires file systems to be mounted at run time (enter the command all on one line):
cmmakepkg -m sg/failover -m sg/package_ip -m sg/service -m
sg/filesystem -m sg/volume_group $SGCONF/pkg1/pkg1.conf
• To generate a configuration file adding the generic resources module to an existing package
(enter the command all on one line):
cmmakepkg -i$SGCONF/pkg1/pkg1.conf -m sg/generic_resource
• To generate a configuration file for a failover package that runs an application that requires another
package to be up (enter the command all on one line):
cmmakepkg -m sg/failover -m sg/dependency -m sg/service
$SGCONF/pkg1/pkg1.conf
• To generate a configuration file adding the services module to an existing package (enter the
command all on one line):
cmmakepkg -i $SGCONF/pkg1/pkg1.conf -m sg/service
$SGCONF/pkg1/pkg1_v2.conf
• To generate a configuration file adding the Persistent Reservation module to an existing package:
cmmakepkg -i $SGCONF/pkg1/pkg1.conf -m sg/pr_cntl
Next Step
The next step is to edit the configuration file you have generated; see Editing the Configuration File.
NOTE: cmcheckconf and cmapplyconf check for missing mount points, volume groups, etc.
Use the following bullet points as a checklist, referring to the Package Parameter Explanations, and the
comments in the configuration file itself, for detailed specifications for each parameter.
NOTE: Optional parameters are commented out in the configuration file (with a # at the beginning of the
line). In some cases these parameters have default values that will take effect unless you uncomment the
parameter (remove the #) and enter a valid value different from the default. Read the surrounding
comments in the file, and the explanations in this chapter, to make sure you understand the implications
both of accepting and of changing a given default.
In all cases, be careful to uncomment each parameter you intend to use and assign it the value you want
it to have.
• package_name. Enter a unique name for this package. Note that there are stricter formal requirements
for the name as of A.11.18.
• package_type. Enter failover or multi_node. ( system_multi_node is reserved for
special-purpose packages supplied by HP.) Note that there are restrictions if another
package depends on this package; see About Package Dependencies . See Types of Package:
Failover, Multi-Node, System Multi-Node for more information.
• node_name. Enter the name of each cluster node on which this package can run, with a separate
entry on a separate line for each node.
• auto_run. For failover packages, enter yes to allow Serviceguard to start the package on the first
available node specified by node_name, and to automatically restart it later if it fails. Enter no to keep
Serviceguard from automatically starting the package.
• node_fail_fast_enabled. Enter yes to cause the node to be halted (system halt) if the package fails;
otherwise enter no.
• run_script_timeout and halt_script_timeout. Enter the number of seconds Serviceguard should wait for
package startup or shutdown, respectively, to complete; or leave the default, no_timeout. See
run_script_timeout.
• successor_halt_timeout. Used if other packages depend on this package; see About Package
Dependencies.
• If this package will depend on another package or packages, enter values for dependency_name ,
dependency_condition, dependency_location, and optionally priority.
See About Package Dependencies for more information.
NOTE: The package(s) this package depends on must already be part of the cluster configuration by
the time you validate this package (via cmcheckconf; see Verifying and Applying the Package
Configuration); otherwise validation will fail.
• To configure package weights, use the weight_name and weight_value parameters weight_name,
weight_value . See About Package Weights for more information.
• Use monitored_subnet to specify a subnet to be monitored for this package. If there are multiple
subnets, repeat the parameter as many times as needed, on a new line each time.
In a cross-subnet configuration, configure the additional monitored_subnet_accessparameter for each
monitored_subnet as necessary; see About Cross-Subnet Failover for more information.
• If your package will use relocatable IP addresses, enter the ip_subnet and ip_address addresses. See
the parameter descriptions About Cross-Subnet Failover for rules and restrictions.
In a cross-subnet configuration, configure the additional ip_subnet_node parameter for each ip_subnet
as necessary; see About Cross-Subnet Failover for more information.
Include a service entry for disk monitoring if the package depends on monitored disks. Use entries
similar to the following:
service_name=“cmresserviced_Pkg1”
service_cmd=”$SGSBIN/cmresserviced /dev/sdd1”
service_restart=””
See Creating a Disk Monitor Configuration for more information.
• To monitor a crucial resource as part of a package using generic resources, enter values for the
following parameters:
• If the package needs to activate LVM volume groups, configure vgchange_cmd, or leave the default.
• If the package needs to mount LVM volumes to file systems (see fs_type ), use the vg parameters to
specify the names of the volume groups to be activated, and select the appropriate vgchange_cmd .
Use the fs_ parameters fs_name to specify the characteristics of file systems and how and where to
mount them. See the comments in the FILESYSTEMS section of the configuration file for more
information and examples.
Enter each volume group on a separate line, for example:
vg vg01
vg vg02
• If your package mounts large number of file systems, consider increasing the values of the following
parameters:
• If the package will run an external script, use the external_script parameter (see external_script) to
specify the full pathname of the script, for example, $SGCONF/pkg1/script1.
See About External Scripts , and the comments in the configuration file, for more information.
• Configure the Access Control Policy for up to eight specific users or any_user.
The only user role you can configure in the package configuration file is package_admin for the
package in question. Cluster-wide roles are defined in the cluster configuration file. See Setting up
Access-Control Policies for more information.
• If you are using mirrored VxVM disks, use vxvol_cmd to specify the mirror recovery option to be used
by
• You can specify a deactivation_retry_count for LVM and VxVM volume groups. See
deactivation_retry_count.
2. Generate a new configuration file adding the external_script module to the existing package
pkg1:
cmmakepkg -i pkg1.conf -m sg/external_script pkg1_v2.conf
3. Edit the package configuration file and specify the external_script parameter.
To remove a module from an existing package, use the cmmakepkg command to generate a new
configuration file excluding the module that you want to remove. Then, copy the remaining package
attributes from the old configuration file to the new configuration file and re-apply the package
configuration.
2. Run the filesystem specific fsck command for ext2, ext3, and ext4 filesystems:
fsck_command <fs_name>
Where, fsck_command can be different depending on the filesystem type.
If fsck commands detects that the filesystem is clean, you can add the filesystem to the package
configuration file. Otherwise, do not add the filesystem to the package configuration file. For
information about filesystem specific fsck command, see File System Types, Commands, and
Platforms
For more information, see the manpage for cmcheckconf (1m) and Verifying Cluster Analytics
Daemon.
When cmcheckconf has completed without errors, apply the package configuration, for example:
cmapplyconf -P $SGCONF/pkg1/pkg1.conf
This adds the package configuration information to the binary cluster configuration file in the $SGCONF
directory and distributes it to all the cluster nodes.
NOTE: For modular packages, you now need to distribute any external scripts identified by the
external_pre_script and external_script parameters.
• HPE Serviceguard Toolkit for Oracle version A.05.01.10 on Linux User Guide
• HPE Serviceguard Toolkit for NFS version A.03.03.10 on Linux User Guide
serviceguard-xdc Environment
By default, this parameter is commented and is present in the package configuration file for the
serviceguard-xdc packages.
The email_id parameter must be used to provide email addresses of the serviceguard-xdc alert
notification recipients. Each email_id parameter can have one of the following values:
You can also include multiple recipients by repeating the email_id address.
The serviceguard-xdc package can send an alert email:
Hi,
The mirror half /dev/hpdev/my_disk2 of MD device /dev/md0, which is configured in package xdcpkg, is not
accessible from node node1. Please rectify the issue.
Thanks.
CAUTION: Although Serviceguard uses the -C option within the package control script framework,
this option should not normally be used from the command line. Troubleshooting Your Cluster,
shows some situations where you might need to use -C from the command line.
The following example shows the command with the same options that are used by the control script:
# vxdg -tfC import dg_01
This command takes over ownership of all the disks in disk group dg_01, even though the disk currently
has a different host ID written on it. The command writes the current node’s host ID on all disks in disk
group dg_01 and sets the noautoimport flag for the disks. This flag prevents a disk group from being
automatically re-imported by a node following a reboot. If a node in the cluster fails, the host ID is still
written on each disk in the disk group. However, if the node is part of a Serviceguard cluster then on
reboot the host ID will be cleared by the owning node from all disks which have the noautoimport flag
set, even if the disk group is not under Serviceguard control. This allows all cluster nodes, which have
access to the disk group, to be able to import the disks as part of the cluster operation.
The control script also uses the vxvol startall command to start up the logical volumes in each disk
group that is imported.
CAUTION: Because of a limitation in LVM, service_fail_fast_enabled must be set to yes, forcing the
package to fail over to another node if it loses its storage.
NOTE:
• Hewlett Packard Enterprise recommends that if you are using cmresservied command to monitor a
VMFS disks, configure cmresserviced command to monitor the logical volume path, the volume
group name, or the persistent device names using UDEV as these are persistent.
TIP: Some commands take longer to complete in large configurations. In particular, you can expect
Serviceguard’s CPU usage to increase during cmviewcl -v as the number of packages and
services increases.
Cluster Status
The status of a cluster, as shown by cmviewcl, can be one of the following:
• starting - The cluster is in the process of determining its active membership. At least one cluster
daemon is running.
• unknown - The node on which the cmviewcl command is issued cannot communicate with other
nodes in the cluster.
• Failed. A node never sees itself in this state. Other active members of the cluster will see a node in
this state if the node is no longer active in the cluster, but is not shut down.
• 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.
• start_wait - A cmrunpkg command is in progress for this package. The package is waiting for
packages it depends on (predecessors) to start before it can start.
• starting - The package is starting. The package master control script is running.
• halting - A cmhaltpkg command is in progress for this package and the halt script is running.
• halt_wait - A cmhaltpkg command is in progress for this package. The package is waiting to be
halted, but the halt script cannot start because the package is waiting for packages that depend on it
(successors) to halt. The parameter description for successor_halt_timeout provides more
information.
• failing - The package is halting because it, or a package it depends on, has failed.
• fail_wait - The package is waiting to be halted because the package or a package it depends on
has failed, but must wait for a package that depends on it to halt before it can halt.
A system multi-node package is up when it is running on all the active cluster nodes. A multi-node
package is up if it is running on any of its configured nodes.
A system multi-node package can have a status of changing, meaning the package is in transition on
one or more active nodes.
The state of a package can be one of the following:
• starting - The package is starting. The package master control script is running.
• start_wait - A cmrunpkg command is in progress for this package. The package is waiting for
packages it depends on (predecessors) to start before it can start.
• running - Services are active and being monitored.
• halting - A cmhaltpkg command is in progress for this package and the halt script is running.
• halt_wait - A cmhaltpkg command is in progress for this package. The package is waiting to be
halted, but the halt script cannot start because the package is waiting for packages that depend on it
(successors) to halt. The parameter description for successor_halt_timeout provides more
information.
• halted- The package is down and halted.
• halt_aborted — The package is aborted during its normal halt sequence. For details, see
cmhaltpkg(1m) man page.
• failing - The package is halting because it, or a package it depends on, has failed.
• fail_wait - The package is waiting to be halted because the package or a package it depends on
has failed, but must wait for a package it depends on to halt before it can halt.
• failed - The package is down and failed.
• relocate_wait - The package’s halt script has completed or Serviceguard is still trying to place the
package.
• maintenance — The package is in maintenance mode; see Maintaining a Package: Maintenance
Mode.
• detached - A package is said to be detached from the cluster, when the cluster or node on which it
was running was halted with the -d option. All package components are up and running when a
package is detached. Serviceguard does not monitor the packages when in detached state.
• reconfiguring — The node where this package is running is adjusting the package configuration to
reflect the latest changes that have been applied.
• blocked - The package has never run on this node, either because a dependency has not been met,
or because auto_run is set to no.
• changing - The package is in a transient state, different from the status shown, on some nodes. For
example, a status of starting with a state of changing would mean that the package was starting
on at least one node, but in some other, transitory condition (for example, failing) on at least one
other node.
• AUTO_RUN: Can be enabled or disabled. For failover packages, enabled means that the package
starts when the cluster starts, and Serviceguard can switch the package to another node in the event
of failure.
For system multi-node packages, enabled means an instance of the package can start on a new
node joining the cluster (disabled means it will not).
• Switching Enabled for a Node: For failover packages, enabled means that the package can switch to
the specified node. disabled means that the package cannot switch to the specified node until the
node is enabled to run the package via the cmmodpkg command.
Every failover package is marked enabled or disabled for each node that is either a primary or
adoptive node for the package.
For multi-node packages, node switching disabled means the package cannot start on that node.
Service Status
Services have only status, as follows:
• Down. The service is not running. It may not have started, or have halted or failed.
• Unknown. Resource monitoring has not yet set the status of the resource.
• Up.
• Down.
• configured_node. The package fails over to the next node in the node_name list in the package
configuration file.
• min_package_node. The package fails over to the node in the cluster with the fewest running
packages on it.
Failover packages can also be configured with one of two values for the failback_policy parameter, and
these are also displayed in the output of cmviewcl -v:
• automatic: Following a failover, a package returns to its primary node when the primary node
becomes available again.
• manual: Following a failover, a package will run on the adoptive node until moved back to its original
node by a system administrator.
CLUSTER STATUS
example up
NODE STATUS STATE
ftsys9 up running
Network_Parameters:
INTERFACE STATUS NAME
PRIMARY up eth0
PRIMARY up eth1
Cluster Generic Resources:
NAME SCOPE TYPE STATUS / COMMAND CURRENT- MAX-CONFIGURED
VALUE STATUS RESTARTS RESTARTS
cpu_monitor node Extended 1 up 0 25
PACKAGE STATUS STATE AUTO_RUN NODE
pkg1 up running enabled ftsys9
Policy_Parameters:
POLICY_NAME CONFIGURED_VALUE
Failover configured_node
NOTE: The Script_Parameters section of the PACKAGE output of cmviewcl shows the Subnet
status only for the node that the package is running on. In a cross-subnet configuration, in which the
package may be able to fail over to a node on another subnet, that other subnet is not shown (see Cross-
Subnet Configurations).
CLUSTER STATUS
example up
NODE STATUS STATE
ftsys9 up running
Network_Parameters:
INTERFACE STATUS NAME
PRIMARY up eth0
PRIMARY up eth1
PACKAGE STATUS STATE AUTO_RUN NODE
pkg1 up running enabled ftsys9
Policy_Parameters:
POLICY_NAME CONFIGURED_VALUE
Failover configured_node
Failback manual
Script_Parameters:
ITEM STATUS MAX_RESTARTS RESTARTS NAME
Service up 0 0 service1
Service up 0 0 sfm_disk_monitor
Subnet up 0 0 15.13.168.0
Generic Resource up sfm_disk
Node_Switching_Parameters:
NODE_TYPE STATUS SWITCHING NAME
Primary up enabled ftsys9 (current)
Alternate up enabled ftsys10
NODE STATUS STATE
ftsys10 up running
Network_Parameters:
INTERFACE STATUS NAME
PRIMARY up eth0
PRIMARY up eth1
UNOWNED_PACKAGES
PACKAGE STATUS STATE AUTO_RUN NODE
pkg2 down unowned disabled unowned
Policy_Parameters:
POLICY_NAME CONFIGURED_VALUE
Failover configured_node
Failback manual
Script_Parameters:
ITEM STATUS NODE_NAME NAME
Service down service2
Generic Resource up ftsys9 sfm_disk1
Subnet up 15.13.168.0
Generic Resource up ftsys10 sfm_disk1
Node_Switching_Parameters:
NODE_TYPE STATUS SWITCHING NAME
Primary up enabled ftsys10
Alternate up enabled ftsys9
NOTE: If you halt pkg2 with the cmhaltpkg command, and the package contains non-native
Serviceguard modules that failed during the normal halt process, then the package is moved to the
partially_down status and halt_aborted state. The command exits at this point. For more
information, see Handling Failures During Package Halt.
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
Service up 0
0 sfm_disk_monitor
Subnet up
0 0
15.13.168.0
Generic Resource up sfm_disk
Node_Switching_Parameters:
NODE_TYPE STATUS SWITCHING NAME
Primary up enabled
ftsys9 (current)
Alternate up enabled ftsys10
Script_Parameters:
ITEM STATUS
MAX_RESTARTS RESTARTS NAME
Service up
0 0 service2
Service up 0
0 sfm_disk_monitor
Subnet up
0 0 15.13.168.0
Generic Resource up sfm_disk
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
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
Generic Resource unknown manx sfm_disk
Subnet up burmese 192.8.15.0
Generic Resource unknown burmese sfm_disk
Subnet up tabby 192.8.15.0
Generic Resource unknown tabby sfm_disk
Subnet up persian 192.8.15.0
Generic Resource unknown persian sfm_disk
Node_Switching_Parameters:
NODE_TYPE STATUS SWITCHING NAME
Primary up enabled manx
Alternate up enabled burmese
Alternate up enabled tabby
Alternate up enabled persian
• You can consider setting up a cron (1m) job to run the cmcheckconf command regularly.
• The cmapplyconf command performs the same verification as the cmcheckconf command.
• The extent of logging can be controlled using the verbosity and log levels. Higher the level of verbosity,
higher is the extent of logging. For example, to verify the cluster configuration and package files using
the -v (verbosity) options use:
Volume groups (package) cmcheckconf (1m), cmapplyconf Verifies for the following:
(1m)
• existence
See also Verifying the Cluster
Configuration . • availability across all the
nodes where the package
is configured to run.
• same physical volumes
across all the nodes
where the package is
configured to run.
• same volume group
across all the nodes
where the package is
configured to run.
Volume group activation cmcheckconf (1m), cmapplyconf Verifies whether the volume
protection (cluster) (1m) group activation protection is
enabled in the lvm.conf
file. For more information,
see Enabling Volume
Group Activation
Protection on page 185
LVM physical volumes (package) cmcheckconf (1m), cmapplyconf Verifies for the consistency of
(1m) the volume groups and
physical volumes of the
volume group across all the
nodes where the package is
configured to run.
Table Continued
Quorum Server (cluster) cmcheckconf (1m), cmapplyconf These commands verify that
(1m). the quorum server, if used, is
running and all nodes are
authorized to access it; and,
if more than one IP address
is specified, that the quorum
server is reachable from all
nodes through both the IP
addresses.
If you enable
QS_SMART_QUORUM
parameter, it verifies whether
the cluster is configured with
a generic resource named as
sitecontroller_genres.
Lock LUN (cluster) cmcheckconf (1m), cmapplyconf These commands verify if all
(1m) the cluster nodes are
configured to use the same
device as lock LUN and that
the lock LUN device file is a
block device file.
Table Continued
Mount points (package) cmcheckconf (1m), cmapplyconf These commands verify that
(1m) the mount-point directories
specified in the package
configuration file exist on all
nodes that can run the
package.
Service commands (package) cmcheckconf (1m), cmapplyconf These commands verify that
(1m) files specified by service
commands exist and are
executable. Service
commands whose paths are
nested within an unmounted
shared file system are not
checked.
File systems (package) cmcheckconf (1m), cmapplyconf For LVM only, commands
(1m) verify that file systems are on
the logical volumes identified
by the fs_name parameter.
External scripts and pre-scripts cmcheckconf (1m), cmapplyconf A non-zero return value from
(modular package) (1m) any script results the
commands to fail.
Table Continued
VxVM disk groups (package) cmcheckconf (1m), cmapplyconf Commands check that each
(1m) node has a working physical
connection to the disks.
NOTE: The job must run on one of the nodes in the cluster. The crontab –e command is used to edit
the crontab file. This must be run as the root user, because only the root user can run cluster
verification. The cron (1m) command sets the job’s user and group IDs to those of the user who
submitted the job.
For example, the following script runs cluster verification and sends an email to admin@xyzcorp.com
when verification fails.
#!/bin/sh
cmcheckconf -v >/tmp/cmcheckconf.output
if (( $? != 0 ))
then
mailx -s "Cluster verification failed" admin@xyzcorp.com 2>&1 </tmp/cmcheckconf.output
fi
#!/bin/sh
cmcheckconf -V all >/tmp/cmcheckconf.output
if (( $? != 0 ))
then
mailx -s "Cluster verification failed" admin@xyzcorp.com 2>&1 /cmcheckconf.output
fi
Limitations
Serviceguard does not check for the following conditions:
• Proper configuration of Access Control Policies. For more information about Access Control Policies,
see Controlling Access to the Cluster.
• File systems configured to mount automatically on boot (that is, Serviceguard does not check /etc/
fstab)
• Starting the Cluster When all Nodes are Down on page 271
• Adding Previously Configured Nodes to a Running Cluster on page 271
• Removing Nodes from Participation in a Running Cluster on page 271
• Halting the Entire Cluster on page 272
• Automatically Restarting the Cluster on page 272
• Halting a Node or the Cluster while Keeping Packages Running
In Serviceguard A.11.16 and later, these tasks can be performed by non-root users with the appropriate
privileges. See Controlling Access to the Cluster for more information about configuring access.
You can use Serviceguard Manager or the Serviceguard command line to start or stop the cluster, or to
add or halt nodes. Starting the cluster means running the cluster daemon on one or more of the nodes in
a cluster. You use different Serviceguard commands to start the cluster depending on whether all nodes
are currently down (that is, no cluster daemons are running), or whether you are starting the cluster
daemon on an individual node.
Note the distinction that is made in this chapter between adding an already configured node to the cluster
and adding a new node to the cluster configuration. An already configured node is one that is already
entered in the cluster configuration file; a new node is added to the cluster by modifying the cluster
configuration file.
270 Limitations
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.
CAUTION: Serviceguard cannot guarantee data integrity if you try to start a cluster with the
cmruncl -n command while a subset of the cluster's nodes are already running a cluster. If the
network connection is down between nodes, using cmruncl -n might result in a second cluster
forming, and this second cluster might start up the same applications that are already running on
the other cluster. The result could be two applications overwriting each other's data on the disks.
NOTE: Hewlett Packard Enterprise recommends that you remove a node from participation in the cluster
(by running cmhaltnode as shown below, or Halt Node in Serviceguard Manger) before running the
Linux shutdown command, especially in cases in which a packaged application might have trouble
during shutdown and not halt cleanly.
272 Using Serviceguard Commands to Remove a Node from Participation in a Running Cluster
longer monitored by Serviceguard, but the applications continue to run. Packages in this state are called
detached packages.
When you have done the necessary maintenance, you can restart the node or cluster, and normal
monitoring will resume on the packages.
NOTE: Keep in mind that the purpose of the LAD capabilities is to allow you do maintenance on one or
more nodes, or the entire cluster. If you want to do maintenance on individual packages, or on elements
of the cluster configuration that affect only one package, or a few packages, you should probably use
package maintenance mode; see Maintaining a Package: Maintenance Mode.
• Halt the cluster (cmhaltcl (1m) with the -d option) without causing its running packages to halt.
Until you restart the cluster (cmruncl (1m)) these packages remain detached and are not being
monitored by Serviceguard.
• You can forcefully halt a detached node (cmhaltnode (1m)) with the -f option.
• All the nodes in the cluster must be running Serviceguard A.11.20.10 or later.
• All the configured cluster nodes must be reachable by an available network.
• You must be the root user (superuser) to halt or start a node or cluster with Live Application Detach,
and to halt a detached package.
• Extended Distance Cluster (serviceguard-xdc) supports LAD for modular failover packages. For more
information, see “Creating a serviceguard-xdc Modular Package” in chapter 5 of HPE Serviceguard
Extended Distance Cluster for Linux A.12.00.40 Deployment Guide at http://www.hpe.com/info/
linux-serviceguard-docs.
• Live Application Detach is supported only with modular failover packages and modular multi-node
packages.
◦ You cannot use Live Application Detach if system multi-node packages are configured in the
cluster.
See Configuring Packages and Their Services on page 219 for more information about package
types.
• You cannot make configuration changes to a package or a cluster in which any packages are
detached.
cmapplyconf (1m) will fail.
• In preview mode (-t) cmrunnode and cmruncl can provide only a partial assessment of the effect of
re-attaching packages.
The assessment may not accurately predict the placement of packages that depend on the packages
that will be re-attached. For more information about preview mode, see Previewing the Effect of
Cluster Changes.
• You cannot halt a package that is in a transitory state such as STARTING or HALTING.
• When packages are detached, they continue to run, but without high availability protection.
Serviceguard does not detect failures of components of detached packages, and packages are not
failed over.
• When you restart a node or cluster whose packages have been detached, the packages are re-
attached; that is, Serviceguard begins monitoring them again.
At this point, Serviceguard checks the health of the packages that were detached and takes any
necessary corrective action — for example, if a failover package has in fact failed while it was
detached, Serviceguard will halt it and restart it on another eligible node.
CAUTION: Serviceguard does not check LVM volume groups, mount points, and relocatable IP
addresses when re-attaching packages.
• cmviewcl (1m) reports the status and state of detached packages as detached.
This is true even if a problem has occurred since the package was detached and some or all of the
package components are not healthy or not running.
• Because Serviceguard assumes that a detached package has remained healthy, the package is
considered to be UP for dependency purposes.
This means, for example, that if you halt node1, detaching pkgA, and pkgB depends on pkgA to be
UP on ANY_NODE, pkgB on node2 will continue to run (or can start) while pkgA is detached. See
About Package Dependencies for more information about dependencies.
◦ Rejoin the cluster and the detached packages can move to "running" or "failed" state. If the
detached packages are moved to running state, then they must be halted and rerun as they may
have several inconsistencies post reboot.
◦ Not rejoin the cluster and the detached packages remain detached. Such packages must be halted
and rerun to avoid any inconsistencies that can be caused due to the reboot.
• If you halt a package and disable it before running cmhaltcl -d to detach other packages running in
the cluster, auto_run will be automatically re-enabled for this package when the cluster is started
again, forcing the package to start.
To prevent this behavior and keep the package halted and disabled after the cluster restarts, change
auto_run to no in the package configuration file, and re-apply the package, before running cmhaltcl
-d.
• Post Live Application Detach (LAD), cluster or node generic resource status or value and command
status will be shown with default status or values. However the generic resource command script will
continue to run on the node.
After the cluster or node is re-attached, the generic resource commands will show the actual status or
value of generic resource.
Procedure
1. Make sure that the conditions spelled out under Rules and Restrictions are met.
2. Halt any packages that do not qualify for Live Application Detach, like system multi-node packages.
For example:
cmhaltpkg -n node1 smnpak1 smnpak2
NOTE: If you do not do this, the cmhaltnode in the next step will fail.
NOTE: -d and -fare mutually exclusive. See cmhaltnode (1m) for more information.
Procedure
1. Make sure that the conditions spelled out under Rules and Restrictions are met.
2. Halt any packages that do not qualify for Live Application Detach, like system multi-node packages.
For example:
cmhaltpkg smnp1
NOTE: If you do not do this, the cmhaltcl in the next step will fail.
NOTE: -d and -f are mutually exclusive. See cmhaltcl (1m) for more information.
Procedure
Non-root users with the appropriate privileges can perform these tasks. See Controlling Access to the
Cluster for information about configuring access.
You can use Serviceguard Manager or the Serviceguard command line to perform these tasks.
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 Serviceguard commands as described below.
Example: Halting the Cluster for Maintenance on the Heartbeat Subnets 277
The cluster must be running, and if the package is dependent on other packages, those packages must
be either already running, or started by the same command that starts this package (see the subsection
that follows, and About Package Dependencies.)
You can use Serviceguard Manager to start a package, or Serviceguard commands as shown below.
Use the cmrunpkg command to run the package on a particular node, then use the cmmodpkg command
to enable switching for the package; for example:
cmrunpkg -n ftsys9 pkg1
cmmodpkg -e pkg1
This starts up the package on ftsys9, then enables package switching. This sequence is necessary
when a package has previously been halted on some node, since halting the package disables switching.
Halting a Package
You halt a package when you want to stop the package but leave the node running.
Halting a package has a different effect from 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.
System multi-node packages run on all cluster nodes simultaneously; halting these packages stops them
running on all nodes. A multi-node package can run on several nodes simultaneously; you can halt it on
all the nodes it is running on, or you can specify individual nodes.
You can use Serviceguard Manager to halt a package, or cmhaltpkg; for example:
cmhaltpkg pkg1
This halts pkg1 and disables it from switching to another node.
NOTE: Non-native Serviceguard modules are those that are not delivered with the Serviceguard product.
These are additional modules such as those supplied with Serviceguard toolkit modules (for example,
Serviceguard Contributed Toolkit Suite, Oracle, NFS toolkit, EDB PPAS, Sybase, and so on).
This allows errors to be cleaned up manually during the halt process thus minimizing the risk of other
follow on errors and reducing package downtime.
When a package is in the halt_aborted state, you can do one of the following:
• Fix the error manually in the module that caused the package halt to abort and re-run cmhaltpkg
<pkg_name>.
• Run cmhaltpkg -f option to forcefully halt the package. When this command is run, it will halt the
package even if the package is in halt_aborted state.
NOTE: This error handling mechanism is applicable only for failover packages and not for multi-node or
system multi-node packages.
It is applicable only for modular packages.
If a package is in the detached or maintenance mode, the package cannot be in halt_aborted state.
The following operations cannot be performed on a package which is in the partially_down status:
• Reconfigure a package
• Run a package
• Halt a node (however, you can forcefully halt a node using cmhaltnode -f option.)
• Halt a cluster (however, you can forcefully halt a cluster using cmhaltcl -f option.)
• Delete a package
• Failover of a package automatically. You must halt the package completely and manually failover the
package.
For failover packages, if package switching is NO the package cannot move to any other node; if node
switching is NO, the package cannot move to that particular node. For multi-node packages, if package
switching is set to NO, the package cannot start on a new node joining the cluster; if node switching is set
to NO, the package cannot start on that node.
Both node switching and package switching can be changed dynamically while the cluster is running. The
initial setting for package switching is determined by the auto_run parameter, which is set in the package
configuration file. If auto_run is set to yes, then package switching is enabled when the package first
starts. The initial setting for node switching is to allow switching to all nodes that are configured to run the
package.
You can use Serviceguard Manager to change package switching behavior, or Serviceguard commands
as shown below.
You can change package switching behavior either temporarily or permanently using Serviceguard
commands.
To temporarily disable switching to other nodes for a running package, use the cmmodpkg command. For
example, if pkg1 is currently running, and you want to prevent it from starting up on another node, enter
the following:
cmmodpkg -d pkg1
This does not halt the package, but will prevent it from starting up elsewhere.
You can disable package switching to particular nodes by using the -n option of the cmmodpkg
command. The following prevents pkg1 from switching to node lptest3:
cmmodpkg -d -n lptest3 pkg1
To permanently disable switching so that the next time the cluster restarts, the change you made in
package switching is still in effect, change the auto_run flag in the package configuration file, then re-
apply the configuration. (See Reconfiguring a Package on a Running Cluster on page 295.)
• Maintenance mode is chiefly useful for modifying networks while the package is running.
• Partial-startup maintenance mode allows you to work on package services, file systems, and volume
groups.
• Neither maintenance mode nor partial-startup maintenance mode can be used for multi-node
packages, or system multi-node packages.
• Package maintenance does not alter the configuration of the package, as specified in the package
configuration file.
For information about reconfiguring a package, see Reconfiguring a Package.
NOTE: In order to run a package in partial-startup maintenance mode, you must first put it in
maintenance mode. This means that packages in partial-startup maintenance mode share the
characteristics described below for packages in maintenance mode, and the same rules and dependency
rules apply.
• Serviceguard ignores failures reported by package services, subnets, generic resources, and file
systems; these will not cause the package to fail.
NOTE: But a failure in the package control script will cause the package to fail. The package will also
fail if an external script (or pre-script) cannot be executed or does not exist.
◦ If the node the package is running on is halted or crashes, the package will no longer be in
maintenance mode but will not be automatically started.
◦ If the cluster is halted or crashes, the package will not be in maintenance mode when the cluster
comes back up. Serviceguard will attempt to start it if auto_run is set to yes in the package
configuration file.
• If node_fail_fast_enabled is set to yes, Serviceguard will not halt the node under any of the
following conditions:
◦ Subnet failure
◦ Generic resource failure
IMPORTANT: See the latest Serviceguard release notes for important information about version
requirements for package maintenance.
• The package must have package switching disabled before you can put it in maintenance mode.
• You can put a package in maintenance mode only on one node.
◦ The node must be active in the cluster and must be eligible to run the package (on the package's
node_name list).
◦ If the package is not running, you must specify the node name when you run cmmodpkg (1m) to
put the package in maintenance mode.
◦ If the package is running, you can put it into maintenance only on the node on which it is running.
◦ While the package is in maintenance mode on a node, you can run the package only on that node.
• You cannot put a package in maintenance mode, or take it out maintenance mode, if doing so will
cause another running package to halt.
• Since package failures are ignored while in maintenance mode, you can take a running package out of
maintenance mode only if the package is healthy.
Serviceguard checks the state of the package’s services and subnets to determine if the package is
healthy. If there are any failed services, Serviceguard automatically restarts the failed services when
the package is taken out of maintenance mode. If there are any other failures, you must halt the
package before taking it out of maintenance mode.
• Generic resources configured in a package must be available (status 'up') before taking the package
out of maintenance mode.
• You cannot do online configuration as described under Reconfiguring a Package.
• You cannot configure new dependencies involving this package; that is, you cannot make it dependent
on another package, or make another package depend on it.
• You cannot use the -t option of any command that operates on a package that is in maintenance
mode; see Previewing the Effect of Cluster Changes for information about the -t option.
• You must halt the package before taking it out of partial-startup maintenance mode.
• To run a package normally after running it in partial-startup maintenance mode, you must take it out of
maintenance mode, and then restart it.
• The packages that depend on pkgAmust be down and disabled when you place pkgA in maintenance
mode. This applies to all types of dependency (including exclusionary dependencies) as described
under About Package Dependencies.
◦ You cannot run a package that depends on pkgA, unless the dependent package itself is in
maintenance mode.
• Dependency rules governing packages that pkgA depends on to be UP are bypassed so that these
packages can halt and fail over as necessary while pkgA is in maintenance mode.
• If both packages in a dependency relationship are in maintenance mode, dependency rules are
ignored for those two packages.
For example, both packages in an exclusionary dependency can be run and halted in maintenance
mode at the same time.
NOTE: If you have a package configured with generic resources and you attempt to take it out of the
maintenance mode back to the running state, the status of generic resources are evaluated. If any of the
generic resources is 'down', the package cannot be taken out of the maintenance mode.
Procedure
Follow these steps to perform maintenance on a package's networking components.
In this example, we'll call the package pkg1 and assume it is running on node1.
Procedure
2. Perform maintenance on the networks or resources and test manually that they are working correctly.
NOTE: If you now run cmviewcl, you'll see that the STATUS of pkg1 is up and its STATE is
maintenance.
Dependency Rules for a Package in Maintenance Mode or Partial-Startup Maintenance Mode 283
cmmodpkg -m off pkg1
Procedure
Follow this procedure to perform maintenance on a package. In this example, we'll assume a package
pkg1 is running on node1, and that we want to do maintenance on the package's services.
Procedure
4. Perform maintenance on the services and test manually that they are working correctly.
NOTE: If you now run cmviewcl, you'll see that the STATUS of pkg1 is up and its STATE is
maintenance.
NOTE: You can also use cmhaltpkg -s, which stops the modules started by cmrunpkg -m — in
this case, all the modules up to and including package_ip.
Reconfiguring a Cluster
You can reconfigure a cluster either when it is halted or while it is still running. Some operations can only
be done when the cluster is halted. The table that follows shows the required cluster state for many kinds
of changes.
Change Quorum Server Configuration Cluster can be running; see What Happens when
You Change the Quorum Configuration Online.
Change Cluster Lock Configuration (lock LUN) Cluster can be running. See Updating the Cluster
Lock LUN Configuration Online and What Happens
when You Change the Quorum Configuration
Online.
Add NICs and their IP addresses to the cluster Cluster can be running. See Changing the Cluster
configuration Networking Configuration while the Cluster Is
Running on page 290.
Table Continued
Delete NICs and their IP addresses, from the Cluster can be running. SeeChanging the Cluster
cluster configuration Networking Configuration while the Cluster Is
Running on page 290.
Change the designation of an existing interface Cluster can be running. See Changing the Cluster
from HEARTBEAT_IP to STATIONARY_IP, or Networking Configuration while the Cluster Is
vice versa Running on page 290.
Change an interface from IPv4 to IPv6, or vice Cluster can be running. See Changing the Cluster
versa Networking Configuration while the Cluster Is
Running on page 290
Reconfigure IP addresses for a NIC used by the Must delete the interface from the cluster
cluster configuration, reconfigure it, then add it back into the
cluster configuration. See What You Must Keep in
Mind. Cluster can be running throughout.
Change IP Monitor parameters: SUBNET, Cluster can be running. See the entries for these
IP_MONITOR, POLLING TARGET parameters under Cluster Configuration Parameters
on page 111for more information.
Change Cluster Generic Resource Cluster can be running for a few parameters and must
parameters be down for others. For more information about the
supported operations, see Online reconfiguration of
cluster generic resources and Offline
reconfiguration of cluster generic resources.
Using cmeval
You can use cmeval to evaluate the effect of cluster changes on Serviceguard packages. You can also
use it simply to preview changes you are considering making to the cluster as a whole.
You can use cmeval safely in a production environment; it does not affect the state of the cluster or
packages. Unlike command preview mode (the -t discussed above) cmeval does not require you to be
logged in to the cluster being evaluated, and in fact that cluster does not have to be running, though it
must use the same Serviceguard release and patch version as the system on which you run cmeval.
Use cmeval rather than command preview mode when you want to see more than the effect of a single
command, and especially when you want to see the results of large-scale changes, or changes that may
interact in complex ways, such as changes to package priorities, node order, dependencies and so on.
Using cmeval involves three major steps:
1. Use cmviewcl -v -f line to write the current cluster configuration out to a file.
2. Edit the file to include the events or changes you want to preview
3. Using the file from Step 2 as input, run cmeval to preview the results of the changes.
For example, assume that pkg1 is a high-priority package whose primary node is node1, and which
depends on pkg2 and pkg3 to be running on the same node. These lower-priority-packages are currently
running on node2. pkg1 is down and disabled, and you want to see the effect of enabling it.
In the output of cmviewcl -v -f line, you would find the line package:pkg1|autorun=disabled
and change it to package:pkg1|autorun=enabled. You should also make sure that the nodes the
package is configured to run on are shown as available; for example: package:pkg1|node:node1|
available=yes. Then save the file (for example, as newstate.in) and run cmeval:
cmeval -v newstate.in
NOTE:
This is a simple example; you can use cmeval for much more complex scenarios; see What You Can
Preview.
IMPORTANT: For detailed information and examples, see the cmeval (1m) manpage.
3. Make sure that all nodes listed in the cluster configuration file are powered up and accessible. Use
cmapplyconf to copy the binary cluster configuration file to all nodes. This file overwrites any
previous version of the binary cluster configuration file.
4. Use cmruncl to start the cluster on all nodes, or on a subset of nodes.
• You cannot remove an active node from the cluster. You must halt the node first.
• 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).
• The access control list for the cluster can be changed while the cluster is running.
NOTE: Before you start, make sure you have configured access to ftsys10 as described under
Configuring Root-Level Access.
1. Use the following command to store a current copy of the existing cluster configuration in a temporary
file in case you need to revert to it:
cmgetconf -C temp.conf
2. Specify a new set of nodes to be configured and generate a template of the new configuration (all on
one line):
cmquerycl -C clconfig.conf -c cluster1 -n ftsys8 -n ftsys9 -n ftsys10
5. Apply the changes to the configuration and send the new binary configuration file to all cluster nodes:
cmapplyconf -C clconfig.conf
Use cmrunnode to start the new node, and, if you so decide, set the AUTOSTART_CMCLD parameter to
1 in the $SGAUTOSTART file (see Understanding the Location of Serviceguard Files on page 169) to
enable the new node to join the cluster automatically each time it reboots.
• The node must be halted. See Removing Nodes from Participation in a Running Cluster on page
271.
• If the node you want to delete is unreachable (disconnected from the LAN, for example), you can
delete the node only if there are no packages which specify the unreachable node. If there are
packages that depend on the unreachable node, halt the cluster; see Halting the Entire Cluster on
page 272.
Use the following procedure to delete a node with Serviceguard commands. In this example, nodes
ftsys8, ftsys9 and ftsys10 are already configured in a running cluster named cluster1, and you
are deleting node ftsys10.
NOTE: If you want to remove a node from the cluster, run the cmapplyconf command from another
node in the same cluster. If you try to issue the command on the node you want removed, you will get an
error message.
2. Specify the new set of nodes to be configured (omitting ftsys10) and generate a template of the new
configuration:
cmquerycl -C clconfig.conf -c cluster1 -n ftsys8 -n ftsys9
3. Edit the file clconfig.conf to check the information about the nodes that remain in the cluster.
4. Halt the node you are going to remove (ftsys10in this example):
cmhaltnode -f -v ftsys10
6. From ftsys8 or ftsys9, apply the changes to the configuration and distribute the new binary
configuration file to all cluster nodes.:
cmapplyconf -C clconfig.conf
NOTE: If you are trying to remove an unreachable node on which many packages are configured to run,
you may see the following message:
The configuration change is too large to process while the cluster is running.
Split the configuration change into multiple requests or halt the cluster.
In this situation, you must halt the cluster to remove the node.
290 Changing the Cluster Networking Configuration while the Cluster Is Running
What You Must Keep in Mind
The following restrictions apply:
• You must not change the configuration of all heartbeats at one time, or change or delete the only
configured heartbeat.
At least one working heartbeat must remain unchanged.
• You cannot add interfaces or modify their characteristics unless those interfaces, and all other
interfaces in the cluster configuration, are healthy.
There must be no bad NICs or non-functional or locally switched subnets in the configuration, unless
you are deleting those components in the same operation.
• You cannot change the designation of an existing interface from HEARTBEAT_IP to STATIONARY_IP,
or vice versa, without also making the same change to all peer network interfaces on the same subnet
on all other nodes in the cluster.
Similarly, you cannot change an interface from IPv4 to IPv6 without also making the same change to
all peer network interfaces on the same subnet on all other nodes in the cluster.
• You cannot change the designation of an interface from STATIONARY_IP to HEARTBEAT_IP unless
the subnet is common to all nodes.
Remember that the HEARTBEAT_IP must be an IPv4 address, and must be on the same subnet on all
nodes, except in cross-subnetconfigurations; see Cross-Subnet Configurations).
• You cannot delete a subnet or IP address from a node while a package that uses it (as a
monitored_subnet, ip_subnet, or ip_address) is configured to run on that node.
Information about these parameters begins at monitored_subnet.
• You cannot change the IP configuration of an interface (NIC) used by the cluster in a single transaction
(cmapplyconf).
You must first delete the NIC from the cluster configuration, then reconfigure the NIC (using
ifconfig, for example), then add the NIC back into the cluster.
Examples of when you must do this include:
CAUTION: Do not add IP addresses to network interfaces that are configured into the Serviceguard
cluster, unless those IP addresses themselves will be immediately configured into the cluster as
stationary IP addresses. If you configure any address other than a stationary IP address on a
Serviceguard network interface, it could collide with a relocatable package address assigned by
Serviceguard.
Procedure
1. Run cmquerycl to get a cluster configuration template file that includes networking information for
interfaces that are available to be added to the cluster configuration:
cmquerycl -c cluster1 -C clconfig.conf
The networking portion of the resulting clconfig.conf file looks something like this:
NODE_NAME ftsys9
NETWORK_INTERFACE lan1
HEARTBEAT_IP 192.3.17.18
#NETWORK_INTERFACE lan0
#STATIONARY_IP 15.13.170.18
NETWORK_INTERFACE lan3
NODE_NAME ftsys10
NETWORK_INTERFACE lan1
HEARTBEAT_IP 192.3.17.19
#NETWORK_INTERFACE lan0
#STATIONARY_IP 15.13.170.19
NETWORK_INTERFACE lan3
2. Edit the file to uncomment the entries for the subnet that is being added (lan0 in this example), and
change STATIONARY_IP to HEARTBEAT_IP:
NODE_NAME ftsys9
NETWORK_INTERFACE lan1
HEARTBEAT_IP 192.3.17.18
NETWORK_INTERFACE lan0
HEARTBEAT_IP 15.13.170.18
NETWORK_INTERFACE lan3
NODE_NAME ftsys10
NETWORK_INTERFACE lan1
HEARTBEAT_IP 192.3.17.19
NETWORK_INTERFACE lan0
HEARTBEAT_IP 15.13.170.19
NETWORK_INTERFACE lan3
4. Apply the changes to the configuration and distribute the new binary configuration file to all cluster
nodes:
cmapplyconf -C clconfig.conf
If you were configuring the subnet for data instead, and wanted to add it to a package configuration, you
would now need to:
For more information, see Reconfiguring a Package on a Running Cluster on page 295.
Procedure
1. Halt any package that uses this subnet and delete the corresponding networking information
(monitored_subnet, ip_subnet, ip_address; see the descriptions for these parameters starting with
monitored_subnet).
See Reconfiguring a Package on a Running Cluster on page 295 for more information.
2. Run cmquerycl to get the cluster configuration file:
cmquerycl -c cluster1 -C clconfig.conf
3. Comment out the network interfaces lan0 and lan3 and their network interfaces, if any, on all
affected nodes. The networking portion of the resulting file looks something like this:
NODE_NAME ftsys9
NETWORK_INTERFACE lan1
HEARTBEAT_IP 192.3.17.18
# NETWORK_INTERFACE lan0
# STATIONARY_IP 15.13.170.18
# NETWORK_INTERFACE lan3
NODE_NAME ftsys10
NETWORK_INTERFACE lan1
HEARTBEAT_IP 192.3.17.19
# NETWORK_INTERFACE lan0
# STATIONARY_IP 15.13.170.19
# NETWORK_INTERFACE lan3
5. Apply the changes to the configuration and distribute the new binary configuration file to all cluster
nodes:
cmapplyconf -C clconfig.conf
IMPORTANT: See What Happens when You Change the Quorum Configuration Online for
important information.
1. In the cluster configuration file, modify the value of CLUSTER_LOCK_LUN for each node.
2. Run cmcheckconf to check the configuration.
If you need to replace the physical device, see Replacing a Lock LUN.
Changing MAX_CONFIGURED_PACKAGES
As of Serviceguard A.11.18, you can change MAX_CONFIGURED_PACKAGES while the cluster is
running. The default for MAX_CONFIGURED_PACKAGES is the maximum number allowed in the
cluster. You can use Serviceguard Manager to change MAX_CONFIGURED_PACKAGES, or
Serviceguard commands as shown below.
Use the cmgetconf command to obtain a current copy of the cluster's existing configuration, for
example:
cmgetconf -C <cluster_name> clconfig.conf
Edit the clconfig.conf file to include the new value for MAX_CONFIGURED_PACKAGES. Then use
the cmcheckconf command to verify the new configuration. Using the -k or -K option can significantly
reduce the response time.
Use the cmapplyconf command to apply the changes to the configuration and send the new
configuration file to all cluster nodes. Using -k or -K can significantly reduce the response time.
NOTE:
If you are removing a disk group from the cluster configuration, ensure that you also modify or delete any
package configuration file that imports and deports this disk group. Be sure to remove the disk group from
the configuration of any package that used it, and the corresponding dependency_ parameters.
Reconfiguring a Package
You reconfigure a package in much the same way as you originally configured it; for modular packages,
see Configuring Packages and Their Services .
2. If it is not already available, you can obtain a copy of the package's configuration file by using the
cmgetconf command, specifying the package name.
cmgetconf -p pkg1 pkg1.conf
IMPORTANT: Restrictions on package names, dependency names, and service names have
become more stringent as of A.11.18. Packages that have or contain names that do not conform
to the new rules (spelled out under package_name) will continue to run, but if you reconfigure
these packages, you will need to change the names that do not conform; cmcheckconf and
cmapplyconf will enforce the new rules.
1. Make a copy of the old script, save it with the new name, and edit the copy as needed.
2. Edit the package configuration file to use the new name.
3. Distribute the new script to all nodes that are configured for that package.
Make sure you place the new script in the correct directory with the proper file modes and ownership.
4. Run cmcheckconf to validate the package configuration with the new external script.
CAUTION: If cmcheckconf fails, do not proceed to the next step until you have corrected all the
errors.
CAUTION: Be extremely cautious about changing a package's configuration while the package is
running.
If you reconfigure a package online (by executing cmapplyconf on a package while the package
itself is running) it is possible that the reconfiguration fails, even if the cmapplyconf succeeds,
validating the changes with no errors.
For example, if a file system is added to the package while the package is running, cmapplyconf
does various checks to verify that the file system and its mount point exist. But the actual file system
check and mount of the file system can be done only after cmapplyconf succeeds; and if one of
these tasks fails in a running package, the package reconfiguration fails.
Another example involves renaming, modifying, or replacing an external script while the package
that uses it is running. If the package depends on resources that are managed by the script, the
online recofiguration fails when you replace the script. See Renaming or Replacing an External
Script Used by a Running Package on page 295.
NOTE: Changes that are allowed, but whichHewlett Packard Enterprise does not recommend, are
labeled “should not be running”.
IMPORTANT: Actions not listed in the table can be performed for both types of package while the
package is running.
In all cases the cluster can be running, and packages other than the one being reconfigured can be
running. You can make changes to package configuration files at any time; but do not apply them (using
cmapplyconf or Serviceguard Manager) to a running package in the cases indicated in the table.
NOTE: All the nodes in the cluster must be powered up and accessible when you make package
configuration changes.
Table Continued
Change a file system Package should not be running (unless you are only changing
fs_umount_opt).
Changing file-system options other than fs_umount_opt may cause
problems because the file system must be unmounted (using the
existing fs_umount_opt) and remounted with the new options; the
CAUTION under “Remove a file system: modular package” applies in
this case as well.
If only fs_umount_opt is being changed, the file system will not be
unmounted; the new option will take effect when the package is halted
or the file system is unmounted for some other reason.
Table Continued
Add a generic resource of Package can be running provided the status of the generic resource is
evaluation type not 'down'. For information on online changes to generic resources,
during_package_start see Online Reconfiguration of Generic Resources.
Add a generic resource of Package can be running if the status of generic resource is 'up', else
evaluation type package must be halted.
before_package_start
Change the Package can be running if the status of generic resource is 'up'.
generic_resource_evaluation_t
Not allowed if changing the generic_resource_evaluation_type causes
ype
the package to fail.
For information on online changes to generic resources, see Online
Reconfiguration of Generic Resources.
Add the VMware VMFS Package can be running. For more information about online changes
package parameters: to VMware VMFS parameters, see Online Reconfiguration of
VMware VMFS Parameters on page 130.
vmdk_file_name
datastore_name NOTE: You cannot modify or remove the VMware VMFS parameter
scsi_controller as this is not supported.
disk_type
Table Continued
NOTE: Consider a configuration in which the volume group and the corresponding filesystem are present
in two different packages. To perform online reconfiguration of such packages, the package with the
volume group must be reconfigured before you reconfigure the filesystem package. Hewlett Packard
Enterprise recommends that you do not perform online reconfiguration for both these packages in a
single command as it might cause one or more packages to fail.
NOTE: You will not be able to cancel if you use cmapplyconf -f.
• Package nodes
• Package dependencies
• Package weights (and also node capacity, defined in the cluster configuration file)
• Package priority
• auto_run
• failback_policy
To handle the failure during online package reconfiguration, see Handling Failures During Online
Package Reconfiguration.
Recommendations
• Hewlett Packard Enterprise recommends that when modifying package parameters online, the
modification must be done on one module at a time and also from one package only.
• You must consider only one package for online reconfiguration at a time.
• If you are adding a new module or a parameter when the package is UP, make the changes in the
Serviceguard package and later configure the application to use the changes.
For example, to add a mount point:
1. Edit the package configuration file and add the mount point.
2. Verify the package configuration file:
#cmcheckconf -P <pkg_name>
• If you are deleting a module or parameter from the module, you must remove the configuration from
the application and later delete from the Serviceguard.
For example, to delete a mount point:
• The global switching of the package is disabled. This means, the package cannot failover to the
adoptive node. For more information, see cmviewcl (5) manpage.
• Live application detach (LAD) of the node where the package reconfiguration has failed are not
allowed.
• The package cannot be put into maintenance mode when an online_modification_failed flag
is set to yes.
• You cannot modify the package configuration online. For more information, see cmapplyconf (1m)
manpage.
• Halting the package using cmhaltpkg command. For more information, see cmhaltpkg (1m)
manpage.
• A new option -f is introduced for cmmodpkg command that can be used to clear the flag. The -f
option must be used after fixing the errors found during the previous online reconfiguration of the
package. This option is applicable for both failover and multi-node packages.
For example, if you enter a wrong fs_type value while adding a new filesystem to the pkg1.
*****************************
Package log during this time:
*****************************
Nov 28 23:41:19 root@test1.ind.hp.com master_control_script.sh[23516]:
###### reconfiguring package pkg1 ######
Nov 28 23:41:20 root@test1.ind.hp.com pr_util.sh[23621]: New VG vg_dd0
Nov 28 23:41:20 root@test1.ind.hp.com pr_util.sh[23621]: sg_activate_pr:
activating PR on /dev/sdc
Nov 28 23:41:21 root@test1.ind.hp.com volume_group.sh[23687]: New VG vg_dd0
Nov 28 23:41:21 root@test1.ind.hp.com volume_group.sh[23687]: Attempting to
addtag to vg vg_dd0...
Nov 28 23:41:21 root@test1.ind.hp.com volume_group.sh[23687]: addtag was
successful on vg vg_dd0.
Nov 28 23:41:21 root@test1.ind.hp.com volume_group.sh[23687]: Activating
volume group vg_dd0 .
Nov 28 23:41:22 root@test1.ind.hp.com filesystem.sh[23808]: FS added or
changed /dev/vg_dd0/lvol3
Nov 28 23:41:22 root@test1.ind.hp.com filesystem.sh[23808]: Checking
filesystems:
/dev/vg_dd0/lvol3
e2fsck 1.41.12 (17-May-2010)
mount: wrong fs type, bad option, bad superblock on /dev/vg_dd0/lvol3,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
:
:
************************
syslog during this time:
************************
Nov 28 23:41:22 test1 cmserviced[18979]: Package Script for pkg1 failed with
an exit(18).
Nov 28 23:41:22 test1 cmcld[18900]: Reconfigured package pkg1 on node test1.
Nov 28 23:41:22 test1 cmcld[18900]: Online reconfiguration of package pkg1
on node test1 failed. Check the package log file for complete information.
Nov 28 23:41:22 test1 cmcld[18900]: Request from node test1 to disable
global switching for package pkg1.
To rectify the failures, do one of the following:
or
Adding an sg/ If an external pre script To start the external pre script:
external pre external_pre_script which is added to the
#extern_pre_script.sh
script to the (external.sh) package configuration failed
start
package to start, run the script
manually with start option.
script_name start
Table Continued
Table Continued
The table describes how to fix the errors in the affected modules that are encountered during online
deletion of a package.
Table Continued
Removing sg/filesystem If storage deleted from the To unmount the mount point
storage from (filesystem.sh) package has failed or not mnt1:
the package sg/volume_group attempted, ensure the
#umount /mnt1
(volume_group.sh) following:
sg/pr_cntl To delete the hostags from the
(pr_cntl.sh) • The mount point is vg_dd0 on node
unmounted. test1.ind.hp.com:
Removing sg/ If an external pre script To halt the external pre script:
external pre external_pre_script which is deleted from the
#extern_pre_script.sh
script from (external.sh) package configuration failed
stop
the package or not attempted to stop, run
the script with stop option.
script_name stop
Procedure
generic_resource_name cpu_monitor
generic_resource_evaluation_type during_package_start
generic_resource_up_criteria <= 60
service_name cpu_monitor_script
service_cmd $SGCONF/generic_resource_monitors/
cpu_monitor.sh
service_restart unlimited
service_fail_fast_enabled no
service_halt_timeout 30
service_halt_on_maintenance no
a. Remove or comment out the service parameters associated with the generic resource.
b. Remove or comment out the package generic resource parameters of which you are planning to
move to cluster.
4. Distribute your changes to all nodes, this step will reconfigure the running package.
cmapplyconf -v -P pkg1.conf
5. After the reconfiguration of package completes. Get the cluster configuration file. If it is not already
available, you can obtain a copy of the cluster configuration file by using the cmgetconf command,
specifying the cluster name.
cmgetconf –c cluster1 cluster.conf
GENERIC_RESOURCE_NAME cpu_monitor
GENERIC_RESOURCE_TYPE extended
GENERIC_RESOURCE_CMD $SGCONF/generic_resource_monitors/
cpu_monitor.sh
GENERIC_RESOURCE_SCOPE NODE
GENERIC_RESOURCE_RESTART unlimited
GENERIC_RESOURCE_HALT_TIMEOUT 30000000
Reconfiguring a package for generic resource when the cluster is running or halted 309
7. Verify the changes.
cmcheckconf -v –C cluster.conf
8. Distribute your changes to all nodes, this step will reform the running cluster by adding the cluster
generic resource.
cmapplyconf -v –C cluster.conf
generic_resource_name cpu_monitor
generic_resource_evaluation_type during_package_start
generic_resource_up_criteria <= 60
12. Distribute your changes to all nodes, this step will reform the running package by adding the generic
resource.
cmapplyconf -v –P pkg1.conf
NOTE: The above procedure involves modifying the cluster and package configuration in separate
operations. However this can be combined to one single operation also. To modify both the cluster
and package as part of one single operation you can skip the step 7-8. And perform the below
mentioned steps instead of steps 11-12.
Verify your changes as follows for both cluster and package configuration:
cmcheckconf -v –C cluster.conf –P pkg1.conf
Distribute your changes to all nodes, this step will reform the running cluster and package by adding
the generic resource into cluster and package:
cmapplyconf -v –C cluster.conf –P pkg1.conf
13. After completing the above steps make sure that the cluster and package generic resources are up
and running as per the configuration. Check the syslog and package logs for any errors and resolve
them.
Single-Node Operation
In a multi-node cluster, you could have a situation in which all but one node has failed, or 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
rejoin the cluster.
If the Serviceguard daemon fails when the cluster is in single-node operation, it will leave the single node
up and your applications running
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. (This is different from the loss of the Serviceguard
daemon in a multi-node cluster, which halts the node (system reset), and causes packages to be
switched to adoptive nodes.)
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 shut down the applications and reboot the
node; this will allow Serviceguard to restart the cluster after the reboot.
CAUTION:
Remove the node from the cluster first. If you run the rpm -e command on a server that is still a
member of a cluster, it will cause that cluster to halt, and the cluster to be deleted.
To remove Serviceguard:
NOTE:
• If you have installed version earlier than 12.00.30, ensure that you have configured equal number of
nodes on both sites.
• If you have installed 12.00.30 or later versions, asymmetric node configuration in a Metrocluster
environment is supported with Smart Quorum enabled. For more information about Smart Quorum,
see Understanding the Smart Quorum on page 324
.
SADTA attempts to restart the complex application workloads on the other available nodes within the
production site if the site is not completely lost. In case, the entire site has failed, SADTA initiates a site
takeover and the application(s) run on the recovery site.
The following are the main components of SADTA:
• Site
• Complex workload
• Redundant configuration
• Site controller package
• Site safety latch and its status
Figure 38: Typical Cluster Configuration with Sites on page 313 depicts a four node Serviceguard
cluster with sites, Site A and Site B, where Site A consists of Node 1 and Node 2 and Site B consists of
Node 3 and Node 4. The SITE_NAME and SITE parameter must be defined in the cluster configuration
file. For more information on how to configure sites in a cluster, see the parameter descriptions under
Cluster Configuration Parameters on page 111.
Complex Workload
A complex workload is a set of failover or multi-node package(s) or both configured to run on a site with
or without any dependencies among them. The workload may optionally include components that need to
be brought up on the disaster recovery site after bringing up all the components of the workload on the
primary site. Figure 39: Sample Complex Workload Configuration on page 313 shows the complex
workload packages configured on Site A which is primary site.
Redundant Configuration
The SADTA framework relies on redundant configuration to provide disaster recovery capabilities for
complex workloads. SADTA requires that each of the workload packages have a redundantly configured
recovery package which will be brought up on the recovery site in case of failure in the primary site. The
• Critical packages
When a package is configured as critical in the site controller package, the site controller package
monitors only these critical packages for any failures. If there are managed packages configured along
with the critical packages, the site controller package does not monitor the managed packages for any
failures. You can specify any number of critical packages and these packages can be of type failover
or multi-node packages. During monitoring, even if a single critical package fails and cannot be
brought up on any other node in the production site, the site controller package initiates a site takeover
to the recovery site.
• Managed packages
When a package is configured as managed in the site controller package, the site controller package
monitors all the managed packages for any failures only when no critical packages are configured. You
During monitoring, if the site controller package detects a failure, then the site controller package tries to
failover the package to the nodes within the site to resume the service in the production site. However, if
the packages cannot be accommodated on the production site, then the site controller package initiates a
site takeover.
The following are the scenarios where the site controller package initiates a site takeover:
• When any one of the critical packages fail (not administratively halted) and it cannot be brought up on
any other node in the production site, the site controller package initiates a site takeover to recovery
site.
• When no critical packages are configured and all the managed packages fail in a production site (not
administratively halted) and they cannot be brought up on any other node in the production site.
NOTE:
• A multi-node package is considered failed only if the package fails on all the nodes where it is
configured to run.
• If any of the critical or managed packages are administratively halted individually, then a site takeover
is not initiated in the event of failure of the critical or managed package respectively.
• If the site controller package or any complex workload packages (that is, critical, managed or remote
managed packages) are in detached or maintenance mode, then site takeover will not be initiated in
the event of a failure.
NOTE: Only root user can reset the value of site safety latch in the configuration file using the
cmresetsc command. For more information, see cmresetsc (1m) manpage.
unknown
• intermediate
Until the complex workload packages are brought up, the site safety latch status on the production site
will be in intermediate state. This is a transient state. Once the complex workload packages are
running on the production site, the site safety latch value is immediately changed from
intermediate state by the site controller package.
• passive
If the site safety latch status is passive on any site, then this site is called as passive site by the site
controller package and is available for running the recovery workload packages on the disaster
recovery site.
• active
If the site safety latch status is active on any site, then this site is called as active site by the site
controller package and is running the workload packages on the production site. Then, the site
controller package starts the remote managed package on the passive site.
NOTE:
• If the status of the site safety latch on both the sites changes to intermediate state, ensure that you
run the cmresetsc command on one node from each site.
• If the status of the site safety latch changes to intermediate state on one of the node belonging to
the site, ensure that you run the cmresetsc command on that node.
• If the site controller package logs the following message in the package log file, then you need to run
the cmresetsc command:
sc.sh[15366]: Site Controller start up on the site "A" has failed
sc.sh[15366]: Clean up the site and start manager again
sc.sh[15366]: Check for any error messages in the package log file on all
sc.sh[15366]: nodes in the site "A" for the packages managed
sc.sh[15366]: by Site Controller (manager)
sc.sh[15366]: Fix any issue reported in the package log files and enable
sc.sh[15366]: node switching for the packages on nodes that have failed.
sc.sh[15366]: Reset the site "A" using "/usr/local/cmcluster/bin/cmresetsc"
sc.sh[15366]: command and start manager again
sc.sh[15366]: Site Controller startup failed
To configure workload packages and its recovery packages using SADTA, follow these steps:
1. Configure site-aware Serviceguard cluster with sites. For more information about how to configure
site-aware Serviceguard cluster with sites, see Configure Site-aware Serviceguard Cluster with
Sites on page 317.
2. Configure the complex workload packages. For more information about how to configure complex
workload packages, see Configure the Complex Workload Packages on page 318.
3. Configure the redundant complex workload packages. For more information about how to configure
redundant complex workload packages, see Configure the Redundant Complex Workload
Packages on page 318.
4. Configure the site controller package. For more information about how to configure site controller
package, see Configuring the Site Controller Package for the Complex Workload on page 318.
How to Deploy and Configure the Complex Workloads for Disaster Recovery using SADTA 317
NOTE:
Ensure that you have configured equal number of nodes on both sites.
Table 17: Configuring Generic Resource Parameters for critical, managed, and
remote managed packages
The default value of the failover_policy parameter for the site controller package is set to
site_preferred. You can set the value to site_preferred_manual, based on your requirement.
The site_preferred_manualfailover policy provides automatic failover of packages within a site and
across sites. The site_preferred value implies that during a site controller package failover, while
selecting nodes from the list of the node_name entries, the site controller package fails over to the nodes
that belong to the site of the node it last ran on, rather than the nodes that belong to the other site. The
The table describes how to configure generic resource parameters for site controller package.
Table 18: Configuring Generic Resource Parameters for Site Controller Package
1. Create a site controller package configuration file using the sg/sc module:
#cmmakepkg -m sg/sc pkg_sc.config
2. Edit the site controller package configuration file and specify the generic resource parameters for
critical_package, managed_package, and remote_managed_package parameters as described in
Configuring Generic Resource Parameters for critical, managed, and remote managed
packages.
3. Edit the site controller package configuration file and specify the generic resource parameters for site
controller package as described in Configuring Generic Resource Parameters for Site Controller
Package.
4. Verify the site controller package configuration file:
#cmcheckconf —v —P pkg_sc.config
5. Ensure all the workloads are present before applying the configuration:
#cmapplyconf —v —P pkg_sc.config
6. View the site controller packages configured after applying the site controller package configuration:
#cmviewcl —v —p pkg_sc
Parameter Description
node_name The node_name parameter must be specified in an order where
all the nodes of the preferred site appear before the remote
adoptive site nodes.
2. Enable all the nodes in the cluster for the site controller package:
#cmmodpkg –e –n site1node_1 –n site1node_2 -n site2node_1 –n site2node_2
pkg_sc
5. Check the site controller package log file to ensure clean startup.
Table 20: Validation of Site Controller Packages and its Workload Packages
Check if the sites cmapplyconf Checks if the site values in this package are
configured are valid the sites that are configured in the cluster
cmcheckconf [-P/-p]
configuration.
Table Continued
Check the auto_run cmapplyconf The auto_run parameter for site controller
parameter of the site must be set to NO.
cmcheckconf [-P/-p]
controller package.
Failure Scenarios
The site controller package initiates a site takeover when the site or the complex workload has failed.
The following are the steps that describe the site failover sequence:
1. Run the touch command in the packages run directory (that is, $[SGRUN]/log/$
[SG_PACKAGE_NAME]_DETACH):
#touch PACKAGENAME_DETACH
3. Log in to the other node in the cluster and start the site controller package:
#cmrunpkg —n node2 sc_pkg1
2. Halt the site controller package and perform any maintenance operations:
#cmhaltpkg sc_pkg1
4. Log in to the other node in the cluster and start the site controller package:
#cmrunpkg sc_pkg1
• Site controller package cannot be started when the workloads are in the detached state.
• When you halt a site controller package with some of its workloads in detached state, then the site
controller package does not halt the workloads that are in detached state.
• When you halt a site controller package which is in detached state with some of its workloads also in
detached state, then the site controller package does not halt the workloads that are in detached state.
• When you halt a site controller package which is in detached state and none of its workloads are in
detached state, then site controller package will halt all the workloads.
• Site controller package monitors the workload packages, even if the node on which site controller
package is running is in detached state. In this case, the site failover is not initiated when there is a
failure.
• If you reattach a site controller package, then it continues to monitor the workloads that are not in the
detached state or in maintenance mode.
NOTE:
When you detach a node on which a site controller package is running and then halt the site controller
package on that node, the site controller package will halt all the workloads. Before you restart the site
controller package on any node, ensure that you reattach the detached node.
• Upon receiving request from any active group within the wait period, it will grant the request to that
group.
or
• If QS_ARBITRATION_WAIT parameter time expires and quorum server does not receive the request
from the other group within the wait period. Then, quorum server promotes passive site to become
active. See the description of QS_ARBITRATION_WAIT parameter under Cluster Configuration
Parameters on page 111.
Prerequisites
• All the cluster nodes must have Serviceguard version A.12.00.30 or later.
• Quorum server version must be A.12.00.30 or later.
• The cluster must be a site-aware cluster.
• The cluster must be configured with a generic resource named as sitecontroller_genres.
A group which did not receive the quorum automatically shuts down to prevent the cluster islands.
Examples
Example 1: Assume that there are two sites configured in a cluster, that is, Site A and Site B. The site
where critical workloads are up and running is ACTIVE site and the other is PASSIVE site. In an event of
split between the sites, nodes of Site A cannot communicate with nodes of Site B in the following
conditions:
• Figure 42: Typical cluster configuration when there is a split between two sites with equal
number of active nodes on page 326 illustrates the two sites configured with equal number of nodes
Figure 42: Typical cluster configuration when there is a split between two sites with equal
number of active nodes
• Figure 43: Typical cluster configuration when there is a split between two sites with unequal
number of active nodes on page 327 illustrates two sites configured with unequal number of nodes
and Smart Quorum is enabled at quorum server. If there is a split between the sites, quorum server
grants quorum to Site A which is running critical workload (ACTIVE site) even if Site A has fewer
number of nodes than the other site (Site B).
Example 2: Assume that there are two sites configured in a cluster, that is, Site A and Site B, where site
A has Node 1, Node 2, and Node 3 and site B has Node 4, Node 5, and Node 6 as in Figure 45: Typical
cluster configuration when there is a split across site on page 329. If the split occurs in such a way
that Node 1, Node 2, Node 3, and Node 4 form one sub-cluster and Node 5 and Node 6 form another
sub-cluster. The group that has majority number of nodes spans across the site and forms a cluster
without any support from an external quorum server.
Limitation
During startup of the workload packages, the site controller package does not honor the node order
defined in the complex workload packages. For more information about the node, see Dragging Rules
for Simple Dependencies.
Limitation 329
Simulating a Serviceguard Cluster
Cluster simulation allows administrators to simulate different kinds of failures, such as node, network, and
workload failures (that is, Serviceguard packages). Cluster simulation is capable of simulating node and
network interface failures. Cluster simulation evaluates and analyzes what happens to the package due to
simulated failures, whether the packages will failover and start on a specified node. The cluster states
reported by the simulated cluster exactly matches with the real Serviceguard cluster. This helps in
analyzing high availability design for various failure scenarios.
Cluster simulation also enables the administrators to do the following:
Advantages
• The commands in the cluster simulation are almost similar to the Serviceguard cluster commands.
• You can run cluster simulation on production clusters since it does not interfere with the deployed
clusters.
• There is no need for the actual hardware to simulate a cluster. You can simulate up to 32 nodes in the
cluster using a single node.
• You can also have multiple simulation sessions or clusters running on the same node simultaneously.
Modes of Simulation
The simulation commands are supported with two modes, namely:
• Simulation prompt mode — In this mode, you can set the cluster or session using setcluster
command on which all further commands can be run without having to specify its name explicitly with
--session option. For example, #cmsimulatecl clsim> setcluster test_cluster
clsim:test_cluster>
• Simulation command-line interface mode — In this mode, you can run the Serviceguard simulation
command from the shell. For example, #cmsimulatecl cmapplyconf -C
test_cluster.ascii
Not Supported
The following Serviceguard features are not supported on the simulated cluster:
• LAD, Generic Resource, Load Balancing, serviceguard-xdc, Cluster Analytics, VxFS, and Online and
offline reconfiguration of cluster and package.
Session name is same as the cluster name. For information about how to create cluster configuration file,
see Cluster Configuration Parameters on page 111 and the cmsimulatecl (1m) manpage.
For example, assume that you have cluster configuration file test_cluste.ascii and package config
files PKG1.conf and PKG2.conf. The following sections describe how to create a simulated cluster
using these configuration files.
1. Edit the cluster configuration file and apply the changes to the configuration file using cmapplyconf
command.
#cmsimulatecl cmapplyconf -C test_cluster.ascii
• Import Existing Local Cluster State into Simulation Environment on page 331
• Import Existing Remote Cluster State into Simulation Environment on page 332
• Import the Status of the Cluster State Stored in a File on page 332
NOTE:
The importcluster command can import only the state of a cluster of same Serviceguard version.
• To set the active node in the cluster, on which all the simulator commands can be run:
#cmsimulatecl --session test_cluster setnode test1
Node test1 is set as active node for session test_cluster.
NOTE: If no nodes are set by the user, the first node in the cluster configuration file will be chosen to
run all the simulator commands.
• To return an active node to the cluster, on which all the simulator commands can be executed. For
example, to check on which node in "test_cluster" you can run the simulator commands:
#cmsimulatecl --session test_cluster getnode
test1 is active node for session test_cluster.
1. Edit the cluster configuration file and apply the changes to the configuration file using cmapplyconf
command.
#cmsimulatecl cmapplyconf -P PKG1.conf
Limitation
• During package reconfiguration, you can only add the packages but cannot perform any other
operations.
• You cannot add nodes once the cluster is created.
• You cannot modify the configuration of cluster, node, or package once you have added.
Running a Package
You can use cmrunpkg to run the package on a particular node. For more information,
#cmsimulatecl --session test_cluster cmrunpkg PKG1
Running package PKG1 on node test1
Successfully started package PKG1 on node test1
cmrunpkg: All specified packages are running
For more information, see the cmrunpkg (1m) manpage.
Halting a Package
You can halt a package using the following command:
#cmsimulatecl --session test_cluster cmhaltpkg PKG1
One or more packages or package instances have been halted
cmhaltpkg: Completed successfully on all packages specified
For more information, see the cmhaltpkg (1m) manpage.
Deleting a Package
You can delete the package using the following command:
#cmsimulatecl --session test_cluster cmdeleteconf -p PKG1
Modify the package configuration ([y]/n)y
Completed the package deletion
For more information, see the cmdeletepkg (1m) manpage.
NOTE:
To verify whether the packages running on test1 failed over or not, and where the packages are
currently running:
#cmsimulatecl --session test_cluster cmviewcl
NOTE:
To verify whether the failure of PKG1 affects any other packages:
#cmsimulatecl --session cmviewcl
NOTE:
Assume that you have failed node1 and node2. You can only recover the failure from node2, but cannot
recover from multiple sequential failures. Also, you can only recover from the last failure.
NOTE: You can obtain better visualizations for KPIs using GUI.
Table Continued
LAST_JOINING_TIME The last time at which the node is added to the cluster
or node configured to be part of the cluster.
KPIs of Packages
AVAILABILITY The percentage of time duration for which package is up
in the cluster for the total time specified. By default, the
total time is considered to be the difference between
current time and time at which package is configured in
the cluster. You can also specify the start and end time
for which the KPI value will be computed.
Table Continued
1 The REFORMATION_COUNT KPI value is incremented by ‘n’, where, ‘n’ is the number of nodes up in the cluster at that
instance, when the cluster is halted. Also, the REFORMATION_COUNT KPI value gets incremented by ‘1’ when a
cluster is started.
2 When a node is halted using cmhaltnode -f command, the LAST_FAILOVER_TIME and FAILOVER_COUNT KPI
values of a package remain unchanged.
3 The node switching attribute and global switching attribute of the package are not considered for computing
FAILURE_PROTECTION_LEVEL KPI. For more information, see Package Switching Attributes on page 258.
2. Export a location from NFS server to all the nodes that are part of the cluster.
3. Mount the exported location:
#mount -t nfs <`nfs_server`:location> -o rw -o nolock <`mnt_dir`>
NOTE:
Any changes made to the $SGCONF/cmanalytics.conf file do not take effect until you start (or
restart) the cluster analytics daemon.
2. Copy $SGCONF/cluster.db3 file either from local or remote node, which has latest event message
stored to a location pointed by NFS shared storage mentioned in the SG_CA_DIRECTORY parameter
in the $SGCONF/cmanalytics.conf file.
• If the cluster is not configured, then cmcaadmin start command displays the following message:
• If the cluster is configured and down, then cmcaadmin start command displays the following
message:
NOTE: If the cluster is not configured, ensure that the nodes which are to be configured in the cluster are
present in the $SGCONF/cmclnodelist file. If $SGCONF/cmclnodelist file does not exist, then
Cluster Analytics daemon starts on node from which cmcaadmin startcommand has been issued.
• If the cluster is not configured, then cmcaadmin stop command displays the following message:
• If the cluster is configured and down, then cmcaadmin stop command displays the following
message:
• If the cluster is not configured and the cluster analytics daemon is not running, then cmcaadmin
status command displays the following message:
• If the cluster is not configured and the cluster analytics daemon is running, then cmcaadmin status
command displays the following message:
• If the cluster is configured and down but cluster analytics daemon is not running, then cmcaadmin
status command displays the following message:
• If the cluster is not configured and the cluster analytics daemon is running on one of the nodes listed in
the $SGCONF/cmclnodelist file, then the cmcaadmin cleanup command displays the following
message:
cmcaadmin: Cleaning Cluster Analytics state configuration on node test1
ERROR: Fail to clean Cluster Analytics state configuration, Cluster Analytics daemon is running on node test1
• If the cluster is not configured and the cluster analytics daemon is not running on any node listed in the
$SGCONF/cmclnodelist file, then the cmcaadmin cleanup command displays the following
message:
• If the cluster is configured and down but cluster analytics daemon is halted, then the cmcaadmin
cleanup command displays the following message:
• If the cluster is configured and down but cluster analytics daemon is running, then the cmcaadmin
cleanup command displays the following messages:
cmcaadmin: Cleaning Cluster Analytics state configuration on node test1
ERROR: Fail to clean Cluster Analytics state configuration, Cluster Analytics daemon is running on node test1
or
NOTE:
Limitation
The data retrieval operation on cluster event database file is not supported.
344 Limitation
Integrating Application Tuner Express
HPE Application Tuner Express (HPE-ATX) is an utility that enables applications achieve maximum
performance while running on larger x86 servers. For more information about HPE ATX see, HPE ATX
documentation.
You can integrate ATX with Serviceguard to run applications with ATX. In a Serviceguard environment,
you can configure the applications as Serviceguard packages.
Procedure
NOTE: You can apply PEV_ATX parameter when the package is online but the changes are applied
after the package restarts.
6. View the package log information for any errors or warnings when the application starts with HPE ATX.
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.
where service_cmd is the executable specified in the package configuration file by means of the
service_cmd parameter. The service selected must have the default service_restart value (none).
kill <PID>
3. To view the package status, enter
cmviewcl -v
4. Halt the package, then move it back to the primary node using the cmhaltpkg, cmmodpkg, and
cmrunpkg commands:
cmhaltpkg <PackageName>
cmrunpkg -v <PackageName>
Depending on the specific databases you are running, perform the appropriate database recovery.
You can also test the package manager using generic resources. Perform the following procedure for
each package on the cluster:
2. Set the status of generic resource to DOWN using the following command:
cmsetresource -r <res1> –s down
4. Move the package back to the primary node (see Moving a Failover Package ).
NOTE: If there was a monitoring script configured for this generic resource, then the monitoring script
would also be attempting to set the status of the generic resource.
cmviewcl -v
You should be able to observe that the powered down node is halted, and that its packages have been
correctly switched to other nodes.
cmviewcl -v
The node should be recognized by the cluster, but its packages should not be running.
cmmodpkg -e -n <originalnode>
cmrunpkg <pkgname>
Depending on the specific databases you are running, perform the appropriate database recovery.
6. Repeat this procedure for all nodes in the cluster one at a time.
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. For information about disk
monitoring, see Creating a Disk Monitor Configuration on page 254. In addition, the following should
be monitored for errors or warnings of all kinds:
• CPUs
• Memory
• NICs
• 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.
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.
Once all nodes have logged this message, use a command such as the following to specify the new
cluster lock LUN:
cmdisklock reset /dev/sda1
CAUTION: You are responsible for determining that the device is not being used by LVM or any
other subsystem on any node connected to the device before using cmdisklock. If you use
cmdisklock without taking this precaution, you could lose data.
NOTE: cmdisklock is needed only when you are repairing or replacing a lock LUN; see the
cmdisklock (1m) manpage for more information.
Serviceguard checks the lock LUN every 75 seconds. After using the cmdisklock command, review the
syslog file of an active cluster node for not more than 75 seconds. By this time you should see a
message showing that the lock disk is healthy again.
• lun, if used, specifies that a LUN, rather than a volume group, is to be operated on.
• -v, if used, specifies verbose output detailing the actions the script performs and their status.
• -f <filename_path>, if used, specifies that the name of the DSFs to be operated on are listed in
the file specified by <filename_path>. Each DSF must be listed on a separate line.
• <list of DSFs> specifies one or more DSFs on the command line, if -f <filename_path> is not
used.
Examples
The following command will clear all the PR reservations registered with the key abc12 on the set of
LUNs listed in the file /tmp/pr_device_list
NOTE:
Because the keyword lun is not included, the device is assumed to be a volume group.
Procedure
Now Serviceguard will detect that the MAC address (LLA) of the card has changed from the value stored
in the cluster binary configuration file, and it will notify the other nodes in the cluster of the new MAC
address. The cluster will operate normally after this.
Hewlett Packard Enterprise recommends that you update the new MAC address in the cluster binary
configuration file by re-applying the cluster configuration. Use the following steps for online
reconfiguration:
1. Use the cmgetconf command to obtain a fresh ASCII configuration file, as follows:
cmapplyconf -C config.conf
This procedure updates the binary file with the new MAC address and thus avoids data inconsistency
between the outputs of the cmviewconf and ifconfig commands.
IMPORTANT: Make sure you read the latest version of the HPE Serviceguard Quorum Server
Release Notes before you proceed. You can find them at http://www.hpe.com/info/linux-
serviceguard-docs (Select HP Serviceguard Quorum Server Software). You should also consult
the Quorum Server white papers at the same location.
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 SUSE distribution:
/opt/qs/bin/qs -update
• Create a package in another cluster for the Quorum Server, as described in the Release Notes for
your version of Quorum Server. They can be found at http://www.hpe.com/info/linux-
serviceguard-docs (Select HP Serviceguard Quorum Server Software).
5. All nodes in all clusters that were using the old quorum server will connect to the new quorum server.
Use the cmviewcl -v command from any cluster that is using the quorum server to verify that the
nodes in that cluster have connected to the QS.
7. To check that the quorum server has been correctly configured and to verify the connectivity of a node
to the quorum server, you can execute the following command from your cluster nodes as follows:
The command will output an error message if the specified nodes cannot communicate with the
quorum server.
CAUTION: Make sure that the old system does not rejoin the network with the old IP address.
NOTE: While the old quorum server is down and the new one is being set up:
• If there is a node or network failure that creates a 50-50 membership split, the quorum server will not
be available as a tie-breaker, and the cluster will fail.
Troubleshooting Approaches
Cause
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:
• Using cmviewcl
NOTE:
Many other products running on Linux in addition to Serviceguard use the syslog file to save messages.
Refer to your Linux documentation for additional information on using the system log.
Ensure that the files are complete and correct according to your configuration planning worksheets.
cmcheckconf checks:
It doesn't check:
• ifconfig can be used to examine the LAN configuration. This command lists all IP addresses
assigned to each LAN interface card.
• arp -a can be used to check the arp tables.
• cmscancl can be used to test IP-level connectivity between network interfaces in the cluster.
Solving Problems
Problems with Serviceguard may be of several types. The following is a list of common categories of
problem:
host ftsys9
1. Warning: cmcld was unable to run for the last <n.n> seconds. Consult the
Managing Serviceguard manual for guidance on setting MEMBER_TIMEOUT, and
information on cmcld.
This means that cmcld was unable to get access to a CPU for a significant amount of time. If this
occurred while the cluster was re-forming, one or more nodes could have failed. Some commands
(such as cmhaltnode (1m), cmrunnode (1m), cmapplyconf (1m)), cause the cluster to re-
form, so there's a chance that running one of these commands could precipitate a node failure; that
chance is greater the longer the hang.
What to do: If this message appears once a month or more often, increase MEMBER_TIMEOUT to
more than 10 times the largest reported delay. For example, if the message that reports the largest
number says that cmcld was unable to run for the last 1.6 seconds, increase MEMBER_TIMEOUT to
more than 16 seconds.
2. This node is at risk of being evicted from the running cluster. Increase
MEMBER_TIMEOUT.
For more information, including requirements and recommendations, see the MEMBER_TIMEOUT
discussion under Cluster Configuration Parameters on page 111.
You can use the following commands to check the status of your disks:
Following such a failure, since the control script is terminated, some of the package’s resources may be
left activated. Specifically:
In this kind of situation, Serviceguard will not restart the package without manual intervention. You must
clean up manually before restarting the package. Use the following steps as guidelines:
1. Perform application specific cleanup. Any application specific actions the control script might have
taken should be undone to ensure successfully starting the package on an alternate node. This might
include such things as shutting down application processes, removing lock files, and removing
temporary files.
2. Ensure that package IP addresses are removed from the system. This step is accomplished via the
cmmodnet(1m) command. First determine which package IP addresses are installed by inspecting
the output resulting from running the ifconfig command. If any of the IP addresses specified in the
package control script appear in the ifconfig output under the inet addr: in the ethX:Y block,
use cmmodnet to remove them:
where <ip-address> is the address indicated above and <subnet> is the result of masking the <ip-
address> with the mask found in the same line as the inet address in the ifconfig output.
3. Ensure that package volume groups are deactivated. First unmount any package logical volumes
which are being used for file systems. This is determined by inspecting the output resulting from
running the command df -l. If any package logical volumes, as specified by the LV[] array
variables in the package control script, appear under the “Filesystem” column, use umount to
unmount them:
Next, deactivate the package volume groups. These are specified by the VG[] array entries in the
package control script.
vgchange -a n <volume-group>
cmmodpkg -e <package-name>
If after cleaning up the node on which the timeout occurred it is desirable to have that node as an
alternate for running the package, remember to re-enable the package to run on the node:
• reboot
• Kernel Oops
• Hangs
• Power failures
You can use the following commands to check the status of your network and subnets:
• ifconfig - to display LAN status and check to see if the package IP is stacked on the LAN card.
Since your cluster is unique, there are no cookbook solutions to all possible problems. But if you apply
these checks and commands and work your way through the log files, you will be successful in identifying
and solving problems.
NOTE:
See the
HPE Serviceguard Quorum Server Version A.12.00.30 Release Notes
for information about configuring the Quorum Server. Do not proceed without reading the Release Notes
for your version.
Timeout Problems
The following kinds of message in a Serviceguard node’s syslog file may indicate timeout problems:
Unable to set client version at quorum server 192.6.7.2: reply timed out
Probe of quorum server 192.6.7.2 timed out
These messages could be an indication of an intermittent network problem; or the default quorum server
timeout may not be sufficient. You can set the QS_TIMEOUT_EXTENSION to increase the timeout, or
you can increase the MEMBER_TIMEOUT value. See Cluster Configuration Parameters on page 111
for more information about these parameters.
A message such as the following in a Serviceguard node’s syslog file indicates that the node did not
receive a reply to its lock request on time. This could be because of delay in communication between the
node and the Quorum Server or between the Quorum Server and other nodes in the cluster:
Attempt to get lock /sg/cluser1 unsuccessful. Reason:
request_timedout
Messages
The coordinator node in Serviceguard sometimes sends a request to the quorum server to set the lock
state. (This is different from a request to obtain the lock in tie-breaking.) If the quorum server’s connection
to one of the cluster nodes has not completed, the request to set may fail with a two-line message like the
following in the quorum server’s log file:
Oct 008 16:10:05:0: There is no connection to the applicant
2 for lock /sg/lockTest1
Oct 08 16:10:05:0:Request for lock /sg/lockTest1 from
applicant 1 failed: not connected to all applicants.
This condition can be ignored. The request will be retried a few seconds later and will succeed. The
following message is logged:
Oct 008 16:10:06:0: Request for lock /sg/lockTest1
succeeded. New lock owners: 1,2.
NOTE:
If VMware commands cannot be run on the VM node, Serviceguard sets the value of host_io_timeout
parameter to 70 seconds.
• For live assistance, go to the Contact Hewlett Packard Enterprise Worldwide website:
www.hpe.com/assistance
• To access documentation and support services, go to the Hewlett Packard Enterprise Support Center
website:
www.hpe.com/support/hpesc
Information to collect
Accessing updates
• Some software products provide a mechanism for accessing software updates through the product
interface. Review your product documentation to identify the recommended software update method.
• To download product updates, go to either of the following:
◦ Hewlett Packard Enterprise Support Center Get connected with updates page:
www.hpe.com/support/e-updates
◦ Updates location:
http://www.hpe.com/downloads/software
• To view and update your entitlements, and to link your contracts and warranties with your profile, go to
the Hewlett Packard Enterprise Support Center More Information on Access to Support Materials
page:
www.hpe.com/support/AccessToSupportMaterials
Websites
Website Link
Related documents
For additional information, see the latest documents at www.hpe.com/info/linux-serviceguard-docs:
Websites 363
(for updated information on supported hardware and Linux distributions)
Remote support
Remote support is available with supported devices as part of your warranty or contractual support
agreement. It provides intelligent event diagnosis, and automatic, secure submission of hardware event
notifications to Hewlett Packard Enterprise, which will initiate a fast and accurate resolution based on your
product’s service level. Hewlett Packard Enterprise strongly recommends that you register your device for
remote support.
For more information and device support details, go to the following website:
www.hpe.com/info/insightremotesupport/docs
Documentation feedback
Hewlett Packard Enterprise is committed to providing documentation that meets your needs. To help us
improve the documentation, send any errors, suggestions, or comments to Documentation Feedback
(docsfeedback@hpe.com). When submitting your feedback, include the document title, part number,
edition, and publication date located on the front cover of the document. For online help content, include
the product name, product version, help edition, and publication date located on the legal notices page.
Designing for high availability means reducing the amount of unplanned and planned downtime that users
will experience. Unplanned downtime includes unscheduled events such as power outages, system
failures, network failures, disk crashes, or application failures. Planned downtime includes scheduled
events such as scheduled backups, system upgrades to new OS revisions, or hardware replacements.
Two key strategies should be kept in mind:
1. Design the application to handle a system reboot or panic. If you are modifying an existing application
for a highly available environment, determine what happens currently with the application after a
system panic. In a highly available environment there should be defined (and scripted) procedures for
restarting the application. Procedures for starting and stopping the application should be automatic,
with no user intervention required.
2. The application should not use any system-specific information such as the following if such use would
prevent it from failing over to another system and running properly:
• Do not require user intervention to reconnect when a connection is lost due to a failed server.
• Where possible, warn users of slight delays due to a failover in progress.
• Minimize the reentry of data.
• Engineer the system for reserve capacity to minimize the performance degradation experienced by
users.
• It must be able to restart and recover on the backup system (or on the same system if the application
restart option is chosen).
• It must be able to restart if it fails during the startup and the cause of the failure is resolved.
Application administrators need to learn to startup and shutdown applications using the appropriate HA
commands. Inadvertently shutting down the application directly will initiate an unwanted failover.
Application administrators also need to be careful that they don't accidently shut down a production
instance of an application rather than a test instance in a development environment.
A mechanism to monitor whether the application is active is necessary so that the HA software knows
when the application has failed. This may be as simple as a script that issues the command ps -ef |
grep xxx for all the processes belonging to the application.
To reduce the impact on users, the application should not simply abort in case of error, since aborting
would cause an unneeded failover to a backup system. Applications should determine the exact error and
take specific action to recover from the error rather than, for example, aborting upon receipt of any error.
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.
• 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.
Applications should not reference official hostnames or IP addresses. The official hostname and
corresponding IP address for the hostname refer to the primary LAN card and the stationary IP address
for that card. Therefore, any application that refers to, or requires the hostname or primary IP address
may not work in an HA environment where the network identity of the system that supports a given
application moves from one system to another, but the hostname does not move.
One way to look for problems in this area is to look for calls to gethostname(2) in the application. HA
services should use gethostname() with caution, since the response may change over time if the
application migrates. Applications that use gethostname() to determine the name for a call to
gethostbyname(3) should also be avoided for the same reason. Also, the gethostbyaddr() call
may return different answers over time if called with a stationary IP address.
Instead, the application should always refer to the application name and relocatable IP address rather
than the hostname and stationary IP address. It is appropriate for the application to call
gethostbyname(3), specifying the application name rather than the hostname. gethostbyname(3)
will pass in the IP address of the application. This IP address will move with the application to the new
node.
However, gethostbyname(3) should be used to locate the IP address of an application only if the
application name is configured in DNS. It is probably best to associate a different application name with
each independent HA service. This allows each application and its IP address to be moved to another
node without affecting other applications. Only the stationary IP addresses should be associated with the
hostname in DNS.
• 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 (that is, the application is not interactive).
When discussing highly available systems, unplanned failures are often the main point of discussion.
However, if it takes 2 weeks to upgrade a system to a new revision of software, there are bound to be a
large number of complaints.
The following sections discuss ways of handling the different types of planned downtime.
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:
• Install the application, database, and other required resources on one of the systems. Be sure to
follow Serviceguard rules in doing this:
• Perform some sort of standard test to ensure the application is running correctly. This test can be
used later in testing with Serviceguard. If possible, try to connect to the application through a client.
• Crash the standalone system, reboot it, and test how the application starts up again. Note the
following:
• Try to write a simple script which brings everything up without having to do any keyboard typing.
Figure out what the administrator would do at the keyboard, then put that into the script.
• Try to write a simple script to bring down the application. Again, figure out what the administrator
would do at the keyboard, then put that into the script.
• 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 versus
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.
Hardware Worksheet
=============================================================================
SPU 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 _________
============================================================================
Disk Power:
============================================================================
Tape Backup Power:
============================================================================
Other Power:
OR
==============================================================================
=============================================================================
Unicast An address for a single interface. A packet sent to a unicast address is delivered to
the interface identified by that address.
Anycast An address for a set of interfaces. In most cases these interfaces belong to different
nodes. A packet sent to an anycast address is delivered to one of these interfaces
identified by the address. Since the standards for using anycast addresses are still
evolving, they are not supported in Linux at present.
Multicast An address for a set of interfaces (typically belonging to different nodes). A packet
sent to a multicast address will be delivered to all interfaces identified by that address.
Unlike IPv4, IPv6 has no broadcast addresses; their functions are superseded by multicast.
• The first form is x:x:x:x:x:x:x:x, where the x’s are the hexadecimal values of the eight 16-bit pieces of
the 128-bit address. Example:
2001:fecd:ba23:cd1f:dcb1:1010:9234:4088.
• Some of the IPv6 addresses may contain a long strings of zero bits. In order to make it easy for
representing such addresses textually a special syntax is available. The use of “ ::” indicates that
there are multiple groups of 16-bits of zeros. The “ ::” can appear only once in an address and it can
be used to compress the leading, trailing, or contiguous sixteen-bit zeroes in an address. Example:
fec0:1:0:0:0:0:0:1234can be represented as fec0:1::1234.
• In a mixed environment of IPv4 and IPv6 nodes an alternative form of IPv6 address will be used. It is
x:x:x:x:x:x:d.d.d.d, where the x’s are the hexadecimal values of higher order 96 bits of IPv6 address
and the d’s are the decimal values of the 32-bit lower order bits. Typically IPv4 Mapped IPv6
Unicast Addresses
IPv6 unicast addresses are classified into different types. They are: global aggregatable unicast address,
site-local address and link-local address. Typically a unicast address is logically divided as follows:
Interface identifiers in a IPv6 unicast address are used to identify the interfaces on a link. Interface
identifiers are required to be unique on that link. The link is generally identified by the subnet prefix.
A unicast address is called an unspecified address if all the bits in the address are zero. Textually it is
represented as “::”.
The unicast address ::1 or 0:0:0:0:0:0:0:1 is called the loopback address. It is used by a node to
send packets to itself.
Example:
Example:
::ffff:192.168.0.1
3 13 8 24 16 64 bits
where
FP = Format prefix. Value of this is “001” for Aggregatable Global unicast addresses.
TLA ID = Top-level Aggregation Identifier.
RES = Reserved for future use.
NLA ID = Next-Level Aggregation Identifier.
SLA ID = Site-Level Aggregation Identifier.
Interface ID = Interface Identifier.
Link-Local Addresses
Link-local addresses have the following format:
1111111010 0 interface ID
Link-local address are supposed to be used for addressing nodes on a single link. Packets originating
from or destined to a link-local address will not be forwarded by a router.
Site-Local Addresses
Site-local addresses have the following format:
Multicast Addresses
A multicast address is an identifier for a group of nodes. Multicast addresses have the following format:
“FF” at the beginning of the address identifies the address as a multicast address.
The “flags” field is a set of 4 flags “000T”. The higher order 3 bits are reserved and must be zero. The last
bit ‘T’ indicates whether it is permanently assigned or not. A value of zero indicates that it is permanently
assigned otherwise it is a temporary assignment.
The “scop” field is a 4-bit field which is used to limit the scope of the multicast group. For example, a
value of ‘1’ indicates that it is a node-local multicast group. A value of ‘2’ indicates that the scope is link-
local. A value of “5” indicates that the scope is site-local.
The “group ID” field identifies the multicast group. Some frequently used multicast groups are the
following:
All Node Addresses = FF02:0:0:0:0:0:0:1 (link-local)
All Router Addresses = FF02:0:0:0:0:0:0:2 (link-local)
All Router Addresses = FF05:0:0:0:0:0:0:2 (site-local)
NOTE: This restriction applies to cluster configuration, not package configuration: it does not affect the
number of IPv6 relocatable addresses of the same scope type (site-local or global) that a package can
use on an interface.
• You can set the status/value of a simple/extended resource respectively using the
cmsetresource(1m) command.
Template Scripts
Hewlett Packard Enterprise provides a monitoring script template. The template provided by Hewlett
Packard Enterprise is:
generic_resource_monitor.template
• Choose the monitoring interval based on how quick the failures must be detected by the application
packages configured with a generic resource.
• Get the status/value of a generic resource using cmgetresource before setting its status/value.
See Getting and Setting the Status/Value of a Simple/Extended Generic Resource on page 134 and
the cmgetresource(1m) and cmsetresource(1m) manpages.
See Using the Generic Resources Monitoring Service.
• Monitoring scripts can be launched through the services functionality that is available in packages, as
indicated by service_name, service_cmd, and service_halt_timeout. This makes the scripts highly
available, since Serviceguard monitors them and is the recommended approach.
• Monitoring scripts can also be launched through external_script or external_pre_script as part of the
package.
• Monitoring scripts can also be launched outside of the Serviceguard environment, init, rc scripts, etc.
(Serviceguard does not monitor them).
• The monitoring scripts for all the resources in a cluster of type before_package_start can be
configured in a single multi-node package by using the services functionality and any packages that
require the resources can mention the generic resource name in their package configuration file.
This makes the scripts highly available, since Serviceguard monitors them and is the recommended
approach. The monitoring script has to be configured to run on all the nodes the package is configured
to run on. See the recommendation and an example below.
For explanation of generic resource parameters, see under Package Parameter Explanations.
Hewlett Packard Enterprise recommends you to:
• Create a single multi-node package and configure all the monitoring scripts for generic resources of
type before_package_start in this multi-node package using the services functionality.
• Mention the generic resource name in the application package and configure the generic resource as
before_package_start.
• Configure a dependency for better readability, where the application package is dependent on this
multi-node package.
For example:
package_name generic_resource_monitors
package_type multi_node
service_name lan1_monitor
service_cmd $SGCONF/generic_resource_monitors/lan1.sh
service_name cpu_monitor
service_cmd $SGCONF/generic_resource_monitors/cpu_monitor.sh
The above example shows a sample multi-node package named generic_resource_monitors and
has two monitoring scripts configured — one each to monitor a LAN and CPU. These monitoring scripts
will monitor the LAN interface, CPU and sets the status of the generic resources defined in them
accordingly.
Consider a package pkg1 having the LAN resource configured as before_package_start and the
monitoring script for this is running in the multi-node package generic_resource_monitors. A
dependency is created such that the multi-node package must be UP in order to start the package pkg1.
Once the multi-node package is started, the monitoring of resource 'lan1' is started as part of the
generic_resource_name lan1
generic_resource_evaluation_type before_package_start
dependency_name generic_resource_monitors
dependency_condition generic_resource_monitors = up
dependency_location same_node
Similarly, consider another package pkg2 that requires the 'CPU' to be configured as
before_package_start.
package_name pkg2
package_type failover
generic_resource_name cpu
generic_resource_evaluation_type before_package_start
generic_resource_name lan1
generic_resource_evaluation_type before_package_start
dependency_name generic_resource_monitors
dependency_condition generic_resource_monitors = up
dependency_location same_node
Thus, the monitoring scripts for all the generic resources of type before_package_start are
configured in one single multi-node package and any package that requires this generic resource can just
configure the generic resource name.
If a common resource has to be monitored in multiple packages, the monitoring scripts can be configured
in the multi-node package described above and multiple packages can define the same generic resource
name in their package configuration files as seen for the generic resource 'lan1' in the above example.
The figure depicts a multi-node package containing two monitoring scripts configured — one to monitor a
lan and other to monitor a CPU. The two packages are configured with the generic resource names and
are dependent on the multi-node package.
# **********************************************************************
# * *
# * This script is a template that can be used as a service when *
# * creating a customer defined sample monitor script for *
# * generic resource(s). *
# * *
# * Once created, this script can be configured into the package *
# * configuration file as a service with the "service_name", *
# * "service_cmd" and "service_halt_timeout" parameters. *
# * Note that the respective "sg/service" and the *
# * "sg/generic_resource" modules need to be specified in the package *
# * configuraton file in order to configure these parameters. *
# * *
# * *
# * --------------------------------- *
# * U T I L I T Y F U N C T I O N S *
# * --------------------------------- *
# * The following utility functions are sourced in from $SG_UTILS *
# * ($SGCONF/scripts/mscripts/utils.sh) and available for use: *
# * *
# * sg_log <log level> <log msg> *
# * *
# * By default, only log messages with a log level of 0 will *
# * be output to the log file. If parameter "log_level" is *
# * configured in the package configuration file, then log *
# * messages that have a log level that is equal to or *
# * greater than the configured log level will be output. *
# * *
# * In addition, the format of the time stamp is prefixed in *
# * front of the log message. *
# * *
# * *
# **********************************************************************
#
###################################################################
###########################################
if [[ -z $SG_UTILS ]]
then
. /etc/cmcluster.conf
SG_UTILS=$SGCONF/scripts/mscripts/utils.sh
fi
if [[ -f ${SG_UTILS} ]]
then
. ${SG_UTILS}
if (( $? != 0 ))
then
echo "ERROR: Unable to source package utility functions file: ${SG_UTILS}"
exit 1
fi
else
echo "ERROR: Unable to find package utility functions file: ${SG_UTILS}"
exit 1
fi
###########################################
# Source the package environment variables.
###########################################
#########################################################################
#
# start_command
#
# This function should define actions to take when the package starts
#
#########################################################################
function start_command
{
sg_log 5 "start_command"
return 0
}
#########################################################################
#
# stop_command
#
# This function should define actions to take when the package halts
#
#
function stop_command
{
sg_log 5 "stop_command"
exit 1
}
################
# main routine
################
#########################################################################
#
# Customer defined monitor script should be doing following
# functionality.
#
# When the package is halting, cmhaltpkg will issue a SIGTERM signal to
# the service(s) configured in package. Use SIGTERM handler to stop
# the monitor script.
#
# Monitor the generic resource configured in package using customer
# defined tools and set the status or value to generic resource by using
# "cmsetresource" command. When setting the status or value get the current
# status or value using "cmgetresource" and set only if they are different.
#
#########################################################################
start_command $*
while [ 1 ]
do
• You can set the status/value of a simple/extended resource respectively using the
cmsetresource(1m) command.
• Choose the monitoring interval based on how quick the failures must be detected by the application
packages configured with a cluster generic resource.
• Set the status or the value of a generic resource using cmgetresource before setting its status or
value.
• Set the status or value only if it has changed.
For more information, see Getting and Setting the Status/Value of a Simple/Extended Generic
Resource, Using the Cluster Generic Resources Monitoring Serviceand the cmgetresource(1m)
and cmsetresource(1m) manpages.
Template of a Monitoring Script.
Monitoring Script Template — $SGCONF/cluster_generic_resource_monitor.template
# **********************************************************************
# * *
# * This script is a template that can be used as a cluster generic *
# * resource command when creating a customer defined sample monitor *
# * script for cluster generic resource(s). *
# * *
# * Once created, this script can be specified in the cluster *
# * configuration file as a generic resource command with the *
# * "GENERIC_RESOURCE_NAME ", GENERIC_RESOURCE_TYPE and *
# * "GENERIC_RESOURCE_CMD" parameters. *
# * *
###########################################
# Initialize the variables & command paths
###########################################
#set the path for the command rm
RM=<PATH>
RES_NAME=$GENERIC_RESOURCE_NAME
RES_SCOPE=$GENERIC_RESOURCE_SCOPE
RES_TYPE=$GENERIC_RESOURCE_TYPE
RES_RESTART_COUNT=$SG_RESTART_COUNT
RES_HALT_TIMEOUT=$GENERIC_RESOURCE_HALT_TIMEOUT
###########################
# Source utility functions.
###########################
if [[ -z $SG_UTILS ]]
then
. /etc/cmcluster.conf
SG_UTILS=$SGCONF/scripts/mscripts/utils.sh
fi
#########################################################################
#
# start_command
#
# This function should define actions to take when the cluster starts
#
#########################################################################
function start_command
{
echo "start_command"
return 0
}
#########################################################################
#
# stop_command
#
# This function should define actions to take when the cluster halts
#
#
#########################################################################
function stop_command
{
echo "stop_command"
exit 1
}
################
# main routine
################
###########################################################################
start_command $*
while [ 1 ]
do
• Attain high availability (HA) or disaster recovery (DR) protection for critical workloads.
• Automate or program the cluster, package, or workload deployment operations.
• Call the REST APIs from the datacenter level Orchestration and automation tools for infrastructure
management.
• Manage Serviceguard cluster through the Custom Graphical User Interfaces (GUI). You can program
the APIs into custom UI and use them to configure, monitor, or manage clusters, packages and
workloads.
For more information on the REST API see, the HPE Serviceguard REST API Reference Guide available
at http://www.hpe.com/info/linux-serviceguard-docs.
NOTE:
For details about Sybase and Oracle toolkits, see HPE Serviceguard for Linux A.12.00.40 Release Notes
at http://www.hpe.com/info/linux-serviceguard-docs.
Network Heartbeat
Stationary
Subnet
IP monitor
Polling target
Miscellaneous
Interface
Table Continued
General Cmd
Service
Miscellaneous
License
Table Continued
Workload overview
A workload is a set of packages in a cluster that are logically grouped to form a single resource. Workload
provides a simplified view of multiple packages under single resource pane in the Serviceguard Manager.
You can create and deploy the following workloads types:
Oracle Single Instance DB
Workload for single instance of database running on Oracle.
Oracle Single Instance DB using ASM
Workload for single instance of database running on Oracle using Automatic Storage Management
(ASM).
Oracle Single Instance DB using Data Guard
Workload for single instance of database running on Oracle and deployed on Oracle Data Guard.
Oracle Single Instance DB using ASM & Data Guard
Workload for single instance of database running on Oracle using Automatic Storage Management
(ASM) and deployed on Oracle Data Guard.
For more information about Oracle single instance, Automatic Storage Management (ASM), and Oracle
Data Guard see, https://docs.oracle.com/.
From workload page, you can complete the following tasks: