Db2

Db2

Connect with Db2, open source, and other data experts to gain value from your data, share insights, and solve problems.

 View Only
  • 1.  Db2 with Pacemaker in ASYNC mode issue

    Posted Wed March 06, 2024 06:45 AM

    Hi,

    Using HADR setup with Pacemaker on Db2 11.5.8 on Sles 15 SP4. Everything works fine when using SYNC or NEARSYNC sync mode.
    But, Pacemaker automation not working in scenario when sync mode is changed to ASYNC.

    db2diag.log shows errors like (for eg when performing TAKEOVER from primary on standby):

    2024-03-06-12.25.06.144165+060 I910751E749           LEVEL: Error
    PID     : 100971               TID : 140293940700928 PROC : db2sysc 0
    INSTANCE: db2inst1             NODE : 000            DB   : MDWH
    HOSTNAME: db2hadr01
    EDUID   : 40                   EDUNAME: db2hadrs.0.0 (MDWH) 0
    FUNCTION: DB2 UDB, High Availability Disaster Recovery, hdrValidateHadrSyncModeUnderCM, probe:200
    MESSAGE : SQL1768N  Unable to start HADR. Reason code = "29".
    DATA #1 : String, 114 bytes
    HADR_SYNCMODE database configuration parameter must be set to SYNC or NEARSYNC when automated failover is enabled.
    DATA #2 : String, 130 bytes
    User Response: Either change hadr_syncmode database configuration to SYNC or NEARSYNC, or disable automated failover via db2haicu.

    Has anyone had similar problems? 

    P.S. - I know that i can disable Pacemaker automation and manage my HADR pair (takeover, etc) but because of specific workload we need to use ASYNC mode.


    Thanks,
    Ivan



    ------------------------------
    Ivan Milojevic
    Comtrade System Integration
    Belgrade
    ------------------------------


  • 2.  RE: Db2 with Pacemaker in ASYNC mode issue

    Posted Wed March 06, 2024 07:34 AM

    What is your db2level output?

    Check this:

    https://www.ibm.com/mysupport/s/defect/aCI3p000000kGBO/dt159795?language=en_US



    ------------------------------
    Jan Nelken
    ------------------------------



  • 3.  RE: Db2 with Pacemaker in ASYNC mode issue

    Posted Wed March 06, 2024 07:47 AM

    Well, there are several other documents that point to the defect like this one. This one is newest i think:

    https://www.ibm.com/mysupport/s/defect/aCI3p000000k9fo/dt145604?language=en_US 

    But the point is that we already on 11.5 fp 9 (my mistake, I put fp 8 in the subject, but we are actually on the latest fp 9)...

    In this document the problem conclusion is "Upgrade to Db2 11.5.8 or later" :)

    db2inst1@db2hadr01:~> db2level
    DB21085I  This instance or install (instance name, where applicable:
    "db2inst1") uses "64" bits and DB2 code release "SQL11059" with level
    identifier "060A010F".
    Informational tokens are "DB2 v11.5.9.0", "s2310270807", "DYN2310270807AMD64",
    and Fix Pack "0".
    Product is installed at "/opt/ibm/db2/V11.5".



    ------------------------------
    Ivan Milojevic
    Comtrade System Integration
    Belgrade
    ------------------------------



  • 4.  RE: Db2 with Pacemaker in ASYNC mode issue

    Posted Wed March 06, 2024 08:00 AM

    Pacemaker only supports SYNC and NEARSYNC SYNCMODE.

    Check below Pacemaker prerequisite

    https://www.ibm.com/docs/en/db2/11.5?topic=pacemaker-prerequisites-integrated-solution-using.



    ------------------------------
    Sumit Choudhary
    ------------------------------



  • 5.  RE: Db2 with Pacemaker in ASYNC mode issue

    Posted Wed March 06, 2024 08:18 AM

    Thanks, i probably missed that because I was focusing on the Pacemaker restrictions: https://www.ibm.com/docs/en/db2/11.5?topic=pacemaker-restrictions

    But i found this somehow unclear because of mentioned defect document (advise to Upgrade to Db2 11.5.8 or later) and because a was able to change sync mode from sync to async without any problem in existing Active Pacemaker configuration. Everything is working normally until first takeover attempt.

    It would be nice if somehow in the Pacemaker code there is a warning if ASYNC is set when it is already allowed to be set in live Pacemaker configuration...



    ------------------------------
    Ivan Milojevic
    Comtrade System Integration
    Belgrade
    ------------------------------



  • 6.  RE: Db2 with Pacemaker in ASYNC mode issue

    Posted Wed March 06, 2024 08:47 AM
    Edited by Ivan Milojevic Wed March 06, 2024 08:48 AM

    On the other hand, it is not realistic for me that Pacemaker as a cluster resource manager that strategically replaces TSAMP has this kind of restriction, because in a real life scenario it is almost impossible for SYNC or NEARSYNC modes to be the only ones used on production systems where in fact SYNC can cause performance degradation..



    ------------------------------
    Ivan Milojevic
    Comtrade System Integration
    Belgrade
    ------------------------------



  • 7.  RE: Db2 with Pacemaker in ASYNC mode issue

    Posted Wed March 06, 2024 09:16 AM

    Pacemaker as a cluster resource manager, provide failover capability in HA setup. If you are looking for failover to DR site where SYNCMODE is configured to ASYNC or SUPERASYNC then Pacemaker is not designed for that. As far as I know even TSAMP also does not support automatic failover to DR site, I might be wrong.

    If you are looking to configure 2 HA node in primary site and 2 HA node in DR site, then I would suggest you can configure Pacemaker on both  side, create cluster, add instance but don't add database in DR site. Once manual failover is done to DR site, you can add database to Pacemaker cluster. Remove database from Pacemaker cluster from Primary site.



    ------------------------------
    Sumit Choudhary
    ------------------------------



  • 8.  RE: Db2 with Pacemaker in ASYNC mode issue

    Posted Wed March 06, 2024 09:43 AM

    I'm not sure that someone would just decide to complicate this kind of setup just because of ASYNC mode. But thanks for the suggestion anyway.



    ------------------------------
    Ivan Milojevic
    Comtrade System Integration
    Belgrade
    ------------------------------