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
Event 1: Standby database or HADR goes down
36 Serviceguard toolkit for DB2 High Availability Disaster Recovery