LVM and VxVM
Showing results for 
Search instead for 
Did you mean: 

Mirror the Data Disk in HP-UX

Go to solution
Khalid Shakoor
Regular Advisor

Mirror the Data Disk in HP-UX

Hi Guruz,

We have RP3440 server running HP-UX 11.11 and one external disk enclosure is also connected with the server using SCSI cable. Enclosure is fully populated with 14 Disk and each disk size is 146 GB. All disk of the enclosure are part of One VG and there is not Raid Involved in current setup other words VRAID 0 and if in case any single disk faulty from my Current VG, I will lose my data of current Volume Group .

Now we are planning to add one more enclosure and do enclosure to enclosure mirror to avoid the data lose.

For this we need disk enclosure and 14 disk same like existing setup and off course mirror UX license.

Now I have concern about the mirroring. As per my understanding mirroring will be done on Logical Volume level and the action plan is like this
ioscan â funC disk >>see the new disk
insf â H *new hardware path* >>will create the device of new harddisk
vgextend /dev/vgxx /dev/dsk/cxtxdx>> extend the volume group onto new disk
lvextend â m 1 /dev/vgxx/lvxx /dev/dsk/cxtcdx >>mirror the lvol on new disk
And repeated these step for all 14 disk.

Now I am worried about the mirroring of thatâ s logical Volumes which size is letâ s say 200 GB. Which off course on two disk as my current disk size is 146 GB which is not enough of 200 GB Lvol.

What can I do for this case? Is there any way to pass two PV in lvextend command like?
lvextend â m 1 /dev/vgxx/lvxx /dev/dsk/cxtcdx /dev/dsk/cytydy

Attached is the vg information.

Thanks In Advance.
P Arumugavel
Respected Contributor

Re: Mirror the Data Disk in HP-UX


Here is the best way to mirror in your scenario. you can make use of PVGs (Physical Volume Groups)in this instance.

To create a PVG edit the /etc/lvmpvg file and add the following:

VG /dev/tdrstore
PVG tdrstore1
PVG tdrstore2

Save the file and exit vi.

Now when you mirror you can mirror strictly between PVGs. First you will have to set the PVG-strict allocation policy for the mirrors.

# lvchange -s g /dev/tdrstore/lvname

Now you can mirror, and not worry about specifying specific disk devices

# lvextend -m 1 /dev/tdrstore/lvname

For more information on PVGs, have a look at the lvmpvg man page and also the lvcreate man page

Source Link:

Wim Rombauts
Honored Contributor

Re: Mirror the Data Disk in HP-UX

Another performance tip (if you haven't done this already) : before you start mirroring (lvextend -m 1), execute lvchange -D f for every logical volume.
This will cause every lvol to spread all extents over all disks, and thereby spreads te load evenly over all disks.
Otherwise, all extents will be taken from the first disk, and all IO for this lvol can overload this single disk, while other disks are idle.