Disassociating a VIP from a database within a Mutual Failover Db2 instance
You can disassociate a virtual IP address (VIP) from a database in a Mutual Failover 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.
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 name that is to be assigned a VIP within the Mutual Failover Db2 instance.
- <instance_name> is the name of the Db2 instance on the Pacemaker-managed Linux cluster.
- <partition_number> is the number assigned to the target partition on the cluster.
Procedure
Examples
The following example shows the command syntax and output from disassociating a VIP for the
primary host,
heat-2
, from a the Db2 instance db2inst1
(see step
1):(root@heat-2) /root
$ /db2hamf/db2inst1/sqllib/bin/db2cm -delete -primaryVIP -partition 0 -instance db2inst1
Deleted resource db2_db2inst1_0-VIP 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):(root@heat-2) /root
$ /db2hamf/db2inst1/sqllib/bin/db2cm -list
Cluster Status
Domain information:
Domain name = heat
Pacemaker version = 2.1.2-4.db2pcmk.el8
Corosync version = 3.1.6
Current domain leader = heat-2
Number of nodes = 2
Number of resources = 4
Node information:
Name State
---------------- --------
heat-2 Online
heat-1 Online
Resource Information:
Resource Name = db2_heat-1_eth0
State = Online
Managed = true
Resource Type = Network Interface
Node = heat-1
Interface Name = eth0
Resource Name = db2_heat-2_eth0
State = Online
Managed = true
Resource Type = Network Interface
Node = heat-2
Interface Name = eth0
Resource Name = db2_db2inst1_0
State = Online
Managed = true
Resource Type = Partition
Instance = db2inst1
Partition = 0
Current Host = heat-2
Resource Name = db2_db2inst1_0-mnt_db2hamf
State = Online
Managed = true
Resource Type = File System
Device = "/dev/sdb"
Mount Point = "/db2hamf"
File System Type = ext3
Mount Options = \
Current Host = heat-2