1752781 Members
5978 Online
108789 Solutions
New Discussion юеВ

Mirror LVOL on a VG

 
SOLVED
Go to solution
brian_31
Super Advisor

Mirror LVOL on a VG

I have to mirror a LVOL on VG02. It is the only lvol in that VG. The VG02 has 2 disks. I am presenting the bdf and vgdisplay.
----------------------------------------------
# bdf /depot
Filesystem kbytes used avail %used Mounted on
/dev/vg02/lvdepot 12288000 11713490 556738 95% /depot
# lvdisplay /dev/vg02/lvdepot
--- Logical volumes ---
LV Name /dev/vg02/lvdepot
VG Name /dev/vg02
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 12000
Current LE 3000
Allocated PE 3000
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation strict
IO Timeout (Seconds) default

# vgdisplay -v vg02
--- Volume groups ---
VG Name /dev/vg02
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 1
Open LV 1
Max PV 16
Cur PV 2
Act PV 2
Max PE per PV 2559
VGDA 4
PE Size (Mbytes) 4
Total PE 3070
Alloc PE 3000
Free PE 70
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

--- Logical volumes ---
LV Name /dev/vg02/lvdepot
LV Status available/syncd
LV Size (Mbytes) 12000
Current LE 3000
Allocated PE 3000
Used PV 2


--- Physical volumes ---
PV Name /dev/dsk/c12t1d3
PV Status available
Total PE 2559
Free PE 0
Autoswitch On

PV Name /dev/dsk/c12t0d2
PV Status available
Total PE 511
Free PE 70
Autoswitch On
----------------------------------------------

Now the steps...

1. i can create a single LUN for 12GB.
2. pvcreate the C#t#d#
3. vgextend vg02 c#t#d#
4. vgsync vg02.

Is this correct?

Thanks

brian.
4 REPLIES 4
Tim Nelson
Honored Contributor

Re: Mirror LVOL on a VG

You first need 12GB of free extents on another disk in /dev/vg02/lvdepot before you can mirror.

There is only 70 Free PE on c12t0d2..

erics_1
Honored Contributor

Re: Mirror LVOL on a VG

Brian,

Everything's good until step 4. Replace the vgsync with

lvextend -m 1 /dev/vg02/lvdepot

You have to create the mirror for the lvol. It will automatically start syncing. You can monitor with lvdisplay.

lvdisplay -v /dev/vg02/lvdepot|grep stale|wc -l

Regards,
Eric
Torsten.
Acclaimed Contributor

Re: Mirror LVOL on a VG

- pvcreate is ok
- vgextend is ok
- extend the mirror to the new disk named cxtydz

# lvextend -m 1 /dev/vg02/lvdepot /dev/dsk/cxdytz

will extend lvdepot the mirror to this disk.

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!   
Sandman!
Honored Contributor
Solution

Re: Mirror LVOL on a VG

Your "Max PE per PV" value of 2559 is too small to fit a 12 GB lvol onto one PV unless you have 11iv3 or 11iv2 installed. If your OS is less than 11iv2 then you need to add two LUNs to your VG and lvextend lvdepot onto them. Steps below.

1. Carve two LUNs totalling 12 GB
2. pvcreate the two LUNs
3. vgextend vg02 /devdsk/c1t1d0 /dev/dsk/c2t1d0
4. lvextend -m 1 /dev/vg02/lvdepot onto them

If your OS is HPUX 11iv2 or higher you can "vgmodify -e vg02" to have more PEs per PV and then follow the above steps by using one LUN instead of two.

~hope it helps