Disassociate a primary VIP from an existing HADR database of an instance

You can disassociate a virtual IP address (VIP) from a database in an HADR Db2 instance by using the Db2 Cluster Manager (db2cm) utility.

About this task

Important: To run the db2cm utility as the root user, ensure the DB2INSTANCE environment variable is set to the instance owner.
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 name that is to be assigned a VIP within the HADR Db2® instance.
  • <database_name> is the name of the Db2 database.
  • <instance_name> is the name of the Db2 instance on the cluster.
  • <partition_number> is the number assigned to the partition associated with the VIP.

Procedure

  1. As the root user, remove the VIP for the primary host in the Db2 instance:
    ./sqllib/bin/db2cm -delete -primaryVIP -db <database_name> -instance <instance_name>
  2. As the root user, verify that the resource has been deleted successfully:
    ./sqllib/bin/db2cm -status

Examples

The following example shows the command syntax and output from disassociating a VIP for the primary host, ignited1, from a the Db2 instance db2inst1 (see step 1):
./sqllib/bin/db2cm -delete -primaryVIP -db GT -instance db2inst1
Primary VIP resource deleted successfully.
The following example shows the command syntax and output from verifying that the VIP resource is removed from the Db2 instance, db2inst1 (see step 2):
./sqllib/bin/db2cm -status 2024-12-10-12.34.47
Cluster Summary:
  * Stack: corosync (Pacemaker is running) 
  * Current DC: pcmk-test-hadr-srv-2 (version 2.1.7-4.db2pcmk.el9.2-75a4166) - partition with quorum  
  * Last updated: Tue Dec 10 12:34:48 2024 on pcmk-test-hadr-srv-1
  * Last change: Tue Dec 10 12:30:27 2024 by root via root on pcmk-test-hadr-srv-1

  * 2 nodes configured
  * 10 resource instances configured

Node List:
  * Online: [ pcmk-test-hadr-srv-1 pcmk-test-hadr-srv-2 ]

Full List of Resources:
  * db2_ethmonitor_pcmk-test-hadr-srv-1_eth1 (ocf:heartbeat:db2ethmon): Started pcmk-test-hadr-srv-1
  * db2_ethmonitor_pcmk-test-hadr-srv-2_eth1 (ocf:heartbeat:db2ethmon): Started pcmk-test-hadr-srv-2
  * db2_pcmk-test-hadr-srv-1_db2inst1_0 (ocf:heartbeat:db2inst): Started pcmk-test-hadr-srv-1
  * db2_pcmk-test-hadr-srv-2_db2inst1_0 (ocf:heartbeat:db2inst): Started pcmk-test-hadr-srv-2
Clone Set: db2_db2inst1_db2inst1_GT-clone [db2_db2inst1_db2inst1_GT] (promotable):
      * Promoted: \[ pcmk-test-hadr-srv-1 \] 
      * Unpromoted: \[ pcmk-test-hadr-srv-2 \]
Clone Set: db2_db2inst1_db2inst1_CORAL-clone [db2_db2inst1_db2inst1_CORAL] (promotable):
      * Promoted: \[ pcmk-test-hadr-srv-1 \] 
      * Unpromoted: \[ pcmk-test-hadr-srv-2 \]
Clone Set: db2_db2inst1_db2inst1_CORAL2-clone [db2_db2inst1_db2inst1_CORAL2] (promotable):
      * Promoted: \[ pcmk-test-hadr-srv-1 \] 
      * Unpromoted: \[ pcmk-test-hadr-srv-2 \]

QDevice Information:

  * Not configured