Db2 Pacemaker On RHEL 8.1
Db2 Pacemaker On RHEL 8.1
Db2 Pacemaker On RHEL 8.1
1
Db2 11.5.5
By Subodh Khaire
Thanks to Srikanth Pentyala
Steps
1. Install DB2 on Node 1(db1) and Node 2(db2)
2. Create DB2 (dbp) Instance on db1 and db2
3. Setup HADR databases on db1 and db2 – DB_HADR
4. Setup HADR_PEER_WINDOW to minimum 60 seconds
5. Setup password-less ssh for root and Instance owner (dbp)
6. Install pacemaker software
7. Create Cluster and add instance and database resources
8. Install packages on third host
9. Configure Quorum
Setup
Install Packages
yum -y install binutils
yum -y install cpp
yum -y install dnf
yum -y install gcc-c++
yum -y install ksh
yum -y install libstdc++
yum -y install libstdc++.so.6
yum -y install patch
yum -y install perl
yum -y install perl-Sys-Syslog
yum -y install python2
yum -y install sg3_utils
Install Pacemaker
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-
8.noarch.rpm
tar -zxf Db2_v11.5.5.0_Pacemaker_20201118_RHEL8.1_x86_64.tar.gz
cd /drived/VM_Softwares/Db2_v11.5.4.0_Pacemaker_RHEL8.1/RPMS
dnf install */*.rpm
Edit /etc/hosts
127.0.0.1 localhost.db.com localhost
# Public
192.168.1.101 db1.db.com db1
192.168.1.102 db2.db.com db2
192.168.1.103 db3.db.com db3
Verify HADR
db2pd –db DB_HADR –hadr
OR
./hadr_get_status.sh
/home/dbp/sqllib/adm/db2cm -copy_resources
/drived/VM_Softwares/Db2_v11.5.5.0_Pacemaker_RHEL8.1/Db2agents -host db2
Check the tools (db2ethmon, db2hadr, db2inst) have been copied OK:
ls -alL /usr/lib/ocf/resource.d/heartbeat/db2*
Create Cluster
cd /home/dbp/sqllib/adm
corosync-qnetd-tool –l
Shutdown Primary
Delete Cluster