1752299 Members
5344 Online
108786 Solutions
New Discussion

LV's PE reallocation

 
SOLVED
Go to solution
dennischen
Advisor

LV's PE reallocation

Hi, I have a question, how to reallocate the LV's PE with in the same VG.

The system is RP8420(OS: 11.11).  A LV is distributed in two disks accidently. The disk /dev/dsk/c2t6d0 was planning to be the vg00 mirror disk......  Can I just shrink(fsadm) the file system and then reduce(lvreduce) the lvcics_region to clear the PEs in disk c2t6d0? Is there any risk?

And there are aslo some small LVs in disk c2t6d0, can I use the lvmove to move the PE to disk c0t6d0 if there is enough space(PE) for these LVs? Thanks in advance!

 

app2[/]#lvdisplay -v /dev/vg00/lvcics_region
--- Logical volumes ---
LV Name /dev/vg00/lvcics_region
VG Name /dev/vg00
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 6304
Current LE 394
Allocated PE 394
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation strict
IO Timeout (Seconds) default

--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c0t6d0 344 344
/dev/dsk/c2t6d0 50 50

--- Logical extents ---
LE PV1 PE1 Status 1

............                                                                                #omit some output
00338 /dev/dsk/c0t6d0 04368 current
00339 /dev/dsk/c0t6d0 04369 current
00340 /dev/dsk/c0t6d0 04370 current
00341 /dev/dsk/c0t6d0 04371 current
00342 /dev/dsk/c0t6d0 04372 current
00343 /dev/dsk/c0t6d0 04373 current
00344 /dev/dsk/c2t6d0 00000 current
00345 /dev/dsk/c2t6d0 00001 current
00346 /dev/dsk/c2t6d0 00002 current
00347 /dev/dsk/c2t6d0 00003 current
00348 /dev/dsk/c2t6d0 00004 current
00349 /dev/dsk/c2t6d0 00005 current
00350 /dev/dsk/c2t6d0 00006 current
00351 /dev/dsk/c2t6d0 00007 current

 

 

 

app2[/]#lvdisplay -v /dev/vg00/log_Snewapp2
--- Logical volumes ---
LV Name /dev/vg00/log_Snewapp2
VG Name /dev/vg00
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 128
Current LE 8
Allocated PE 8
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation strict
IO Timeout (Seconds) default

--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c2t6d0 8 8

--- Logical extents ---
LE PV1 PE1 Status 1
00000 /dev/dsk/c2t6d0 00122 current
00001 /dev/dsk/c2t6d0 00123 current
00002 /dev/dsk/c2t6d0 00124 current
00003 /dev/dsk/c2t6d0 00125 current
00004 /dev/dsk/c2t6d0 00126 current
00005 /dev/dsk/c2t6d0 00127 current
00006 /dev/dsk/c2t6d0 00128 current
00007 /dev/dsk/c2t6d0 00129 current

2 REPLIES 2
Patrick Wallek
Honored Contributor
Solution

Re: LV's PE reallocation

Have a look at the 'pvmove' command.  This will allow you to relocate PEs from one disk/lun to another within the same VG.

 

Here's an exmple from the pvmove man page:

https://docstore.mik.ua/manuals/hp-ux/en/B2355-60130/pvmove.1M.html

 

Move only the physical extents for logical volume /dev/vg01/lvol2 that are currently 
on/dev/dsk/c1t0d0 to /dev/dsk/c2t0d0: # pvmove -n /dev/vg01/lvol2 /dev/dsk/c1t0d0 /dev/dsk/c2t0d0
 
nnrao1502
Advisor

Re: LV's PE reallocation

yes pvmove should work .. recently I moved from one type of disk to anoth type of disk  ( all the PEs on that disk ) , This is vry useful. I was  inside the file system and it moved and updated lvmtab itself.