Removing all resources related to a partition from a cluster domain
You can remove all resources that you have associated with a partition in your Pacemaker-managed Db2 instance by using the Db2 Cluster Manager (db2cm) utility.
Before you begin
Important: In
Db2®
11.5.8 and later, Mutual Failover high
availability is supported when using Pacemaker as the
integrated cluster manager. In Db2
11.5.6 and later, the Pacemaker cluster manager
for automated fail-over to HADR standby databases is packaged and installed with Db2. In Db2
11.5.5, Pacemaker is included and
available for production environments. In Db2
11.5.4, Pacemaker is included as
a technology preview only, for development, test, and proof-of-concept environments.
The removal of the cluster domain involves creating temporary files for logging into the /tmp directory. To accommodate the creation of these files, ensure you have at least 2GB of space in the /tmp directory before proceeding.
About this task
The following placeholders are used in the command statements throughout this procedure. These
represent values that you can change to suit your organization:
- <host1> is the host in your Pacemaker-managed Mutual Failover Db2 instance where the partition resides.
- <partition_number> is a unique number that identifies the database partition server in the Db2 Pacemaker cluster. For more information, see dbpartitionnum.
- <database_name> is the name of the Db2 database.
- <instance_name> is the name of the Db2 instance on the cluster.
- <db2_fs_dir> is the mount point for the file system that is used on the cluster.
- <db2_home_dir> is the directory for your Db2 instance.
Procedure
Examples
The following example shows the command syntax and output from removing all partition-associated
resources from a Pacemaker-managed Db2 instance named
db2inst1
:[root@lcars ~]# <Db2 INSTANCE directory>/sqllib/bin/db2cm -delete -partition 0 -instance db2inst1
Deleted dependent resource db2_db2inst1_0-VIP successfully.
Deleted dependent resource db2_db2inst1_0-instmnt_db2hamf successfully.
Deleted dependent resource db2_db2inst1_0-mnt_logpath successfully.
Deleted resource db2_db2inst1_0 successfully.
Resources for partition 0 on instance db2inst1 deleted successfully.
The following example shows the command syntax and output from verifying that all
partition-associated resources have been removed from a Pacemaker-managed Db2 instanced named
db2inst1
:[root@lcars ~]# <Db2 INSTANCE directory>/sqllib/bin/db2cm -list
Cluster Status
Domain information:
Domain name = xdom
Pacemaker version = 2.1.2-4.db2pcmk.el8
Corosync version = 3.1.6
Current domain leader = lcars-srv-2
Number of nodes = 2
Number of resources = 2
Node information:
Name name State
---------------- --------
lcars-srv-1 Online
lcars-srv-2 Online
Resource Information:
Resource Name = db2_lcars-srv-1_eth0
State = Online
Managed = true
Resource Type = Network Interface
Node = lcars-srv-1
Interface Name = eth0
Resource Name = db2_lcars-srv-2_eth0
State = Online
Managed = true
Resource Type = Network Interface
Node = lcars-srv-2
Interface Name = eth0