Remove all resources related to an instance from the cluster domain
You can use the Db2 Cluster Manager (db2cm) utility to keep a Pacemaker-managed Db2 HADR cluster intact after removing all resources from the cluster domain. These resources include the Db2 instance, Db2 database, Ethernet adapters, and all constraints.
Procedure
Examples
The following example shows the command syntax and output from deleting the Db2 instance
db2inst1
from a Pacemaker-managed HADR cluster, ignited1
(see step
1):[root@ignited1 ~]# ./sqllib/bin/db2cm -delete -instance db2inst1 -host pcmk-test-srv-1
Deleted resource for HADRDB on db2inst1 successfully.
Deleted primary VIP resource for SAMPLE on db2inst1 successfully.
Deleted standby VIP resource for SAMPLE on db2inst1 successfully.
Deleted resource for SAMPLE on db2inst1 successfully.
Instance resource db2inst1 deleted successfully.
The following example shows the command syntax and output from verifying that the Db2 instance,
db2inst1
is removed from the cluster domain (see step 2):[root@ignited1 ~]#
Stack: corosync
Current DC: ignited1 (version 2.0.2-1.el8-744a30d655) - partition with quorum
Last updated: Tue Mar 10 14:37:55 2020
Last change: Tue Mar 10 14:37:55 2020 by db2inst2 via cibadmin on cuisses1
2 nodes configured
2 resources configured
Online: [ cuisses1 ignited1 ]
Full list of resources:
db2_cuisses1_eth0 (ocf::heartbeat:db2ethmon): Started cuisses1
db2_ignited1_eth0 (ocf::heartbeat:db2ethmon): Started ignited1