1844281 Members
2657 Online
110230 Solutions
New Discussion

root mirroring on HPUX

 
kuldeep
New Member

root mirroring on HPUX

Hi friends
I have two disk root vg(vg00) and would like to mirror it on other two disks. All info i could find reagrding root mirroring was related to only one disk system. Can any1 help me with the two disk system???
7 REPLIES 7
Ivan Krastev
Honored Contributor
Asif Sharif
Honored Contributor

Re: root mirroring on HPUX

Hi Kuldeep,

You specify the number of mirror copies you want when you create or extend a logical volume using the -m option to lvcreate or lvextend. The default is for no mirrored copies.

For more information please find the attached document.
"Attachment removed to comply with ITRC Guidelines"



Regards,
Asif sharif
Regards,
Asif Sharif
Pete Randall
Outstanding Contributor

Re: root mirroring on HPUX

Mirroring is done at the lvol level, so there it really doesn't make much difference how many source and target disks you have, you simply mirror each lvol.

Here are my steps:

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
Matti_Kurkela
Honored Contributor

Re: root mirroring on HPUX

You've already got a lot of good advice, but I'd like to add this:

When you have four system disks, it is likely that not all of them have a separate SCSI bus. It would be good (both performance and reliability-wise) to ensure that two halves of each mirrored LV are *not* on the same SCSI bus. This can of course done manually (by being very careful when doing the mirroring) but HP-UX has a facility to enforce this automatically: Physical Volume Groups or PVGs.

You'll want to create as many PVGs for vg00 as there are SCSI buses serving your system disks. For example, if your system disks are /dev/dsk/c1t0d0, /dev/dsk/c1t2d0, /dev/dsk/c2t0d0 and /dev/dsk/c2t2d0, you'll want to group the c1* disks to one PVG and c2* disks to another.

With vg00, you'll have to insert the original PVs into PVGs by editing the /etc/lvmpvg file: see "man lvmpvg" for more information and be very careful about the syntax. When adding the two empty disks to the vg00 in preparation for mirroring, you can use the -g option of vgextend to add each new disk to a PVG of your choice.

After grouping the disks into PVGs, you can change the allocation policy of the LVs from the default "strict" to "PVG-strict". If you don't do this, the existence of PVGs will have no effect at all. This change is made with "lvchange -s g /dev/vg00/lvolX". You should do this for each lvol of the vg00.

Now you can mirror the LVs as normal. You could specify the name of the disk you want to use for each mirror copy (and you should, to ensure that the copies of lvol1, lvol2 and lvol3 are all together on the beginning of a bootable disk).

If you need to, for example, extend /var at some later time, the PVG setup will ensure that the system will place the new extents to sensible locations.
MK
kuldeep
New Member

Re: root mirroring on HPUX

thanks a lot friends.....it did solve ma problem....thanks a lot....
kuldeep
New Member

Re: root mirroring on HPUX

closing
Asif Sharif
Honored Contributor

Re: root mirroring on HPUX

Hi Kuldeep,

Your profile shows "I(Kuldeep) have assigned points to 0 of 4 responses to my questions."


Could you please assign points.

Regards,
Asif Sharif
Regards,
Asif Sharif