DB2-HADR-Automation-with-Pacemaker-compressed.pdf - DB2...

This preview shows page 1 - 4 out of 37 pages.

Triton Consulting DB2 HADR Automation with Pacemaker 2 DB2 HADR Automation with Pacemaker Table of Contents Introduction .................................................................................................................................................. 3 Environment Setup ............................................................................................................................... 3 PACEMAKER prerequisites ............................................................................................................................ 4 QDevice quorum mechanism ................................................................................................................ 4 DB2 high availability disaster recovery (HADR) .................................................................................... 5 PACEMAKER installation ............................................................................................................................... 5 Pre-setup checklist ................................................................................................................................ 5 Installation ............................................................................................................................................. 5 Disable the DB2 Fault Monitor ..................................................................................................................... 6 Configure a Clustered Environment .............................................................................................................. 7 Create the Pacemaker cluster and the public network resources ........................................................ 7 Create the instance resource model ..................................................................................................... 7 Check the cluster status ........................................................................................................................ 8 Create a new database .......................................................................................................................... 8 Configure HADR for the new database ................................................................................................. 8 Open the HADR port(s) between the two servers ...................................................................... 10 Start HADR ................................................................................................................................... 11 Create the HADR database resources ................................................................................................. 11 Check the cluster status again ............................................................................................................ 11 Disable the Pacemaker Cluster Resource Management ............................................................................. 13 Enable the Pacemaker Cluster Resource Management ............................................................................. 14 Testing the HADR Cluster ............................................................................................................................ 16 TEST 1: Shut down the standby ........................................................................................................... 16 TEST 2: Shut down the primary ........................................................................................................... 21 Create the VIP resource .............................................................................................................................. 25 Testing Remote Client Connection ............................................................................................................. 26 Open the TCP/IP ports ......................................................................................................................... 26 Catalogue the remote database ......................................................................................................... 26 Connect to the remote database ........................................................................................................ 27 Test the Client Connection in a Failover (with VIP, no ACR) ....................................................................... 28 Test Summary ...................................................................................................................................... 31 Test the Client Connection in a Failover (with VIP and ACR) ...................................................................... 32 Update ACR configuration ................................................................................................................... 32 Resume the test .................................................................................................................................. 33 Test Summary ...................................................................................................................................... 35 Grand Conclusion ........................................................................................................................................ 36 About the Autho r………………………………………………………………………………………………………………………………….. 36 Contact ........................................................................................................................................................ 37
Triton Consulting DB2 HADR Automation with Pacemaker 3 Introduction Pacemaker is an open-source, high availability cluster manager software integrated with DB2 Advanced Edition and DB2 Standard Edition on Linux (no support announced for AIX/Windows). It provides high availability and disaster recovery capabilities for on- premises deployments and non-container cloud environments, such as Amazon Web Service (AWS). And it is meant as the replacement for the old TSAMP technology. Those who have ever tried to automate the HADR failovers in the past, using TSAMP as the cluster manager, know how cumbersome this technology is and how difficult it has been working with it. From past experiences, it got stuck or corrupted many times so thoroughly that the only way to fix the problem was to completely remove the cluster (i.e. drop the TSAMP Domain) and recreate it from a scratch. This is hardly a practice suitable for production environments, the native ground for TSAMP. In some cases, it was actually easier to drop TSAMP altogether and live on without the automated failovers. Therefore, there are high hopes for Pacemaker in the DB2 community, in that it will offer us a much simplified and easier way of managing HADR clusters and automating the failovers between the HADR nodes. In this article Damir Wilder shares his experience on working with Pacemaker starting with prerequisites for the Pacemaker installation and the installation procedure itself. This is followed by configuration of a simple clustered environment consisting of two nodes and setup of a HADR DB2 database within it. To illustrate the workings of Pacemaker and

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture