Operating System - HP-UX
1833323 Members
3094 Online
110051 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"
john korterman
Honored Contributor

Re: Free PE but lvextend fails

Hi,
it would be practical to see the distribution of the logical volume, i.e. which disks are used. The information appears in the:
# lvdislay -v dev/vg_158/lvol7
command
after the text "Distribution of logical volume".
It is also necessary to see how the physical volumes are used: please show the output after the string "Physical volumes" in this command:
# vgdisplay -v /dev/vg_158

regards,
John K.
it would be nice if you always got a second chance
Joachim Weber_1
Advisor

Re: Free PE but lvextend fails

I actually wanted to say It wouldn't let me extend on even 1 extend.

Sorry Mark, I'm still looking like an opossum. 64?

John, I've attached now the output of lvdisplay and vgdisplay.

Thanks
Robert-Jan Goossens
Honored Contributor

Re: Free PE but lvextend fails

Hi Joachim,

LV Name /dev/vg_158/lvol7
LV Status available/syncd
LV Size (Mbytes) 1504
Current LE 94
Allocated PE 188
Used PV 2

lvextend did extend your logical volume !

Regards,
Robert-Jan
john korterman
Honored Contributor

Re: Free PE but lvextend fails

Hi again.
your logical volume /dev/vg_158/lvol7 now has the size of 1504 mb. The primary part of it is located on /dev/dsk/c27t6d0 wheras the mirror is located on /dev/dsk/c31t0d0 - it looks very nice. The primary disk as well as the mirror uses 94 extents. As indicated in your first posting by "PE Size (Mbytes) 16" each extend has the size of 16 mb (megabytes). An extent is in LVM terms the lump of disk space which LVM uses for practical purposes. 16 x 94 = 1504.

regards,
John K.
it would be nice if you always got a second chance
Jeff Schussele
Honored Contributor

Re: Free PE but lvextend fails

Good eye, R-J.

I have to agree Joachim.
Try the fsextend now - IF you have OnLine JFS.
See what happens.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Jeff Schussele
Honored Contributor

Re: Free PE but lvextend fails

...meant fsadm command IF you have OnLine JFS.
fsextend is used if you don't when it's unmounted.

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

Re: Free PE but lvextend fails

Hi,

Yes you're right. The extension worked. fsadm worked as well. So almost everything looks fine now. Maybe somebody knows if I need to worry about the comment which came up when executing lvextend:

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


Thanks
john korterman
Honored Contributor
Solution

Re: Free PE but lvextend fails

Hi Jochen,
please check this link:

http://www5.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000072570217

Document id: KBRC00014287 in the technical knowledge base.

regards,
John K.
it would be nice if you always got a second chance
Joachim Weber_1
Advisor

Re: Free PE but lvextend fails

Hi John,

That's it! These disks have been the boot disks of another server. Now they are used just as normal local disks. This boot info is not needed anymore.

Thanks very much John and Thanks to all who contributed!!