Operating System - HP-UX
1836611 Members
3603 Online
110102 Solutions
New Discussion

How to increase PEs allocated to a logical volume

 
SOLVED
Go to solution
Nikhil_6
Occasional Advisor

How to increase PEs allocated to a logical volume

I need to extend size of one of the logical volumes on my machine.
The volume group has nearly 10GB free. When I try to extend the size of the particular volume group I get an error "Not enough free physical extents available". The allocated PE and used PE are equal for this volume group.
The solution could be moving all data from this volume to some other, remove this volume and recreate, move back original data. So the question is can this particular logical volume be extended in any other way?

15 REPLIES 15
RAC_1
Honored Contributor

Re: How to increase PEs allocated to a logical volume

are there any free PEs in this VG???
vgdisplay vgxx

Does the lvol has strict policy set??
lvdisplay /dev/vgxx/lvolx.

Anil
There is no substitute to HARDWORK
Sridhar Bhaskarla
Honored Contributor

Re: How to increase PEs allocated to a logical volume

Nikhil,

Your question is not too clear to me. You said the VG has 10 GB free. If it does have 10 GB free, then you should be able to extend your logical volume.

But if the allocated PE and used PE are equal (means Free PE is 0), then it means there is no space available in the VG. How did you determine that the VG had 10GB free?

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Denver Osborn
Honored Contributor

Re: How to increase PEs allocated to a logical volume

wait a sec... you lost me. :)


Let me see if this is it... you have a Volume Group w/ 10GB of unallocated space and you need to increase the size of your Logical Volume, but lvextend fails and tells you there isn't enough space....

To make it easier, can you post the "vgdisplay -v /dev/vg_name" and "lvdisplay /dev/lvol_name" output.

Thanks!
-denver

Todd McDaniel_1
Honored Contributor

Re: How to increase PEs allocated to a logical volume

You have 10gb free...is that on one disk or 2 mirrored? If it is mirrored do you have enough PE on 2 disks to extend it? Then it would be only 5GB of space...

I can only assume that this lvol isnt striped...

Have you tried to increment the lvextend?

lvextend by 1GB bites...to see if it will work?

Try that and not the whole enchilada at once...
Unix, the other white meat.
Nikhil_6
Occasional Advisor

Re: How to increase PEs allocated to a logical volume

ok.
>>are there any free PEs in this VG???
There are 2128 free PEs of 4MB each.
>>Does the lvol has strict policy set??
the lvol '0topindex' has no stict policy set.
Here comes the vgdisplay and lvdisplay output for the vg01 and the volume involved.
>>>>>> VGDISPLAY

--- Volume groups ---
VG Name /dev/vg01
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 32
Open LV 32
Max PV 16
Cur PV 1
Act PV 1
Max PE per PV 12994
VGDA 2
PE Size (Mbytes) 4
Total PE 12992
Alloc PE 10864
Free PE 2128
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

--- Logical volumes ---
LV Name /dev/vg01/0topindex
LV Status available/syncd
LV Size (Mbytes) 9000
Current LE 2250
Allocated PE 2250
Used PV 1


--- Physical volumes ---
PV Name /dev/dsk/c5t0d0
PV Name /dev/dsk/c3t0d0 Alternate Link
PV Status available
Total PE 12992
Free PE 2128
Autoswitch On


>>>>> LVDISPLAY
--- Logical volumes ---
LV Name /dev/vg01/0topindex
VG Name /dev/vg01
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 9000
Current LE 2250
Allocated PE 2250
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation PVG-strict
IO Timeout (Seconds) default

--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c5t0d0 2250 2250

--- Logical extents ---
LE PV1 PE1 Status 1
00000 /dev/dsk/c5t0d0 00031 current
00001 /dev/dsk/c5t0d0 00032 current
00002 /dev/dsk/c5t0d0 00033 current
00003 /dev/dsk/c5t0d0 00034 current
000000000000
00000000000
and so on... till another 2500 lines...

Jeff Schussele
Honored Contributor

Re: How to increase PEs allocated to a logical volume

Hi Nikhil,

You've already allocated all the space to the VG - so you can't extend it further with adding another PV.
You need to extend the appropriate LV with lvextend. I think you're confusing your ??extend commands.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Nikhil_6
Occasional Advisor

Re: How to increase PEs allocated to a logical volume

Jeff,
Is there any way around to extend the PEs allocated to the volume group '0topindex'?
Or is it that I need to backup the data, and recreate volume with increased size?
Todd McDaniel_1
Honored Contributor

Re: How to increase PEs allocated to a logical volume

You have:

Allocation PVG-strict on that LVOL...

However, that shouldnt matter since your LVOL has the same disk device as your free PEs are on.

BTW, you only have 4GB free not 10GB. so try to add by increasing 1 GB at a time... 1,2,3,4 GB to the LVOL then let us know what you get.

Should be no problem adding 1GB at a time.
Unix, the other white meat.
Todd McDaniel_1
Honored Contributor

Re: How to increase PEs allocated to a logical volume

Oopsie

You have 8GB free... bad math. but still not 10GB

lvextend LVOL
Unix, the other white meat.
KapilRaj
Honored Contributor

Re: How to increase PEs allocated to a logical volume

lvextend -l 2128 /dev/vg01/0topindex;umount /mnt_pnt; extendfs -F /dev/vg01/r0topindex ; mount /mnt_pnt

This is all what u can do nothing more, This will increase /dev/vg01/r0topindex 's size to another 8.5 GB

Regds,

Kaps
Nothing is impossible
Denver Osborn
Honored Contributor
Solution

Re: How to increase PEs allocated to a logical volume

The problem is that the LVOL is set to PVG Strict... and you may have an /etc/lvmpvg there, but with old or incorrect entries.. so the lvextend fails. anywho, if I were you and since the lvol isn't mirrored, I'd remove the PVG Strict allocation then extend it.

lvchange -s n /dev/vg_name/lvol_name

Hope this helps,
-denver
Nikhil_6
Occasional Advisor

Re: How to increase PEs allocated to a logical volume

Thank you guys for all the support. The problem was genuine and a configuration problem existed!
Check a file named /etc/lvmpvg, which must contain information about all the volume groups existing on the system along with disk information. (/dev/dsk/cxtydz and /dev/rdsk/cxtydz etc.)
So just put the entries which were absent and lvextend works just as smmothly as it can go!!
Cheers!
Thank you all.
Nikhil_6
Occasional Advisor

Re: How to increase PEs allocated to a logical volume

Denver,
Just before I could read ur reply regarding /etc/lvmpvg I somehow found the thing!!!
Still, I appreciate your help.
Thank you,

Regards,

Nikhil.
Jeff Schussele
Honored Contributor

Re: How to increase PEs allocated to a logical volume

Hey..Hey..Colorado rocks.
Good to see you around again Denver.
Where ya been hiding?

No points,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Nikhil_6
Occasional Advisor

Re: How to increase PEs allocated to a logical volume

Hi all!
Please note the following:
After recovery from an ignite recovery tape which contains only 'vg00' and not any other volume group(s) besides it, the file /etc/lvmpvg would reflect configuration of only vg00 and not any other volume group. (Even if recovery tape contains lvm and vg information about those volume groups and lvols.)
So dont get puzzled after recovery if you find that u are not able to smoothly extend a volume!
Just make sure that before craeting ignite archive backup this file somewhere else on vg00 so that you can put it back into /etc.