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

Mirror the Data Disk in HP-UX

 
SOLVED
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
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.
Khalid
2 REPLIES 2
P Arumugavel
Respected Contributor
Solution

Re: Mirror the Data Disk in HP-UX

Hi,

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
/dev/dsk/c4t0d0
/dev/dsk/c4t1d0
/dev/dsk/c4t2d0
/dev/dsk/c4t3d0
/dev/dsk/c4t4d0
/dev/dsk/c4t5d0
/dev/dsk/c4t8d0
/dev/dsk/c5t0d0
/dev/dsk/c5t1d0
/dev/dsk/c5t2d0
/dev/dsk/c5t3d0
/dev/dsk/c5t4d0
/dev/dsk/c5t5d0
/dev/dsk/c5t8d0
PVG tdrstore2
/dev/dsk/newdisk1
/dev/dsk/newdisk2
/dev/dsk/newdisk3
/dev/dsk/newdisk4
/dev/dsk/newdisk5
/dev/dsk/newdisk6
/dev/dsk/newdisk7
/dev/dsk/newdisk8
/dev/dsk/newdisk9
/dev/dsk/newdisk10
/dev/dsk/newdisk11
/dev/dsk/newdisk12
/dev/dsk/newdisk13
/dev/dsk/newdisk14

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: http://h30499.www3.hp.com/t5/LVM-and-VxVM/mirroring-LV-from-multiple-PVs-to-multiple-PVs/m-p/4950421#M41871
Rgds...

Highlighted
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.