cancel
Showing results for 
Search instead for 
Did you mean: 

Stop and re-sync mirror

SOLVED
Go to solution
Fernando Boza
Regular Advisor

Stop and re-sync mirror

I have a server with HP-UX 11.11 atached to two storages. I have mirror-ux within storages.

I need shutdown one storage for maintenance and then go on again.

What is the most easy method for stop and resync the mirror?
6 REPLIES
Robert-Jan Goossens
Honored Contributor

Re: Stop and re-sync mirror

Hi Fernando,

Have a look at this white paper and check if you have next patches installed.

For 11.11: Patches PHKL_31216 and PHCO_30698 (or superseding patches)

http://docs.hp.com/en/7161/LVM_OLR_whitepaper.pdf

Regards,
Robert-Jan
Steven E. Protter
Exalted Contributor

Re: Stop and re-sync mirror

Shalom

lvextend -m 0

to break it


lvextend -m 1

to rebuild
rebuild will take some time.

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
sujit kumar singh
Honored Contributor

Re: Stop and re-sync mirror

Hi Fernando,


As a word of caution before doing this i shall suggest you to run the following commands so that you can have the PV list for the existing VG as well as the a map file in place for the VG(s).

for all the VGs that are having the mirrors (MirrorDisk/UX)on both the storages as said by you Ealier, PLease run.


#vgexport -p -v -s -m /tmp/.Before_activity.map /dev/

#vgexport -p -v -f /tmp/.Before_Activity.PV_list //dev/


Kepping these map files and the PV list for the involved VGs shall be good.



Regards
Sujit
Torsten.
Acclaimed Contributor

Re: Stop and re-sync mirror

You can simple stop disk access on lvm level with "pvchange -a n ...", see

man pvchange

Example:

pvchange -a n /dev/dsk/c3t0d0s2
Warning: Detaching a physical volume reduces the availability of data
within the logical volumes residing on that disk.
Prior to detaching a physical volume or the last available path to it,
verify that there are alternate copies of the data
available on other disks in the volume group.
If necessary, use pvchange(1M) to reverse this operation.
Physical volume "/dev/dsk/c3t0d0s2" has been successfully changed.

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!   
OldSchool
Honored Contributor

Re: Stop and re-sync mirror

I may be grossly oversimplifying this, but would not "lvsplit / lvmerge" work for this.

I'm unclear as to whether the original poster was attempting to move data off one storage system to another prior to maint. or if he simply needed to break off the mirrors.....
Armin Kunaschik
Esteemed Contributor
Solution

Re: Stop and re-sync mirror

The most easy way is simply do nothing.

In most cases the system will notice that the missing storage is back and start syncing in background.
In all other cases, when the system does not recognize the storage, simply do ioscan and vgsync for any vg with stale extents (or lvsync respectively).

This biggest advantage here is, that you won't need to resync all extents, but only those that changed while the mirror was down.

If, for some unkown reason, none of the mentioned steps work to bring the mirror back online, you're still free to break the mirror, even if the mirror disks are completely gone.

My 2 cents,
Armin

PS: Please assign points if you find answers useful!
And now for something completely different...