Removing a cluster domain

You can remove a cluster domain regardless of its current state.

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 cleanup process involves creating temporary files for logging in to /tmp, so ensure that you have at least 2GB of space in /tmp before proceeding.

About this task

This task involves removing a Pacemaker cluster domain from a Mutual Failover cluster.

Procedure

  1. Clean up your Pacemaker resource and cluster:
    1. As the root user on any one of the cluster hosts, verify that there are resources in the cluster:
      $ <Db2 INSTANCE directory>/sqllib/bin/db2cm -list
    2. As a root user on any one of the cluster hosts, remove all resources and remove the cluster:
      <Db2 INSTANCE directory>/sqllib/bin/db2cm -delete -cluster
      Cluster deleted successfully.
      
    3. Repeat Step 1a to verify that all resources and the cluster have been cleaned up.
      (root@lcars-srv-1) /root
      <Db2 INSTANCE directory>/sqllib/bin/db2cm -list
            Cluster Status
      
      There is no cluster on this host.
      
  2. Uninstall your Db2 database product.
  3. Optional: This procedure does not remove the quorum device daemon on the arbitrator node. If no other clusters are using the quorum device, you can log in to the arbitrator node as root to remove quorum device:
    systemctl stop corosync-qnetd
    rm -rf /etc/corosync/qnetd/nssdb
    

Example

The following example shows the command syntax and result for running the db2cm -list command to see the current status of a Db2 cluster. See step 1.a:
$ <Db2 INSTANCE directory>/sqllib/bin/db2cm -list
      Cluster Status

Domain information:
Domain name               = db2domain
Pacemaker version         = 2.1.2-4.db2pcmk.el8
Corosync version          = 3.1.6
Current domain leader     = lcars-srv-1
Number of nodes           = 2
Number of resources       = 5

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

Resource Name             = db2_db2inst1_0
  State                         = Online
  Managed                       = true
  Resource Type                 = Partition
  Instance                      = db2inst1
  Partition                     = 0
  Current Host                  = lcars-srv-1

Resource Name             = db2_db2inst1_0-instmnt_db2hamf
  State                         = Online
  Managed                       = true
  Resource Type                 = File System
  Device                        = "/dev/sdb"
  Mount Point                   = "/db2hamf"
  File System Type              = ext3
  Mount Options                 = "rw,relatime"
  Current Host                  = lcars-srv-1

Resource Name             = db2_db2inst1_0-mnt_logpath
  State                         = Online
  Managed                       = true
  Resource Type                 = File System
  Device                        = "/dev/sda"
  Mount Point                   = "/logpath"
  File System Type              = ext3
  Mount Options                 = "acl,user_xattr,noauto"
  Current Host                  = lcars-srv-1