Operating System - HP-UX
1833346 Members
2787 Online
110051 Solutions
New Discussion

lvextend: Not enough free physical extents available.

 
Fuad_1
Regular Advisor

lvextend: Not enough free physical extents available.

I am trying to increase /home to 1GB, and I got this error. Eventhough, there is almost 7GB free. This FS is used LV which is in VG00, that is used 2 PV, one mirror the second. I also, found that one disk has 0 free PE, where the second has 948 PE free. Kindly help?
Set goals, and work to achieve them
13 REPLIES 13
Devender Khatana
Honored Contributor

Re: lvextend: Not enough free physical extents available.

Hi,

Possibally this LV has got strict allocation policy set which is causing this. If this is set then two copies of each LE's will be kept on seperate physical volumes & here it will not be possible as you have 0 free PE on one disk causing this error. Can be resolved by changing strict allocation policy using lvchange command with -s option but is not recommended as may cause data loss when second disk having both copies of your data of this file system fails.

HTH,
Devender
Impossible itself mentions "I m possible"
Joseph Loo
Honored Contributor

Re: lvextend: Not enough free physical extents available.

hi,

not sure i understand fully, could u post output of vgdisplay from VG00?

# vgdisplay -v vg00

regards.
what you do not see does not mean you should not believe
Fuad_1
Regular Advisor

Re: lvextend: Not enough free physical extents available.

hi,

See attached.
Set goals, and work to achieve them
Devender Khatana
Honored Contributor

Re: lvextend: Not enough free physical extents available.

Hi,

Could you also attach "bdf" & "lvdisplay -v /dev/vg00/lvol* " for us to know which file system corresponds to /home & what are the parameters set for that.

Regards,
Devender
Impossible itself mentions "I m possible"
Florian Heigl (new acc)
Honored Contributor

Re: lvextend: Not enough free physical extents available.

As Your whole vg00 is mirrored the error message almost definitely points to an strict allocation problem.
I'd say You don't really need it for /home, so You could disable it with
lvchange -s n /dev/vg00/lvol

If You don't want to break the allocation policy, You will have to move the lv to the end of Your allocated PEs on the disks, but I don't think You want to do that :)
yesterday I stood at the edge. Today I'm one step ahead.
Fuad_1
Regular Advisor

Re: lvextend: Not enough free physical extents available.

see attached
Set goals, and work to achieve them
Devender Khatana
Honored Contributor

Re: lvextend: Not enough free physical extents available.

Hi,

Yes , Strcit allocation is set, so for this to become a mirroed LV both disks should have atleast the amount of free space by which you want to extend this. The other option is to change allocation policy & then extending with mirror. If you can have it without mirror then reduce mirror from the disk not having the free space & extend the LV.

HTH,
Devender
Impossible itself mentions "I m possible"
Senthil Kumar .A_1
Honored Contributor

Re: lvextend: Not enough free physical extents available.

Hi Fuad,

From your attachement...

LV Name /dev/vg00/lvol11
LV Status available/syncd
LV Size (Mbytes) 512
Current LE 64
Allocated PE 128 <---- NOTICE
Used PV 2

LV Name /dev/vg00/lvol12
LV Status available/syncd
LV Size (Mbytes) 20480
Current LE 2560
Allocated PE 2560 <---- NOTICE
Used PV 2

Notice that LVOL12 is not mirrored and is has used the last remaining 1754 PE's of PV1 and has used last 806 PE's in the seconf PV2 leaving 948 PE's free in PV2. as you see for mirroed LVOL11 has twice the number of PE's compared to LE's...

you have two option...

1) Move the lvol12 to anyother VG where you do not want it to be mirrored it anyway..whereas you want all LV's in vg00 to be mirrored..

2) As others have suggested turnoff the mirror allocation policy to NON-STRICT policy while creating the LV..


ex :
lvcreate -s n -L vg00
lvextend -m 1 /dev/vg00/lvol13

But bear in mind that your size of new LV, cannot be more than... 474 * 8 MB = 3792 MB .

Regards.
Let your effort be such, the very words to define it, by a layman - would sound like a "POETRY" ;)
Fred Ruffet
Honored Contributor

Re: lvextend: Not enough free physical extents available.

Note that this difference between the two PV shows that at least one lv is not mirrored on VG00. This can be very dangerous, depending on what is not mirrored. If c1t2d0 fail, you will lose data, or a swap device.

Have a look at output from these commands :
vgdisplay -v vg00 | grep "LV Name" | awk '{print $NF}' | while read lv
do
echo "$lv : \c"
lvdisplay -v $lv | grep Mirror | awk '{print $NF}'
done
It will show a line per LV and the number of mirrors it has. Mirroring the ones that are not mirrored may be more important than increasing /home as it may bring you serious damage.

Regards,

Fred
--

"Reality is just a point of view." (P. K. D.)
Fuad_1
Regular Advisor

Re: lvextend: Not enough free physical extents available.

There is one LV which is not mirrored, and it is temp LV just created 2 days back. But, even when I tried to mirror it, it shows:

lvextend: Not enough free physical extents available.
Set goals, and work to achieve them
Fred Ruffet
Honored Contributor

Re: lvextend: Not enough free physical extents available.

Could you post output for :
mount
bdf
For us to see what LV corresponds to what FS ?

Regards,

Fred
--

"Reality is just a point of view." (P. K. D.)
Fuad_1
Regular Advisor

Re: lvextend: Not enough free physical extents available.

hi,

See attached

mount

bdf

output.

Best wishes.
Set goals, and work to achieve them
Devender Khatana
Honored Contributor

Re: lvextend: Not enough free physical extents available.

Hi,

As stated earlier you have free PEs on only one disk but your allocation policy require the extents to be there on different disks for both copies of data. Options left.

1. Extend File system after removing mirror.

2. Extend file system with mirror but after changing Strict allocation policy to off through lvchange command.

3. Extend after adding another disk to VG.

HTH,
Devender
Impossible itself mentions "I m possible"