Informix

 View Only
Expand all | Collapse all

Silly question on HDR setup

  • 1.  Silly question on HDR setup

    Posted Sat July 10, 2021 07:25 PM
    Hi Everyone,
    Can we use the whole system backup (onbar -b-w) from Primary to do physical  restore of HDR secondary instead of the standard level 0 backup (onbar -b -L 0).


    ------------------------------
    Thanks & Regards
    Vijayanand Dhandapani.
    ------------------------------

    #Informix


  • 2.  RE: Silly question on HDR setup

    IBM Champion
    Posted Sat July 10, 2021 07:45 PM
    Never used onbar to set up HDR - the key is to stop the secondary completing logical recovery. After the restore you probably can do a oninit -PHY and the do the normal onmode commands.

    Never tried with onbar but works with ontape 

    Cheers
    Paul

    Paul Watson
    Oninit LLC
    +1-913-387-7529
    www.oninit.com
    Oninit®️ is a registered trademark of Oninit LLC





  • 3.  RE: Silly question on HDR setup

    Posted Sun July 11, 2021 09:27 AM
    Hi Paul,

    Thanks for the response.  After physical restore and promoting it to secondary(onmode -d secondary <primaryname>) -  it is identifying the correct logical log to start the recovery but saying that "Checkpoint Record not Found in logical log" and then getting assert failure and eventually crashing.

    I have restricted access to the environment and might have to wait for another 1 week before I can retry any alternate solution. As of now, the only thing I could suspect is that backup taken on primary is whole system backup (onbar -b -w) instead of standard full backup (onbar -b -L 0).

    I might have to wait and see if someone else faced my situation.

    21:04:52 Starting Log Position - 304338 0x370f018
    21:04:54 DR: Cleared 353216 KB of logical log in 1 seconds.
    21:04:56 Checkpoint Record not Found in Logical Log.           <<<<------------------
    21:04:57 DR_ERR set to -5
    21:04:57 Assert Failed: DR: Log Record Apply Thread Exited Abnormally. Internal Error.
    A restart of the database server shall be required to correct
    this problem.

    21:04:57 IBM Informix Dynamic Server Version 12.10.FC8W1XH
    21:04:57 Who: Session(66, informix@, 0, 7000000782e9048)
    Thread(197, dr_secapply, 7000000782a4ba8, 10)
    File: hdr/hdrApply.c Line: 580
    21:04:57 Results: Dynamic Server must abort
    21:04:57 Action: Reinitialize shared memory
    21:04:57 stack trace for pid 3998394 written to /usr/informix/tmp/af.4adec79
    21:04:57 See Also: /usr/informix/tmp/af.4adec79, shmem.4adec79.0
    21:05:22 Thread ID 197 will NOT be suspended because
    it is a daemon.
    21:05:22 hdr/hdrApply.c, line 580, thread 197, proc id 3998394, DR: Log Record Apply Thread Exited Abnormally. Internal Error.
    A restart of the database server shall be required to correct
    this problem.
    .
    21:05:22 Fatal error in ADM VP at mt.c:14414
    21:05:22 Unexpected virtual processor termination: pid = 3998394, exit status = 0x1.
    21:05:22 PANIC: Attempting to bring system down

    ------------------------------
    Vijayanand Dhandapani
    ------------------------------



  • 4.  RE: Silly question on HDR setup

    IBM Champion
    Posted Sun July 11, 2021 10:03 AM
    Can you just do ontape across the network ?

    Cheers
    Paul

    Paul Watson
    Oninit LLC
    +1-913-387-7529
    www.oninit.com
    Oninit®️ is a registered trademark of Oninit LLC





  • 5.  RE: Silly question on HDR setup

    Posted Sun July 11, 2021 11:28 AM
    1. Which command do you use on the secondary side to restore :

    Are you sure you do a physical restore ?

     

     

     

     






  • 6.  RE: Silly question on HDR setup

    IBM Champion
    Posted Mon July 12, 2021 05:53 AM
    Let me chime into this choir:

    of course, an onbar whole-system backup is just as good (or even better) than non-whole-system for setting up a secondary server - what ontape would be doing is just that: a whole-system backup.

    What you're facing might be a consequence of either using wrong commands (in wrong order?) or, maybe, having restarted the secondary too early?  We'd have to have the full picture here to really be able to judge.  Did you possibly completely restore this secondary (so not physically only), then restart using -PHY before turning this into a secondary (onmode -d secondary) - this could well explain "checkpoint not found" since the now secondary would have created and recorded at least one checkpoint of its own that it would not find in the log sent from the primary.

    On Paul's "ontape-across-the-network" suggestion I'd concur if the instance in question isn't very large.  An alternative would be ifxclone which could be considered "onbar-accross-the-network", only without explicit onbar involvement, but also without a real backup taken and stored anywhere, so also without involvment of a storage manager, and with onbar's parallelism.  Can't beat this performance wise with any larger systems (provided the network is good).

    HTH,
     Andreas

    ------------------------------
    Andreas Legner
    ------------------------------



  • 7.  RE: Silly question on HDR setup

    Posted Tue July 13, 2021 04:34 AM

    Use STDIO for quick backup and restores - Oninit Consulting (oninitgroup.com)

    Decrease setup time using the ontape STDIO feature - IBM Documentation



    ------------------------------
    Jon Ritson
    ------------------------------



  • 8.  RE: Silly question on HDR setup

    IBM Champion
    Posted Wed July 14, 2021 07:11 AM

    I wrote a script that pipes STDIO ontape through pigz and then via ssh to a restore script on the new server that reverses the whole process. You need to set up keyless ssh between the two servers first, but once you've done that, it's pretty straightforward.

     

    Backup_to_remote.sh on the source server:

    [set environment for source DB]

    [set IFXSVR to be a base version of INFORMIXSERVER without the individual node's suffix]

    ontape -s -L 0 -t STDIO | pigz -3 | ssh ${REMOTE_SERVER} "pigz -d | /home/informix/tgirsch/remote_restore.sh ${IFXSVR}"

     

    remote_restore.sh on the target server:

     

    [Set up environment for target DB]

    time ontape -p -t STDIO

     

    Then I manually run the onmode –d commands to complete the sync.

     

    For a 950 GB instance (~400 GB used), the ontape portion typically takes a little less than two hours.






  • 9.  RE: Silly question on HDR setup

    Posted Wed July 14, 2021 07:19 AM
    Exactly this +/- which zip flavour.

    If you need to do this frequently but as fast as possible you should compare compression ratios vs netwwork
    throughput.

    Regards,


    Clive Eisen
    GPG: 3818B5F1











  • 10.  RE: Silly question on HDR setup

    Posted Fri December 24, 2021 10:12 AM
    You can test it with onpsm + onbar

    ------------------------------
    ZhiWei Cui
    GBASE
    ------------------------------



  • 11.  RE: Silly question on HDR setup

    Posted Thu July 15, 2021 09:16 AM
    Vijayanand

    Please check ifxclone utility, which comes with the engine; it does marvels.  The only caveat is that you could not take a full backup while it is running. No issues with logical Logs Backups. Below is an example of how we set HDR. with a target server named tst2_net at 99.99.99.99, port 1532, and source server tst1_net at 99.99.88.88 port also 1532

    We have already copied the onconfig on the target server, set FULL_DISK_INIT to 1, and ran the following command from the target server.

    ifxclone -T -L -S tst1_net -I 99.99.88.88 -P 1532 -t tst2_net -i 99.99.99.99 -p 1532 -d HDR

    If everything is OK, the prompt return in a few seconds, and you will see ifxclone is working in the background; you can monitor performance using onstat -m.

    We replicate big databases doing this method across the country.  There are several options so you should check them. 



    ------------------------------
    Walter Milan
    ------------------------------



  • 12.  RE: Silly question on HDR setup

    Posted Fri December 24, 2021 10:10 AM
    ifxclone need ENABLE_SNAPSHOT_COPY=1

    ------------------------------
    ZhiWei Cui
    GBASE
    ------------------------------