Install and configure a QDevice quorum

You can install and configure a QDevice quorum to provide assistance with cluster management for a Db2® instance that is running on a Pacemaker-managed Linux cluster.

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 QDevice quorum requires a third host that other hosts in the cluster can connect to via a TCP/IP network. However, the third host does not need to be configured as a part of the cluster. You do not need to install the Db2 software for this operation; the only requirement for the QDevice quorum to function is to install a singular or multiple corosync-qnetd RPMs on it.

Note: The corosync-qnetd RPMs provided also contain debug versions. When you install corosync-qnetd RPMs, you can choose to install the debug version, however, it is not required. The corosync-qnetd RPM must be the version validated by Db2 and downloaded from the IBM site.

About this task

Having a reliable quorum mechanism is essential to a highly available cluster. A QDevice quorum is the best solution for your Db2 instance.

The following placeholders are used in the command statements throughout this procedure. These represent values that you can change to suit your organization:
  • <platform> Use linuxamd64, linuxppc64le, or linux390x64.
  • <OS_distribution> is your Linux operating system (OS). Use either rhel or sles.
  • <architecture> is the chipset you are using. Use x86_64, ppc64le, or s390x.

Procedure

  1. On the primary and standby hosts, ensure that the corosync-qdevice package is installed with the following command:
    rpm -qa | grep corosync-qdevice
  2. If the corosync-qdevice package is not installed, install it:
    • On Red Hat Enterprise Linux (RHEL) systems:
      dnf install <Db2_image>/db2/<platform>/pcmk/Linux/rhel/<architecture>/corosync-qdevice*
    • On SUSE Linux Enterprise Server (SLES) systems:
      zypper install --allow-unsigned-rpm <Db2_image>/db2/<platform>/pcmk/Linux/sles/<architecture>/corosync-qdevice*
  3. On the third host, install the Corosync QNet software:
    • On RHEL systems:
      dnf install <Db2_image>/db2/<platform>/pcmk/Linux/rhel/<architecture>/corosync-qnetd*
      
    • on SLES systems:
      zypper install --allow-unsigned-rpm <Db2_image>/db2/<platform>/pcmk/Linux/sles/<architecture>/corosync-qnetd*
  4. As the root user, set up the QDevice from one of the cluster nodes.
    <Db2_install_path>/bin/db2cm -create -qdevice <hostname>
    Note: Due to corosync requirements, you must configure passwordless root secure shell (SSH) access and enable secure copy protocol (SCP) for the primary, standby, and qdevice hosts. Ensure that you are able to use root passwordless SSH between all hosts, as well as locally on the current host. Passwordless root SSH is only needed for initial configuration, and further configuration changes. Passwordless root SSH is not needed for continued QDevice work.
  5. Run the following corosync command on the primary and standby hosts to verify that the quorum was setup correctly.
    corosync-qdevice-tool -s
  6. Run the following corosync command on the QDevice host to verify that the quorum device is running correctly.
    corosync-qnetd-tool -l

Examples

The following example shows the command syntax and output from running the corosync-qdevice-tool command on the cluster nodes to verify that the quorum device is set up correctly (see step 5) :
[root@cuisses1 ~]# corosync-qdevice-tool -s 
Qdevice information 
------------------- 
Model: 	Net 
Node ID: 	1 
Configured node list: 
0 Node ID = 1 
1 Node ID = 2 
Membership node list: 	1, 2 
Qdevice-net information 
---------------------- 
Cluster name: hadom 
QNetd host: frizzly1:5403 
Algorithm: LMS 
Tie-breaker: Node with lowest node ID 
State: Connected
The following example shows the command syntax and output from running the corosync-qnetd-tool command on the Qdevice Host to verify that the quorum device is running correctly (see step 6):
[root@frizzly1 ~]# corosync-qnetd-tool -l 
Cluster "hadom": 
Algorithm: LMS 
Tie-breaker: Node with lowest node ID 
Node ID 2: 
Client address: 	::ffff:9.21.110.42:55568 
Configured node list: 1, 2 
Membership node list: 1, 2 
Vote: ACK (ACK) 
Node ID 1: 
Client address: 	::ffff:9.21.110.22:51400 
Configured node list: 1, 2 
Membership node list: 1, 2