Operating System - HP-UX
1753792 Members
3654 Online
108799 Solutions
New Discussion юеВ

Free PE but lvextend fails

 
SOLVED
Go to solution
Joachim Weber_1
Advisor

Free PE but lvextend fails

Hi,

I tried to extend and lvol and the lvextend comes back and tells me:
# lvextend -L 1500 /dev/vg_158/lvol7
Warning: rounding up logical volume size to extent boundary at size "1504" MB.
lvextend: Not enough free physical extents available.
Logical volume "/dev/vg_158/lvol7" could not be extended.

Although, vgdisplay tells me:
VG Name /dev/vg_158
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 11
Open LV 11
Max PV 16
Cur PV 2
Act PV 2
Max PE per PV 5000
VGDA 4
PE Size (Mbytes) 16
Total PE 8748
Alloc PE 5300
Free PE 3448
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

The config of this lvol might be not entirely correct since it is a leftover from a merge of 2 hard partitions. But I don't know where to look.
Maybe somebody knows.

Thanks,

Joachim
18 REPLIES 18
Joachim Weber_1
Advisor

Re: Free PE but lvextend fails

Sorry forgot lvdisplay -v /dev/vg_158/lvol7

LV Name /dev/vg_158/lvol7
VG Name /dev/vg_158
LV Permission read/write
LV Status available/syncd
Mirror copies 1
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 1024
Current LE 64
Allocated PE 128
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation PVG-strict
IO Timeout (Seconds) default
Jdamian
Respected Contributor

Re: Free PE but lvextend fails

Did you realize lvol has a mirror copy with PVG-stric policy ?

You must check the distribution of those all free PEs... a half should reside in one PV (belonging to a PVG) and the other half in other PV (belonging to another PVG).
Joachim Weber_1
Advisor

Re: Free PE but lvextend fails

Would the mirror be a problem when issuing lvextend -L 1500 /dev/vg_158/lvol7. I was under the impression the mirror is als extended by default?

lvdisplay:

--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c27t6d0 64 64
/dev/dsk/c31t0d0 64 64

And the VG looks like there would be equally sized space left.


--- Physical volumes ---
PV Name /dev/dsk/c27t6d0
PV Status available
Total PE 4374
Free PE 1724
Autoswitch On

PV Name /dev/dsk/c31t0d0
PV Status available
Total PE 4374
Free PE 1724
Autoswitch On
Mark Grant
Honored Contributor

Re: Free PE but lvextend fails

This logical volume is mirrored and uses 16GB extents. You need 204 extents in the volume roup to satisfy your request.
Never preceed any demonstration with anything more predictive than "watch this"
Joachim Weber_1
Advisor

Re: Free PE but lvextend fails

Mark, you got me. I have to admitt I have no idea where the 204 is coming from. Could you please explain?
Jdamian
Respected Contributor

Re: Free PE but lvextend fails

As test, try to add just ONE physical extent:

lvextend -l 65 /dev/vg_158/lvol7
Jdamian
Respected Contributor

Re: Free PE but lvextend fails

Ooppps !

As test, try to add just ONE logiccal extent (= two physical extents):

lvextend -l 65 /dev/vg_158/lvol7
Joachim Weber_1
Advisor

Re: Free PE but lvextend fails

It would allow me to extend on even 1 extend.

I found in the man pages a hint to /etc/lvmpvg. I added the entries:

VG /dev/vg_158
PVG pv_158
/dev/dsk/c27t6d0
PVG pv_158_m
/dev/dsk/c31t0d0

Now the extension works with another error:
# lvextend -L 1500 /dev/vg_158/lvol7
Warning: rounding up logical volume size to extent boundary at size "1504" MB.
Logical volume "/dev/vg_158/lvol7" has been successfully extended.
Warning: Logical Volume number "1073741828" found on physical volume not found in "/dev/vg_158".
Volume Group configuration for /dev/vg_158 has been saved in /etc/lvmconf/vg_158.conf

What can I do about that?
Mark Grant
Honored Contributor

Re: Free PE but lvextend fails

In that case I hope I was correct!

Oh dear :(

Looks like I was wrong. serves me right. You need 64. However, as mentioned, you have PVG-strict which means the mirror has to be on a different PVG that the primary. You need to make sure your free space is available across your physical volume groups.


Never preceed any demonstration with anything more predictive than "watch this"