Operating System - HP-UX
1748126 Members
3750 Online
108758 Solutions
New Discussion юеВ

Re: lvextend: Not enough free physical extents available.

 

lvextend: Not enough free physical extents available.

I'm trying to extend lvol30 from 1000 MB to 1600 MB on c0t4d0 (mirrored c3t4d0) and from what I can see I have lots of space on c0t4d0. c0t4d0 & c3t4d0 currently has lvol29 & lvol30 on it with lvol29 taking PEs 00000-00874 and lvol30 PEs are 00875-01124. This leaving 01125-04339 being free.

when I try:

lvextend -L 1600 /dev/vg00/lvol30 /dev/dsk/c0t4d0


I get the follwoing error. Which I thought you got when there are not enough PEs. What am I missing?

lvextend: Not enough free physical extents available.
Logical volume "/dev/vg00/lvol30" could not be extended.
Failure possibly caused by strict allocation policy

I show I have 3215 free PEs and only need 150 more (from 250 PEs to 400 PEs) I not seeing what I have missed? Why can't I extend lvol30?


--- Logical volumes ---
LV Name /dev/vg00/lvol30
VG Name /dev/vg00
LV Permission read/write
LV Status available/syncd
Mirror copies 1
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 1000
Current LE 250
Allocated PE 500

Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation strict
IO Timeout (Seconds) default

--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c0t4d0 250 250
/dev/dsk/c3t4d0 250 250

--- Logical extents ---
LE PV1 PE1 Status 1 PV2 PE2 Status 2
00000 /dev/dsk/c0t4d0 00875 current /dev/dsk/c3t4d0 00875 current
00001 /dev/dsk/c0t4d0 00876 current /dev/dsk/c3t4d0 00876 current
00002 /dev/dsk/c0t4d0 00877 current /dev/dsk/c3t4d0 00877 current
......
00247 /dev/dsk/c0t4d0 01122 current /dev/dsk/c3t4d0 01122 current
00248 /dev/dsk/c0t4d0 01123 current /dev/dsk/c3t4d0 01123 current
00249 /dev/dsk/c0t4d0 01124 current /dev/dsk/c3t4d0 01124 current

--- Physical volumes ---
PV Name /dev/dsk/c0t4d0
VG Name /dev/vg00
PV Status available
Allocatable yes
VGDA 2
Cur LV 2
PE Size (Mbytes) 4
Total PE 4340
Free PE 3215
Allocated PE 1125
Stale PE 0
IO Timeout (Seconds) default
Autoswitch On

--- Distribution of physical volume ---
LV Name LE of LV PE for LV
/dev/vg00/lvol29 875 875
/dev/vg00/lvol30 250 250

--- Physical extents ---
PE Status LV LE
00000 current /dev/vg00/lvol29 00000
00001 current /dev/vg00/lvol29 00001
00002 current /dev/vg00/lvol29 00002
00003 current /dev/vg00/lvol29 00003
.....
00872 current /dev/vg00/lvol29 00872
00873 current /dev/vg00/lvol29 00873
00874 current /dev/vg00/lvol29 00874
00875 current /dev/vg00/lvol30 00000
00876 current /dev/vg00/lvol30 00001
00877 current /dev/vg00/lvol30 00002
.....
01122 current /dev/vg00/lvol30 00247
01123 current /dev/vg00/lvol30 00248
01124 current /dev/vg00/lvol30 00249
01125 free 00000
01126 free 00000
01127 free 00000
.....
04337 free 00000
04338 free 00000
04339 free 00000


--- Physical volumes ---
PV Name /dev/dsk/c3t4d0
VG Name /dev/vg00
PV Status available
Allocatable yes
VGDA 2
Cur LV 2
PE Size (Mbytes) 4
Total PE 4340
Free PE 3215
Allocated PE 1125
Stale PE 0
IO Timeout (Seconds) default
Autoswitch On

--- Distribution of physical volume ---
LV Name LE of LV PE for LV
/dev/vg00/lvol29 875 875
/dev/vg00/lvol30 250 250

--- Physical extents ---
PE Status LV LE
00000 current /dev/vg00/lvol29 00000
00001 current /dev/vg00/lvol29 00001
00002 current /dev/vg00/lvol29 00002
.....
00876 current /dev/vg00/lvol30 00001
00877 current /dev/vg00/lvol30 00002
00878 current /dev/vg00/lvol30 00003
.....
01122 current /dev/vg00/lvol30 00247
01123 current /dev/vg00/lvol30 00248
01124 current /dev/vg00/lvol30 00249
01125 free 00000
01126 free 00000
01127 free 00000
.....
04337 free 00000
04338 free 00000
04339 free 00000


John David Adamski
Network Specialist/DBA
Graceland University
9 REPLIES 9
A. Clay Stephenson
Acclaimed Contributor

Re: lvextend: Not enough free physical extents available.

While you have enough total free PE's to extend the LVOL including the mirror, you do not have enough free PE's to extend the LVOL and keep the mirrors on separate physical volumes so that the failure of one disk could partially wipe out the LVOL.
If it ain't broke, I can fix that.
James R. Ferguson
Acclaimed Contributor

Re: lvextend: Not enough free physical extents available.

Hi John:

As noted, the message "Failure possibly caused by strict allocation policy" points to the fact that you do not have enough free physical extents on to placed *mirrored* extents on separate physical volumes.

Have a look at the man pages for 'lvcreate' and 'lvextend'; in particular, the discussion of the 'strict' allocation policy.

See also, the man pages for 'lvmpvg(4)'.

Regards!

...JRF...
Devender Khatana
Honored Contributor

Re: lvextend: Not enough free physical extents available.

Hi,

The allocation is set to strict which means that two copy of one PE can not share the same disk. So atleast two disks should have required no. of free PEs.

This can be disabled by using the lvchange command but you will not gain anything as the failure of one disk having two copies of one PE will make the LVOL unavailable causing whole benefit of mirroring to be lost.

HTH,
Devender
Impossible itself mentions "I m possible"

Re: lvextend: Not enough free physical extents available.

Ok, maybe its Friday or maybe I'm just thick, but I don't understand. Granted I'm new to this admin stuff, but I thought I had a grasp on this LMV.

Now the way I understand we have our HP set up is 6 disks for OS and file system and the disk array for the DB, with /dev/dsk/c0txd0 being the primary and /dev/dsk/c3dxd0 being the mirror of the c0txd0 disk for OS & file system. All of these are on vg00, the disk array is on vg01.

I need to extend lvol30 which is on c0t4d0 and mirrored on c3t4d0 the way I read it. Now where I must be thick, I see c0t4d0 and c3t4d0 are on two different PVs, both have about 3215 PEs free and I only need 150 PEs more for lvol30. So, I'm am having a senior moment here as I just don't get why I can't extend the lvol.

I know if I let the system extend the lvol and put the new 150 PE where it want to, it will extend the lvol (on c0t6d0 which almost full). I was just trying to keep lvol30 on c0t4d0 as I have another lvol I also need to extend that is on c06td0.

Well maybe a light bulb will come on over the weekend on this.

John





Devender Khatana
Honored Contributor

Re: lvextend: Not enough free physical extents available.

Hi John,

A bit more explained reply

1. Your lvol30 is of 1000MB but is mirrored so the space allocated for this is 2000MB. Out of which 250 extents are allocated on /dev/dsk/c0t4d0 and another 250 on /dev/dsk/c3t4d0.

2. As you need to extend a mirrored LVOL, you need to plan for double space then the size you are extending to. So you need another 1200MB of space two have two copies of 600MB each.

3. This 600MB space has to be there on two different disks. You can not allcoate 1200 MB of space left on one disk to have both copies of your data.

4. The reason for the error is because not more that one disk is having 600 MB free space. ( only one disk is having free space of equal or more than 600MB)

The following outputs will give a detailed output.

#vgdisplay -v /dev/vg00
#pvdisplay -v /dev/dsk/c0t4d0
#pvdisplay -v /dev/dsk/c3t4d0

Take outputs in a text file and attach same.

Hope I was able to make it a bit simpler.

HTH,
Devender
Impossible itself mentions "I m possible"
A. Clay Stephenson
Acclaimed Contributor

Re: lvextend: Not enough free physical extents available.



Okay, let's try again:

You told the box to:

lvextend -L 1600 /dev/vg00/lvol30 /dev/dsk/c0t4d0

Note that you told it to extend the LVOL on a specific PV (/dev/dsk/c0t4d0); in effect telling it to extend both copies on one device -- in violation of the strict policy.

Had you simply,
lvextend -L 1600 /dev/vg00/lvol30
all would have been well because two separate PV's would have been chosen.

If it ain't broke, I can fix that.

Re: lvextend: Not enough free physical extents available.

clarification needed, does lvextend -L xx mean the lvol will be xx size or to add xx to the lvol?
Robert-Jan Goossens
Honored Contributor

Re: lvextend: Not enough free physical extents available.

lvextend -L (total size)

---
Increase the space allocated to the logical volume, specified in megabytes. lv_size is a decimal value greater than the current logical volume size
---
Regards,
Robert-Jan

Re: lvextend: Not enough free physical extents available.

Well that's a big D'oh for me. I need the new size of the lvol to be 1600 MB or 400 PE not add 1600 MB 400 PEs.

Thanks everyone for your help with my dyslexic moment, guess I shouldn├в t kip my morning donut.

John