Operating System - HP-UX
1752800 Members
5749 Online
108789 Solutions
New Discussion юеВ

Re: LVM storage migration mirror

 
SOLVED
Go to solution
Nazaf Khan
Frequent Advisor

LVM storage migration mirror

Hi,


My query is that I have multiple lv's in vg01 with it's associated pv (Luns). I have an activity of storage migration where these PV or luns will be replaced to the new luns from the storage. The deails of the VG is mentioned below.

-- Volume groups ---
VG Name /dev/vg01
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 17
Open LV 17
Max PV 16
Cur PV 9
Act PV 9
Max PE per PV 28159
VGDA 18
PE Size (Mbytes) 4
Total PE 70121
Alloc PE 64745
Free PE 5376
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

--- Logical volumes ---
LV Name /dev/vg01/lvol1
LV Status available/syncd
LV Size (Mbytes) 56000
Current LE 14000
Allocated PE 14000
Used PV 2

LV Name /dev/vg01/lvol2
LV Status available/syncd
LV Size (Mbytes) 61500
Current LE 15375
Allocated PE 15375
Used PV 2

.......... This VG01 has till lvol12 and all the lvol involves the below disk or PV. Also non of the lv's are mirrored all are same as example of lvol1 mentioned below.

# lvdisplay -v /dev/vg01/lvol1 | more
--- Logical volumes ---
LV Name /dev/vg01/lvol1
VG Name /dev/vg01
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 56000
Current LE 14000
Allocated PE 14000
Stripes 0
Stripe Size (Kbytes) 0
Bad block off
Allocation strict
IO Timeout (Seconds) default

--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c28t0d0 8960 8960
/dev/dsk/c28t1d1 5040 5040


--- Physical volumes ---
PV Name /dev/dsk/c28t0d0
PV Name /dev/dsk/c29t0d0 Alternate Link
PV Name /dev/dsk/c30t0d0 Alternate Link
PV Name /dev/dsk/c31t0d0 Alternate Link
PV Status available
Total PE 28155
Free PE 0
Autoswitch On
Proactive Polling Off

PV Name /dev/dsk/c28t0d1
PV Name /dev/dsk/c29t0d1 Alternate Link
PV Name /dev/dsk/c30t0d1 Alternate Link
PV Name /dev/dsk/c31t0d1 Alternate Link
PV Status available
Total PE 3070
Free PE 0
Autoswitch On
Proactive Polling Off

PV Name /dev/dsk/c28t0d2
PV Name /dev/dsk/c29t0d2 Alternate Link
PV Name /dev/dsk/c30t0d2 Alternate Link
PV Name /dev/dsk/c31t0d2 Alternate Link
PV Status available
Total PE 3070
Free PE 0
Autoswitch On
Proactive Polling Off

PV Name /dev/dsk/c28t0d3
PV Name /dev/dsk/c29t0d3 Alternate Link
PV Name /dev/dsk/c30t0d3 Alternate Link
PV Name /dev/dsk/c31t0d3 Alternate Link
PV Status available
Total PE 2558
Free PE 0
Autoswitch On
Proactive Polling Off

PV Name /dev/dsk/c28t0d4
PV Name /dev/dsk/c29t0d4 Alternate Link
PV Name /dev/dsk/c30t0d4 Alternate Link
PV Name /dev/dsk/c31t0d4 Alternate Link
PV Status available
Total PE 2046
Free PE 0
Autoswitch On
Proactive Polling Off

PV Name /dev/dsk/c28t0d5
PV Name /dev/dsk/c29t0d5 Alternate Link
PV Name /dev/dsk/c30t0d5 Alternate Link
PV Name /dev/dsk/c31t0d5 Alternate Link
PV Status available
Total PE 2558
Free PE 328
Autoswitch On
Proactive Polling Off

PV Name /dev/dsk/c28t0d6
PV Name /dev/dsk/c29t0d6 Alternate Link
PV Name /dev/dsk/c30t0d6 Alternate Link
PV Name /dev/dsk/c31t0d6 Alternate Link
PV Status available
Total PE 2558
Free PE 0
Autoswitch On
Proactive Polling Off

PV Name /dev/dsk/c28t1d0
PV Name /dev/dsk/c29t1d0 Alternate Link
PV Name /dev/dsk/c30t1d0 Alternate Link
PV Name /dev/dsk/c31t1d0 Alternate Link
PV Status available
Total PE 3070
Free PE 2404
Autoswitch On
Proactive Polling On

PV Name /dev/dsk/c28t1d1
PV Name /dev/dsk/c29t1d1 Alternate Link
PV Name /dev/dsk/c30t1d1 Alternate Link
PV Name /dev/dsk/c31t1d1 Alternate Link
PV Status available
Total PE 23036
Free PE 2644
Autoswitch On
Proactive Polling On

6 REPLIES 6
Nazaf Khan
Frequent Advisor

Re: LVM storage migration mirror

\\\\\\ I can perfom the steps as follows.

Now my query is in the 4th stpep when I mirror the lvol's, can I ask for one single whole 275GB of lun (PV) and mirror all the lvols in that new specific lun from new storage or will I have to get 9luns (PVS) same as the above setup to mirror the luns (PV).Can all these lvols which presently resides in 9pv's get sucessfully mirror in once single new disk or new lun from the storage.

1.insf -eCdisk
2.pvcreate /dev/rdsk/
3.vgextend /dev/vg01 /dev/dsk/
4. Mirror all the LVs to new lun :-
# for i in lvol1 lvol2 lvol3 lvol4 lvol5 lvol6 lvol7 lvol8 lvol9 lvol10 lvol11 lvol12
do
echo " Extending /dev/vg01/$i
lvextend -m 1 /dev/vg01/$i /dev/dsk/
done
5. Once done will remove the mirror of OLd storage.
Bijeesh
Respected Contributor

Re: LVM storage migration mirror

hi,
>>>Can all these lvols which presently resides in 9pv's get sucessfully mirror in once single new disk or new lun from the storage>>>
Mirroring happens on LVs and not for PVs.So it is possible.
Here you can use pvmove(which move all the contents in a PV to another PV) or vgmove (which will migrate the vg from old disks to new disks.)
#man pvmove
#man vgmove
Nazaf Khan
Frequent Advisor

Re: LVM storage migration mirror

Hi,

Thanks for the reply. I checked the man page but what I feel is pvmove will not be used in this case as it will be risky as well as what I believe that 9 existing luns when we do PV move to new single lun won't accept. This is what I can understand from the man page and also the availabe LVM student guide.
chris huys_4
Honored Contributor
Solution

Re: LVM storage migration mirror

Hi,

> Now my query is in the 4th stpep when I
> mirror the lvol's, can I ask for one single
> whole 275GB of lun
No, you cant ask for a single lun of 275GByte.

The problem is that in the original volumegroup, the PE size was choosen much to small, i.e. the default of 4Mbyte, for a volumegroup of almost 280gbyte.

PE Size (Mbytes) 4

Together with the problem the max pe per pv is limited to 28159 physical extents per lun, Max PE per PV 28159, this means that the biggest lun that can be added is 28159 * 4Mbyte = around 114Gbyte in size.

So you will need to ask for at least 3 luns of around 114Gbyte luns, to be able to mirror the data to the new luns.

And no more then 7 luns either can be added, at the same time, for mirroring, due to the limitation, of the max pv of 16, Max PV 16.

For the rest mirroring or pvmove it all works..

Greetz,
Chris
PS. You move small lun per small lun with pvmove, so 9 smaller luns to 1 big lun is no problem, as long as there is enough diskspace that the target lun provides, which will not be the case here.
Nazaf Khan
Frequent Advisor

Re: LVM storage migration mirror

Hi Chris,

Thnx for clearing the doubt. It was excelet explanation. I am Completely satisfied with your answer. I had submitted the points and closing the Thread.


Thanks Again.
Nazaf Khan
Frequent Advisor

Re: LVM storage migration mirror

Was satisfied with the reply.