1834705 Members
2438 Online
110069 Solutions
New Discussion

Mirroring boot disk

 
Praveen Bezawada
Respected Contributor

Mirroring boot disk

Hi
I want to mirror my boot disk . Does the new disk need to be a bootable disk or can I just pvcreate then vgextend onto that disk.

thanks in advance
Praveen
9 REPLIES 9
Russell Davy
Advisor

Re: Mirroring boot disk

Hi

Yes, you will need to make it bootable and put the lvln areas.

pvcreate -B /dev/rdsk/(device)
mkboot /dev/dsk/(device) (this will do dump, boot and root areas)

lvextend -m 1 /dev/vgxx/lvolx

Th -m is the number of mirror copies, and you must do it for lvol1 to lvoln

Hope this helps.
MND
melvyn burnard
Honored Contributor

Re: Mirroring boot disk

Go read the manual at http://www.docs.hp.com
specifically:

http://www.docs.hp.com/hpux/onlinedocs/B2355-90701/B2355-90701.html

Read the section:
Mirroring Root, Boot, and Primary Swap Logical Volumes

This gives you step by step instructions.
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Praveen Bezawada
Respected Contributor

Re: Mirroring boot disk

Hi Russell
DO i have to vgextend after mkboot
Russell Davy
Advisor

Re: Mirroring boot disk

Oops, yeah!

the pvcreate -B will make the PV bootable then extend the VG with vgextend /dev/vgxx /dev/dsk/(second device)

the important part of this is to do the boot, root and swap areas first:
lvol1 (/stand)
lvol2 (swap/dump)
lvol3 (/)

Then the rest.
MND
Andreas Voss
Honored Contributor

Re: Mirroring boot disk

Hi,

just for making the mirroring proccess simpler i put you a script at the attachment.

Regards
Sandor Horvath_2
Valued Contributor

Re: Mirroring boot disk

Hi !
I make it the next steps >

#pvcreate -B /dev/rdsk/device
#vgextend vg00 /dev/dsk/device
#mkboot /dev/rdsk/device
#mkboot -a "hpux -lq(;0)/stand/vmunix" /dev/rdsk/device
#for i in $(ls /dev/vg00/lv*)
>do
>lvextend -m 1 /dev/dsk/device
>done

regards, Saa
If no problem, don't fixed it.
Steven Sim Kok Leong
Honored Contributor

Re: Mirroring boot disk

Hi,

One thing to note about boot disk mirroring is that mirroring does not prevent data corruption if both the boot disk and its mirror are always in sync. In this case, mirroring simply increases the availability of your hardware storage.

For me, I create 2 mirror copies instead of one, with the first copy always in sync with the boot disk while the second copy lvsplit'ed away most of the time and only lvmerged occasionally.

The first copy protects storage availability while the second copy protects against boot disk data corruption. So, even if someone accidentally erases data off the boot disk and its first mirror copy and render both the boot disk and its first mirror copy useless, I can always boot up using the second mirror copy which is not in sync with the boot disk but at the very least bootable.

Hope this helps. Regards.

Steven Sim Kok Leong
Brainbench MVP for Unix Admin
http://www.brainbench.com
Steve Tucker
Occasional Visitor

Re: Mirroring boot disk

Thanks to Sandor Horvath for this script. I realize this is almost a year old but it was helpful to me. I do have one small addition to make after trying to use it and getting an error - you need a "$i" in the lvextend command as follows:

lvextend -m 1 $i /dev/dsk/device

It might also be helpful to others if you point out that the word "device" has to be replaced by a disk address like "c2t2d0" which can be found by doing the command, "ioscan -fnCdisk" and correlating that with an unused disk the same size as vg00.

Regards,
Steve Tucker
Ashwani Kashyap
Honored Contributor

Re: Mirroring boot disk

At the end don't forget to update the BDRA . Do
#lvlnboot -R

And then verify
#lvlnboot -v

Ash