HDR
Posted in 2015
User asked if a recovering original primary can synchronize with the new primary (former secondary) after primary failure and role change. Experts confirmed synchronization is possible if logical logs haven't wrapped since failure. Key requirements: start recovering primary with oninit -PHY (no logical recovery), ensure last crash logs still exist on current primary, then use onmode -d secondary to sync.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: High Availability & Replication
Hi Scenario: 1. Primary failed 2. Secondary changed to Primary. 3. Primary initial Recovery (Step 1). 4. Can Sincronice from Secondary to Primary initial ? Comments Please. -- Saludos Cordiales Rubén Dután Gerente APLEXT CIA. LTDA. Soluciones AX-ERP & TIC www.aplext.com.ec -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
To be able to sync the recovering original primary to the original
secondary (now primary) these criteria have to be met:
1. The last logical log that was on the original primary when it crashed
must still be online on the current primary. (You can look in the
secondary's message log to see which log was current at the time the
primary went down.)
2. The recovering primary must NOT have been brought online yet - it has to
be started with the -PHY flag to oninit so that no logical recovery is
attempted.
3. Start the original primary with oninit -PHY, then
4. Run "onmode -d secondary <current primary name>" on the original primary
to make it the current secondary and sync it to the current primary.
Once you have done that all will be well. If you want to swap the roles
back to their original orientation, then wait for a maintenance window and
for the recovering server to be fully synched up. Then run hdrmkpri.sh on
the current secondary without arguments, kill it (^C) when it pauses for
input (DO NOT CONTINUE), and follow the instructions it prints out.
Art
Art S. Kagel, President and Principal Consultant
ASK Database Management
www.askdbmgt.com
Blog: http://informix-myview.blogspot.com/
Disclaimer: Please keep in mind that my own opinions are my own opinions
and do not reflect on the IIUG, nor any other organization with which I am
associated either explicitly, implicitly, or by inference. Neither do
those opinions reflect those of other individuals affiliated with any
entity with which I am affiliated nor those of the entities themselves.
On Tue, Feb 24, 2015 at 9:59 AM, Ruben Dutan <ruben.dutan@aplext.com.ec>
wrote:
> Hi
> Scenario:
> 1. Primary failed
> 2. Secondary changed to Primary.
> 3. Primary initial Recovery (Step 1).
> 4. Can Sincronice from Secondary to Primary initial ?
>
> Comments Please.
>
> --
> Saludos Cordiales
>
> Rubén Dután
> Gerente
> APLEXT CIA. LTDA.
> Soluciones AX-ERP & TIC
> www.aplext.com.ec
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--089e01634f58de202c050fd72d8c
Ruben Much depends on what the recovery of the original primary entailed and whether the database is in the same position as when it failed. If so you should just be able to set the old primary as secondary and allow HDR to synchronise both sides. If the old primary does not have a valid and recent database running then you will need to re-establish HDR by restoring and archive and then switching HDR on with the original secondary as primary and original primary as secondary. Once in this situation (if needed) you can swap primary and secondary roles using the informix supplied scripts. Keith PS platform, o/s and IDS versions are always useful to include. On 24 February 2015 at 14:59, Ruben Dutan <ruben.dutan@aplext.com.ec> wrote: > Hi > Scenario: > 1. Primary failed > 2. Secondary changed to Primary. > 3. Primary initial Recovery (Step 1). > 4. Can Sincronice from Secondary to Primary initial ? > > Comments Please. > > -- > Saludos Cordiales > > Rubén Dután > Gerente > APLEXT CIA. LTDA. > Soluciones AX-ERP & TIC > www.aplext.com.ec > > -- > This message has been scanned for viruses and > dangerous content by MailScanner, and is > believed to be clean. > > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > --bcaec51717cf0b1918050fd7406d
Thanks Art
I will try to probe that.
--
Saludos Cordiales
Rubén Dután
Gerente
APLEXT CIA. LTDA.
Soluciones AX-ERP & TIC
www.aplext.com.ec
El mar, 24-02-2015 a las 10:29 -0500, Art Kagel escribió:
> To be able to sync the recovering original primary to the original
> secondary (now primary) these criteria have to be met:
> 1. The last logical log that was on the original primary when it crashed
> must still be online on the current primary. (You can look in the
> secondary's message log to see which log was current at the time the
> primary went down.)
> 2. The recovering primary must NOT have been brought online yet - it has to
> be started with the -PHY flag to oninit so that no logical recovery is
> attempted.
> 3. Start the original primary with oninit -PHY, then
> 4. Run "onmode -d secondary <current primary name>" on the original primary
> to make it the current secondary and sync it to the current primary.
>
> Once you have done that all will be well. If you want to swap the roles
> back to their original orientation, then wait for a maintenance window and
> for the recovering server to be fully synched up. Then run hdrmkpri.sh on
> the current secondary without arguments, kill it (^C) when it pauses for
> input (DO NOT CONTINUE), and follow the instructions it prints out.
>
> Art
>
> Art S. Kagel, President and Principal Consultant
> ASK Database Management
> www.askdbmgt.com
>
> Blog: http://informix-myview.blogspot.com/
>
> Disclaimer: Please keep in mind that my own opinions are my own opinions
> and do not reflect on the IIUG, nor any other organization with which I am
> associated either explicitly, implicitly, or by inference. Neither do
> those opinions reflect those of other individuals affiliated with any
> entity with which I am affiliated nor those of the entities themselves.
>
> On Tue, Feb 24, 2015 at 9:59 AM, Ruben Dutan <ruben.dutan@aplext.com.ec>
> wrote:
>
> > Hi
> > Scenario:
> > 1. Primary failed
> > 2. Secondary changed to Primary.
> > 3. Primary initial Recovery (Step 1).
> > 4. Can Sincronice from Secondary to Primary initial ?
> >
> > Comments Please.
> >
> > --
> > Saludos Cordiales
> >
> > Rubn Dutn
> > Gerente
> > APLEXT CIA. LTDA.
> > Soluciones AX-ERP & TIC
> > www.aplext.com.ec
> >
> > --
> > This message has been scanned for viruses and
> > dangerous content by MailScanner, and is
> > believed to be clean.
> >
> >
> >
> >
>
*******************************************************************************
> > Forum Note: Use "Reply" to post a response in the discussion forum.
> >
> >
>
> --089e01634f58de202c050fd72d8c
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Hi Ruben,
When you restart your replication after the failure of primary, the
Primary can synchronize with Secondary if the logicals logs have not
wrapped since the failure.
Otherwise, you have to do a physical restore on the primary server with
ontape or onbar.
Regards,
Le 24.02.2015 15:59, Ruben Dutan a écrit :
> Hi
> Scenario:
> 1. Primary failed
> 2. Secondary changed to Primary.
> 3. Primary initial Recovery (Step 1).
> 4. Can Sincronice from Secondary to Primary initial ?
>
> Comments Please.
>
> --
> Saludos Cordiales
>
> Rubén Dután
> Gerente
> APLEXT CIA. LTDA.
> Soluciones AX-ERP & TIC
> www.aplext.com.ec
Not fully true, you do not always need a full restore if the logfiles are not
on disk any more.
if the previuosly failed primary is assigned a secondary role (started with
onmode -PHY, then onmode -d secondary <old_secondary_instance>),there are two choices:
1) the active primary (previously secondary) has all the logs present to send
to the new secondary to get identical -> they will get operational without any
further interaction
2) the active primary has already overwritten the last log which is common on
both sides -> you have to restore the logs since this time using ontape -l /
onbar -l until you get to a common lognoafter log restore, the servers will try to get identical again by exchanging
the stored log information
3) If you do not have the logs, you have to restore the new secondary from a
full archive and roll forward the logs up to the same point so that 1) can
take over.
Marcus Haarmann
----- Ursprüngliche Mail -----
Von: "franck thomas" <franck.thomas@consult-ix.fr>
An: ids@iiug.org
Gesendet: Dienstag, 24. Februar 2015 21:03:38
Betreff: Re: HDR [34713]
Hi Ruben,
When you restart your replication after the failure of primary, the
Primary can synchronize with Secondary if the logicals logs have not
wrapped since the failure.
Otherwise, you have to do a physical restore on the primary server with
ontape or onbar.
Regards,
Le 24.02.2015 15:59, Ruben Dutan a écrit :
> Hi
> Scenario:
> 1. Primary failed
> 2. Secondary changed to Primary.
> 3. Primary initial Recovery (Step 1).
> 4. Can Sincronice from Secondary to Primary initial ?
>
> Comments Please.
>
> --
> Saludos Cordiales
>
> Rubén Dután
> Gerente
> APLEXT CIA. LTDA.
> Soluciones AX-ERP & TIC
> www.aplext.com.ec
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.