Operating System - HP-UX
1835041 Members
2128 Online
110073 Solutions
New Discussion

Getting error while extending LV

 
Prabhi
Advisor

Getting error while extending LV

How to calculate the FREE PE size

lvextend: Not enough free physical extents available.
Logical volume "/dev/vg00/lvol5" could not be extended.
Failure possibly caused by strict allocation policy
6 REPLIES 6
James R. Ferguson
Acclaimed Contributor

Re: Getting error while extending LV

Hi:

If you do a 'vgdisplay -v vgname' then you will see the overall available physical extents as "Free PE".

However, if you are mirroring your logical volume, the 'strict' allocation policy will be the default. This policy says that you cannot allocate mirrored extents on the same physical volume. After all, to do so would defeat the high-availability protection that mirroring offers since if you lost a physical volume and all of its mirrors were on it, you lost everything.

That said, an 'lvdisplay -v lvname' of the logical volume in question will show you *where* the logical volume extents reside. From that distribution summary you can find the physical volumes used; and from a 'pvdisplay' of the physical volumes in the original 'vgdisplay' you can ascertain where you have room.

Regards!

...JRF...
Prabhi
Advisor

Re: Getting error while extending LV

How to calculate from the belowvgdisplay output ?

uctnp612% nexec -e vgdisplay -v vg00
--- Volume groups ---
VG Name /dev/vg00
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 8
Open LV 8
Max PV 16
Cur PV 3
Act PV 3
Max PE per PV 4350
VGDA 6
PE Size (Mbytes) 8
Total PE 8654
Alloc PE 6510
Free PE 2144
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

--- Logical volumes ---
LV Name /dev/vg00/lvol1
LV Status available/syncd
LV Size (Mbytes) 1024
Current LE 128
Allocated PE 384
Used PV 3

LV Name /dev/vg00/lvol2
LV Status available/syncd
LV Size (Mbytes) 4096
Current LE 512
Allocated PE 1536
Used PV 3

LV Name /dev/vg00/lvol3
LV Status available/syncd
LV Size (Mbytes) 1024
Current LE 128
Allocated PE 384
Used PV 3

LV Name /dev/vg00/lvol5
LV Status available/syncd
LV Size (Mbytes) 3024
Current LE 378
Allocated PE 1134
Used PV 3

LV Name /dev/vg00/lvol6
LV Status available/syncd
LV Size (Mbytes) 1024
Current LE 128
Allocated PE 384
Used PV 3

LV Name /dev/vg00/lvol7
LV Status available/syncd
LV Size (Mbytes) 3072
Current LE 384
Allocated PE 1152
Used PV 3

LV Name /dev/vg00/lvol8
LV Status available/syncd
LV Size (Mbytes) 2048
Current LE 256
Allocated PE 768
Used PV 3

LV Name /dev/vg00/lvol9
LV Status available/syncd
LV Size (Mbytes) 2048
Current LE 256
Allocated PE 768
Used PV 3


--- Physical volumes ---
PV Name /dev/dsk/c1t6d0
PV Status available
Total PE 2170
Free PE 0
Autoswitch On

PV Name /dev/dsk/c2t6d0
PV Status available
Total PE 2170
Free PE 0
Autoswitch On
James R. Ferguson
Acclaimed Contributor

Re: Getting error while extending LV

Hi (again):

Your output from 'vgdisplay -v vg00' shows that vg00 contains *three* physical volumes ("Cur PV 3" and "Act PV 3") and yet you haven't shown me the last physical volume. It appears that you 'vgextend'ed into vg00 another physical volume although you only show two physical volumes (c1t6d0 and c2t6d0), neither of which free extents available (Free PE 0).

Examining the 'vgdisplay' further shows that every logical volume has allocated physical extents (PE) that are *three* times the value for the current logical extents (LE).

Had you posted the 'lvdisplay -v' for 'dev/vg00/lvol5' as I asked, I think you will see that the number of mirror copies is two (2) which is actually a 3-way mirror.

Further, the verbose output of the 'lvdisplay' will show you the allocation of logical extents to physical extents by physical volume.

While you have free physical extents, enlarging the logical volume can't be done unless no mirrored extent is placed on the same physical volume as I said originally.

Regards!

...JRF...
Kapil Jha
Honored Contributor

Re: Getting error while extending LV

PE Size (Mbytes) 8
----
----
Free PE 2144

Its PE size*Free PE=8*2144=17152(16.6G)

You will also have to check if you LVs are mirrored then available space would be 16.6/2
if you have 3 mirror copeies then free space would be 16.6/3 and so on.

One thing PVG also comes in picture here you don't have PVG anyways but you should take care of PVG as well.

BR,
Kapil+
I am in this small bowl, I wane see the real world......
Torsten.
Acclaimed Contributor

Re: Getting error while extending LV

In your vgdisplay output one disk is missing. Cut'n'paste problem?

Do also

# lvdisplay -v /dev/vg00/lvol5 | head -n 30

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
shanmuhanandam
HPE Pro

Re: Getting error while extending LV

Hi,
where is third PV?
if you post the lvdisplay -v /dev/vg00/lvol5 o/p and the vgdisplay -v vg00 o/p details, it will be easy to help you.



Thanks,
Shnamugam.B
I am an HPE Employee

Accept or Kudo