Operating System - HP-UX
1755031 Members
5907 Online
108828 Solutions
New Discussion юеВ

lvcreate: Not enough free physical extents available.

 
Chas Kalsi
Occasional Contributor

lvcreate: Not enough free physical extents available.

I am trying to create one volume group with one lvol and stripe it. I have 5 disks which give me 21 gig in total.

Done the following:
pvcreate /dev/rdsk/c2t0d0
pvcreate /dev/rdsk/c2t1d0
pvcreate /dev/rdsk/c2t2d0
pvcreate /dev/rdsk/c2t4d0
pvcreate /dev/rdsk/c2t5d0

vgextend /dev/db /dev/dsk/c2t1d0
.
.
.
.

vgcreate -e 5500 -p 5 -s 4 /dev/db /dev/dsk/c2t0d0

lvcreate -L 10480 -i 5 -I 4096 /dev/db

Logical volume "/dev/db/lvol1" has been successfully created with
character device "/dev/db/rlvol1".
lvcreate: Not enough free physical extents available.
Logical volume "/dev/db/lvol1" could not be extended.
lvcreate: Couldn't retrieve the list of the physical volumes
belonging to volume group "/dev/db".
Run the "lvextend" command to create space on the Logical Volume.

what is going wrong ??


Venus:/> vgdisplay -v db |more
--- Volume groups ---
VG Name /dev/db
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 1
Open LV 1
Max PV 5
Cur PV 5
Act PV 5
Max PE per PV 5500
VGDA 10
PE Size (Mbytes) 4
Total PE 5231
Alloc PE 0
Free PE 5231
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

--- Logical volumes ---
LV Name /dev/db/lvol1
LV Status available/syncd
LV Size (Mbytes) 0
Current LE 0
Allocated PE 0
Used PV 0


--- Physical volumes ---
PV Name /dev/dsk/c2t0d0
PV Status available
Total PE 508
Free PE 508
Autoswitch On

PV Name /dev/dsk/c2t1d0
PV Status available
Total PE 2169
Free PE 2169
Autoswitch On

PV Name /dev/dsk/c2t2d0
PV Status available
Total PE 1023
Free PE 1023
Autoswitch On

PV Name /dev/dsk/c2t4d0
PV Status available
Total PE 1023
Free PE 1023
Autoswitch On

PV Name /dev/dsk/c2t5d0
PV Status available
Total PE 508
Free PE 508
Autoswitch On


Venus:/>
10 REPLIES 10
Craig Rants
Honored Contributor

Re: lvcreate: Not enough free physical extents available.

Try lvcreate -L 5231 -i 5 -I 4096 /dev/db

the -l option will use pe's

GL,
C
"In theory, there is no difference between theory and practice. But, in practice, there is. " Jan L.A. van de Snepscheut
Sandip Ghosh
Honored Contributor

Re: lvcreate: Not enough free physical extents available.

Since your all disks are not of same size it can't stripe like that. It can stripe upto the size of the smaller disk, means it can stripe upto 508 PEs.

Sandip
Good Luck!!!
Sachin Patel
Honored Contributor

Re: lvcreate: Not enough free physical extents available.

Hi Chas,

If you are creating brand new vg on brand new pv you don't need to run vgextend

say you are creating vg02
#pvcreate
#mkdir /dev/vg02
#mknod /dev/vg02/group c 64 0x020000
#vgcreate (put all pv paths)
#lvcreate
#newfs

If you are extending lv/vg then
#pvcreate
#vgextend (give all 5 disk path)
#lvextend
#extendfs

Sachin
Is photography a hobby or another way to spend $
James R. Ferguson
Acclaimed Contributor

Re: lvcreate: Not enough free physical extents available.

Hi Chas:

It appears that you created a volume group with only *one* physical disk and then attempted to stripe a logical volume across *five*:

# vgcreate -e 5500 -p 5 -s 4 /dev/db /dev/dsk/c2t0d0

# lvcreate -L 10480 -i 5 -I 4096 /dev/db

You need to 'vgextend' your other four physical disk into /dev/db and then do the 'lvcreate' or start by specifying all five physical disk (pv_path) in the 'vgcreate'.

Regards!

...JRF...

Victor_5
Trusted Contributor

Re: lvcreate: Not enough free physical extents available.

See the attached for your reference. Good luck!
S.K. Chan
Honored Contributor

Re: lvcreate: Not enough free physical extents available.

Your problem is the stripe size, set it to a smaller size ..
-I 1024
Craig Rants
Honored Contributor

Re: lvcreate: Not enough free physical extents available.

oops meant to say -l in the lv command...

C
"In theory, there is no difference between theory and practice. But, in practice, there is. " Jan L.A. van de Snepscheut
Sandip Ghosh
Honored Contributor

Re: lvcreate: Not enough free physical extents available.

With my earlier explanation the maximum striped lvol you can create is 508(PE Size)*4(LE Size)*5(no. of volume)= 10160 MB.

Sandip

Good Luck!!!
James R. Ferguson
Acclaimed Contributor

Re: lvcreate: Not enough free physical extents available.

Hi (again) Chas:

Upon further reading of your post I (finally) saw the you actually had created the volume group. However, based on you 'vgdisplay' your *smallest* disk only has 508 4MB-extents. This means that striping across your 5-disks ('lvcreate -L 10480 -i 5 -I 4096') will require 10480/5 or 2096MB per disk, *more* space than you have on the smallest disk. Clearly, you need to decrease the size of your logical volume if you are going to utilize this configuration.

Regards!

...JRF...