HP Serviceguard Toolkits for Database Replication Solutions manual

Page 36

When primary and standby packages are in the same cluster

Figure 12 Primary and Standby Packages in the Same Cluster

In this configuration, Figure 12 (page 36), DB2 primary database is configured in a volume group shared between Node1 and Node2. The standby database is configured in a volume group shared between Node3 and Node4. HADR is configured between primary and standby database. The DB2 database and the HADR are packaged using the DB2 HADR toolkit.

Two separate packages are created; one each for primary and standby database. Primary package is configured to run either on Node1 or on Node2 and is currently running on Node2. If the primary package fails on Node 2, then it fails over to Node1. Similarly, the standby package is configured to run either on Node3 or Node4 and is currently running on Node3. If the standby package fails on Node3, it fails over to Node4.

The primary database package manages the primary database and the primary HADR. Similarly, the standby database package manages the standby database and the standby HADR. Also, the standby package automatically takes over the role of the primary database, if the primary database fails or the node on which the primary database is currently running crashes. A role switch operation can be performed to configure the primary and secondary packages to restore the original role of the databases. It is performed as soon as the failed database comes back online and the status becomes “peer”.

IBM recommends that the standby must be started before the primary. Also, the toolkit does not perform any role takeover when the primary package is halted using the cmhaltpkg command. The standby package takes over the role only if the primary package fails or if the primary node crashes.

NOTE: You can also configure the DB2 HADR in two node configuration. This configuration allows only role management, role takeover, and role switch and should not be configured to failover the package.

In this scenario, the DB2 HADR toolkit supports the following events:

NOTE: Packages in Event 1–4 are initially in the “Online” state. The Online state refers to the state where both the packages are up and running and the primary HADR send logs to the standby HADR, and both databases are in the “Peer” state.

Event 1: Standby database or HADR goes down

36 Serviceguard toolkit for DB2 High Availability Disaster Recovery

Image 36
Contents HP Part Number Published August Edition Page Contents Glossary Index Introduction Overview AdvantagesSupported configuration DependenciesSingle-instance Oracle database Cmmakepkg -i pkgasciifile -m modulefilename outputfilename RAC environment RAC environmentServiceguard toolkit for Oracle Data Guard Data Guard replication between RAC primary and RAC standby Continentalclusters environment Continentalclusters environment Metrocluster and extended distance cluster environments Supported configuration Data Guard setup in an EDC environment Three data center configuration Configuring multiple instances of Oracle Data Guard Multiple Data Guard instances in each Serviceguard clusterSetting up Oracle Data Guard toolkit Installing and uninstalling Oracle Data Guard toolkit# swinstall -s depot path High availability for data guard broker# swlist -l product T2259AA Files for the ADF module Activestandby Configuring Oracle Data Guard toolkit Package attributesSingle-instance environment For example, /etc/cmcluster/pkg/dgpkgSetting up Oracle Data Guard toolkit #ecmt/oracle/oracle/LISTENERRESTART Servicefailfastenabled no servicehalttimeout RAC environment For example, /etc/cmluster/pkg/racdgpkgWhere ocmnp is the Smnp package for Oracle CLusterware Adding the package to the Serviceguard cluster Maintaining Oracle Data Guard toolkitCluster verification for Oracle Data Guard toolkit Single-instance environmentTroubleshooting Pkg.conf commandLimitations Startstandbyasprimary to yes Prerequisites Using the DB2 Hadr toolkit Supported configurationWhen primary and standby packages are in the same cluster Event 1 Standby database or Hadr goes downEvent 2 Primary package fails When primary and standby packages are in different clusters Primary and Standby Packages in Different ClustersCreating packages To provide high availability only to primary databaseGo to the /etc/cmcluster/hadrprimary directory Cmmakepkg -m ecmt/db2/db2 -m tkit/db2hadr/db2hadr pkg.confInstancename Hadrip Managing packages Running packagesMaintaining packages And, $ cmmodpkg -e hadrpkgHalting packages # cmhaltpkg packagenameHost key verification failed. Lost connection Limitations How to contact HP Information to collect before contacting HPWarranty information HP authorized resellersDocumentation feedback Related information Typographic conventionsTIP Db2 get db cfg for db2 database name grep -i hard Node3# /usr/bin/ssh-keygen -t rsaNode3# /usr/bin/ssh-keygen -t dsa Node2# /usr/bin/ssh-keygen -t rsaPage To add a new key to/home/user/.ssh/knownhosts Page Glossary Index