1825561 Members
3199 Online
109681 Solutions
New Discussion

LVM

 
Indrajit Bhagat
Regular Advisor

LVM

how to mirror a disk in whole disk approach.
how to mirror a disk in LVM.
3 REPLIES 3
Pete Randall
Outstanding Contributor

Re: LVM

Since the product used for mirroring (MirrorDisk-UX) is LVM based, there is no way to mirror using a whole disk approach - it has to be done with LVM, mirroring each individual LV.

Here is a guide I prepared to mirror the root disk. For a regular disk, just omit the steps to make the disk bootable:


The steps to mirror your boot volume are (PA-RISC):

1. Create a physical volume with a boot reserved area
"pvcreate -B /dev/rdsk/c1t6d0"

2. Add the physical volume to the root VG
"vgextend /dev/vg00 /dev/dsk/c1t6d0"

3. Use mkboot to place the boot utilities in the boot area and add the AUTO file
"mkboot /dev/rdsk/c1t6d0"
"mkboot -a "hpux -lq" /dev/rdsk/c1t6d0"

4. Use mkboot to update the AUTO file on the primary boot disk
"mkboot -a "hpux -lq" /dev/rdsk/c0t6d0"

5. Mirror the stand, root and swap logical volumes in order
"lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c1t6d0"
"lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/c1t6d0"
"lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/c1t6d0"

6. Then mirror the rest of your root logical volumes
"lvextend -m 1 /dev/vg00/lvol4 /dev/dsk/c1t6d0"
etc.

7. Modify your alternate boot path
"setboot -a 8/8.6.0 # use the path of your new boot disk"

8. Edit /stand/bootconf and add your new mirrored boot disk.

That's all there is to it. You may notice that I left out any
lvlnboot commands. That is because they are not
necessary - see the man page:

"This command should be run in recovery mode (-R)
whenever the configuration of the root volume group is
affected by one of the following commands: lvextend,
lvmerge, lvreduce, lvsplit, pvmove, lvremove, vgextend,
or vgreduce (see lvextend(1M), lvmerge(1M), lvreduce(1M),
lvsplit(1M), pvmove(1M), lvremove(1M), vgextend(1M), and
vgreduce(1M)). Starting with HP-UX Release 10.0, this is
done automatically."


For Itanium architecture, follow this guide:
http://h21007.www2.hp.com/dspp/tech/tech_TechSingleTipDetailPage_IDX/1,2366,5343
,00.html
-or-
http://docs.hp.com/en/B2355-90950/ch06s02.html#cchgjafa



Pete

Pete
Doug O'Leary
Honored Contributor

Re: LVM

Hey;

As stated, under HPUX, since LVM is the default, there is no way to mirror the whole disk. You could write a script to dd it to another one, but that's not exactly mirroring.

As far as mirroring in LVM, there's a difference beween the procedures for Itanium and PA-RISC. I use this checklist:

http://www.olearycomputers.com/ll/hp_mirrorux.html

HTH;

Doug O'Leary

------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
Torsten.
Acclaimed Contributor

Re: LVM

"how to mirror a disk in whole disk approach."

You need a hardware RAID controller. Once you have one (smartarray, see docs.hp.com for supported models), read the documentation, because it is different.

"how to mirror a disk in LVM."

See the appendix in this document for the procedures how to mirror boot drives with Integrity or PA-RISC servers (Appendix):

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!