1754021 Members
7349 Online
108811 Solutions
New Discussion юеВ

Problems with lvextend

 
SOLVED
Go to solution
Gustavo Souza Lima
Frequent Advisor

Problems with lvextend

HI!!

Can Anyone help, please??
I'm attempting to increase the size of a LV, but the follow message appears:
svuxbil2:/homeroot # lvextend -L 37800 /dev/vgabil2/lvol3
Warning: rounding up logical volume size to extent boundary at size "37808" MB.
lvextend: Not enough free physical extents available.
Logical volume "/dev/vgabil2/lvol3" could not be extended.

I verified if there was enough free PE available in the VG and everything was right.

svuxbil2:/homeroot # vgdisplay vgabil2
--- Volume groups ---
VG Name /dev/vgabil2
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 26
Open LV 26
Max PV 128
Cur PV 4
Act PV 4
Max PE per PV 5749
VGDA 8
PE Size (Mbytes) 16
Total PE 22992
Alloc PE 22211
Free PE 781
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

svuxbil2:/homeroot # lvdisplay /dev/vgabil2/lvol3
--- Logical volumes ---
LV Name /dev/vgabil2/lvol3
VG Name /dev/vgabil2
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 25888
Current LE 1618
Allocated PE 1618
Stripes 0
Stripe Size (Kbytes) 0
Bad block NONE
Allocation PVG-strict/distributed
IO Timeout (Seconds) default

Why can't I increase the LV if in the VG I have enough PE to do it???
7 REPLIES 7
Analyst
Trusted Contributor

Re: Problems with lvextend

HI Lima,

Deactivate the vg

using vgmodify command you can change the max pe per pv and then you can go for lvextend.

probably you can go for 32 pe size in stead of 16.

activate the vg

Then you can increase it .
TTr
Honored Contributor

Re: Problems with lvextend

For you lvol3 you have "Allocation PVG-strict/distributed" so you need to check further before you can extend this volume.

It is distributed to all 4 PEs in vgabil so you must have the same number of free extends on all 4 PVs to be able to extend it. Check the free extends using "vgdisplay -v" and pvdisplay for each PV.
Saeid Ghanei_1
Advisor

Re: Problems with lvextend

Hi,

you have only 781 PE free. Each PE is 16MB, so the total amount of 12496 free disk.

Try again with the command lvextend -L 12496 /dev/vgabil2/lvol3

It should be working.

Good luck

Saeid
Wim Rombauts
Honored Contributor
Solution

Re: Problems with lvextend

My guess : Your /etc/lvmpvg file is not up to date.

When you use PVG-strict/distributed allocation, file /etc/lvmpvg remembers what physical disks belong to what PVG's.

The output of vgdisplay -v /dev/vgabil2 should correctly list the physical volume groups.

The good thing is that this /etc/lvmpvg file is plain ASCII and you can edit it to correct it.

Check that some lines like these are present :
VG /dev/vgabil2
PVG
/dev/dsk/...
/dev/dsk/...
PVG
/dev/dsk/...
/dev/dsk/...
Wim Rombauts
Honored Contributor

Re: Problems with lvextend

By the way :

- Nothing is wrong with "lvextend -L 37800 /dev/vgabil2/lvol3", it will fit in the free space of the VG. You already ave 25888MB and still 16x781MB free.

The fact that your vgdisplay lists "Total PVG 0" is the problem, and that point to /etc/lvmpvg.

Your LV is not mirrored, then why specify PVG-strict allocation ? Issue lvchange -s y or -s n to get it away. Or do you intend to mirror it later on ?
Ganesan R
Honored Contributor

Re: Problems with lvextend

Hi,

Since you have distributed allocation policy on that logical volume you should have enough free PE in all physical volumes on which LV distributed.

Use lvdisplay -v command to find out on which physical volumes the lv is distributed and check all the physical volumes have enough free space. If it is distributed in two pv's, both pv should have half of the space to be extended.

Other workaround is to disable the distributed allocation policay and extend it.
Best wishes,

Ganesh.
Gustavo Souza Lima
Frequent Advisor

Re: Problems with lvextend

I change the Allocantion parameters.
lvchange -D n -s y /dev/vgabil2/lvol3

Disable the distributed and set strict mode instead of PVG-strict.