Operating System - HP-UX
1833162 Members
4050 Online
110051 Solutions
New Discussion

Which way does the mirror sync?

 
Craig A. Sharp
Super Advisor

Which way does the mirror sync?

I was testing an upgrade from V2 to V3. I pulled one side (alternate) of the vg00 mirror and upgraded the primary drive..Of course the upgrade blew up so I booted from the alternate (mirror) disk. The disks are syncing now, but which way? Are they syncing from the booted alternate to the messed up primary or the other way around. I am thinking that once the sync is done, that the primary will be a mirror of the alternate and not the alternate picking up the bad data from the primary.

Can anyone clarify this?
5 REPLIES 5
Torsten.
Acclaimed Contributor

Re: Which way does the mirror sync?

Did you follow my advise

"Restore the mirror following the replacement procedure (handle the "old" disk like a replacement disk)."

here?
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1159776


You need to make the disk bootable. LVM sync based on timestamps - your "alternate" to the "primary" or better to say the disk you booted from to the disk you inserted later.

A helpful documenation:
http://docs.hp.com/en/5991-1236/When_Good_Disks_Go_Bad.pdf

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Steven E. Protter
Exalted Contributor

Re: Which way does the mirror sync?

Shalom,

What you do if you want to go back is boot the system off one disk, the alternate mirror.

Then plug in the disk that has been messed with and the sync will go from the disk booted from to the second disk, which used to be the primary.

My experience is the sync assumes the disk you booted from is the source and any other disks in the mirror set are the destination. I don't see how it could work any other way.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Matti_Kurkela
Honored Contributor

Re: Which way does the mirror sync?

The man pages of lvsync and vgsync say: "Synchronization occurs only on physical extents that are stale mirrors of the original logical extent."

So you could verify which way it's going by using "lvdisplay -v" to see which disk has stale extents: those will be replaced with "good" data from the other disk.

MK
MK
A. Clay Stephenson
Acclaimed Contributor

Re: Which way does the mirror sync?

From the perspective of Mirror-UX, no copy has any precedence over another regardless of who was on first, first. In essence, the most recent copy wins. In your case, after you booted from the alternate and then re-inserted the primary and did a vgchange -a y, LVM would treat the primary as stale and sync from the alternate to the primary but you should note that "alternate" and "primary" refer only from the boot perspective; alternate and priomary have no meaning to LVM as both are equal.
If it ain't broke, I can fix that.
James R. Ferguson
Acclaimed Contributor

Re: Which way does the mirror sync?

Hi:

You can verify the direction by examining a logical volume with stale extents.

# vgdisplay -v vg00

...note a logical volume(s) with stale extents in the "LV Status" linw. Then:

# lvdisplay -v /dev/vg00/lvolN

...and note which physical path shows stale extents.

Regards!

...JRF...