Operating System - HP-UX
1753427 Members
5015 Online
108793 Solutions
New Discussion юеВ

How to restore a split mirror?

 
SOLVED
Go to solution
Mikhail_7
Advisor

How to restore a split mirror?

Task: Up-coming big upgrade, in case of any problems during upgrade, we're need the fast recover procedure to revert all changes back ASAP.

It's takes much time to recover vg00 and vgxx from the tape.

I'm planning to split all mirrors and use a mirrored copies in case of full restore actions or just some part of conf files.

How is it possible to recover all vgxx from the mirrored copy or to be able to mount a broken mirror device to recover some original files?

I've tried to split, for example, vg00 with
lvreduce -m 0 /dev/vg00/lvolxx /dev/dsk/cxtxdx
vgreduce /dev/vg00 /dev/dsk/cxtxdx

and then

mkdir /dev/vg08
mknod /dev/vg08 c 64 0x080000
vgimport /dev/vg08 /dev/dsk/cxtxdx
vgchange -a y /dev/vg08

but, without any success with this output:

vgchange -a y -q n /dev/vg08
vgchange: Warning: Couldn't attach to the volume group physical volume "/dev/dsk/c1t2d0":
Cross-device link
vgchange: Warning: couldn't query physical volume "/dev/dsk/c1t2d0":
The specified path does not correspond to physical volume attached to
this volume group
vgchange: Couldn't query the list of physical volumes.
vgchange: Couldn't activate volume group "/dev/vg08":
Quorum not present, or some physical volume(s) are missing.

strings /etc/lvmtab
/dev/vg00
/dev/dsk/c2t2d0
/dev/vg08
/dev/dsk/c1t2d0

Before split actions it was just:
strings /etc/lvmtab
/dev/vg00
/dev/dsk/c2t2d0
/dev/dsk/c1t2d0

Any advises, useful links are appreciate!
3 REPLIES 3
Geoff Wild
Honored Contributor
Solution

Re: How to restore a split mirror?

Use lvsplit

NAME
lvsplit - split mirrored LVM logical volume into two logical volumes

SYNOPSIS
/usr/sbin/lvsplit [-A autobackup] [-s suffix] [-g PhysicalVolumeGroup]
lv_path ...

Remarks
This command requires the installation of the optional HP MirrorDisk/UX
software (not included in the standard HP-UX operating system) before
it can be used.

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
A. Clay Stephenson
Acclaimed Contributor

Re: How to restore a split mirror?

lvreduce -m 0 doesn't split a mirror; it removes the mirror -- permanently. Likewise for vgreduce. Now you need to remirror all your LVOLS then test to make certain that you can boot from either drive.

To split a mirror, you use lvsplit. Man lvsplit for details.

In your case, what I would do after getting the system completely remirrored and booting from either disk is shutdown and remove the alternate boot disk and put it somewhere out of the way. That way, no matter what you do, you can't destroy that data. You will need to interrupt the boot and at the ISL prompt use "hpux -lq" to override quorum and if you must boot from your saved disk then you do the same thing.
If it ain't broke, I can fix that.
Mikhail_7
Advisor

Re: How to restore a split mirror?

Thank you guys for the quick response!

It looks like I have installed hp-ux MirrorDisk software:

swlist | grep -i MirrorDisk
B2491BA B.11.00 MirrorDisk/UX

And I've already tried to use lvsplit and lvmerge, works fine.

Thank you!