cancel
Showing results for 
Search instead for 
Did you mean: 

PE and LE

newunix
Frequent Advisor

PE and LE

what is PE and LE in lvm..

can u plz explain me in detail..

as for i read the docs

PE should be equal to LE,,, this should be same in all condition or not.

can i have a clear idea about tat
14 REPLIES
James R. Ferguson
Acclaimed Contributor

Re: PE and LE

Hi:

PE = Physical Extent
LE = Logical Extent

An "extent" is a unit of allocation. For a logical volume that is unmirrored, there is a 1:1 PE:LE ratio. If you use LVM mirroring for a logical volume then you might see 2:1 PE:LE or 3:1 PE:LE.

That is, there are *copies* of the logical extents on (by default) different physical volumes.

LVM mirroring is done at the *logical volume* level. See the 'lvm(7) manpages for some fundamental concepts.

Regards!

...JRF...
Michael Steele_2
Honored Contributor

Re: PE and LE

Hi

Physical extents fill up the physical volume - default 4 MB
Logical extents fill up the logical volume - Default 4 MB
An LE is written into ram
A PE is written onto the pv
When the LE is 'flushed' out of RAM the PE is written to disk
Both extents are filled with file system blocks of data - default size 1024 bytes.
You can fill a 4MB extent with 4096 blocks of data.
Support Fatherhood - Stop Family Law
newunix
Frequent Advisor

Re: PE and LE

suppose if i want to create another lv in the same vg ,,, what is the maximum and minimum extent can I use

---------------------------------------------

volume group


VG Name /dev/vg254
VG Write Access read/write
VG Status available, exclusive
Max LV 255
Cur LV 1
Open LV 1
Max PV 16
Cur PV 1
Act PV 1
Max PE per PV 1016
VGDA 2
PE Size (Mbytes) 32
Total PE 255
Alloc PE 255
Free PE 0
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0
VG Version 1.0
VG Max Size 508g
VG Max Extents 16256

--- Logical volumes ---
LV Name /dev/vg254/lvolindexDE
LV Status available/syncd
LV Size (Mbytes) 8160
Current LE 255
Allocated PE 255
Used PV 1


--- Physical volumes ---
PV Name /dev/disk/disk360
PV Status available
Total PE 255
Free PE 0
Autoswitch On
Proactive Polling On


root @ cdd :/>pvdisplay /dev/disk/disk360
--- Physical volumes ---
PV Name /dev/disk/disk360
VG Name /dev/vg254
PV Status available
Allocatable yes
VGDA 2
Cur LV 1
PE Size (Mbytes) 32
Total PE 255
Free PE 0
Allocated PE 255
Stale PE 0
IO Timeout (Seconds) default
Autoswitch On
Proactive Polling On

root @ Cdd :/>v^? lvdisplay -v /dev/vg254/lvolindexDE
--- Logical volumes ---
LV Name /dev/vg254/lvolindexDE
VG Name /dev/vg254
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 8160
Current LE 255
Allocated PE 255
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/disk/disk360 255 255

--- Logical extents ---
LE PV1 PE1 Status 1
00000 /dev/disk/disk360 00000 current
00001 /dev/disk/disk360 00001 current
00002 /dev/disk/disk360 00002 current
00003 /dev/disk/disk360 00003 current
00004 /dev/disk/disk360 00004 current
00005 /dev/disk/disk360 00005 current
00006 /dev/disk/disk360 00006 current
00007 /dev/disk/disk360 00007 current
00008 /dev/disk/disk360 00008 current
00009 /dev/disk/disk360 00009 current
00010 /dev/disk/disk360 00010 current
00011 /dev/disk/disk360 00011 current
00012 /dev/disk/disk360 00012 current
00013 /dev/disk/disk360 00013 current
00014 /dev/disk/disk360 00014 current
00015 /dev/disk/disk360 00015 current
00016 /dev/disk/disk360 00016 current
00017 /dev/disk/disk360 00017 current
00018 /dev/disk/disk360 00018 current
00019 /dev/disk/disk360 00019 current
00020 /dev/disk/disk360 00020 current
00021 /dev/disk/disk360 00021 current
00022 /dev/disk/disk360 00022 current
00023 /dev/disk/disk360 00023 current
00024 /dev/disk/disk360 00024 current
00025 /dev/disk/disk360 00025 current
00026 /dev/disk/disk360 00026 current
00027 /dev/disk/disk360 00027 current
00028 /dev/disk/disk360 00028 current
00029 /dev/disk/disk360 00029 current
00030 /dev/disk/disk360 00030 current
00031 /dev/disk/disk360 00031 current
00032 /dev/disk/disk360 00032 current
00033 /dev/disk/disk360 00033 current
00034 /dev/disk/disk360 00034 current
00035 /dev/disk/disk360 00035 current
00036 /dev/disk/disk360 00036 current
00037 /dev/disk/disk360 00037 current
00038 /dev/disk/disk360 00038 current
00039 /dev/disk/disk360 00039 current
00040 /dev/disk/disk360 00040 current
00041 /dev/disk/disk360 00041 current
00042 /dev/disk/disk360 00042 current
00043 /dev/disk/disk360 00043 current
00044 /dev/disk/disk360 00044 current
00045 /dev/disk/disk360 00045 current
00046 /dev/disk/disk360 00046 current
00047 /dev/disk/disk360 00047 current
00048 /dev/disk/disk360 00048 current
00049 /dev/disk/disk360 00049 current
00050 /dev/disk/disk360 00050 current
00051 /dev/disk/disk360 00051 current
00052 /dev/disk/disk360 00052 current
00053 /dev/disk/disk360 00053 current
00054 /dev/disk/disk360 00054 current
00055 /dev/disk/disk360 00055 current
00056 /dev/disk/disk360 00056 current
00057 /dev/disk/disk360 00057 current
00058 /dev/disk/disk360 00058 current
00059 /dev/disk/disk360 00059 current
00060 /dev/disk/disk360 00060 current
00061 /dev/disk/disk360 00061 current
00062 /dev/disk/disk360 00062 current
00063 /dev/disk/disk360 00063 current
00064 /dev/disk/disk360 00064 current
00065 /dev/disk/disk360 00065 current
00066 /dev/disk/disk360 00066 current
00067 /dev/disk/disk360 00067 current
00068 /dev/disk/disk360 00068 current
00069 /dev/disk/disk360 00069 current
00070 /dev/disk/disk360 00070 current
00071 /dev/disk/disk360 00071 current
00072 /dev/disk/disk360 00072 current
00073 /dev/disk/disk360 00073 current
00074 /dev/disk/disk360 00074 current
00075 /dev/disk/disk360 00075 current
00076 /dev/disk/disk360 00076 current
00077 /dev/disk/disk360 00077 current
00078 /dev/disk/disk360 00078 current
00079 /dev/disk/disk360 00079 current
00080 /dev/disk/disk360 00080 current
00081 /dev/disk/disk360 00081 current
00082 /dev/disk/disk360 00082 current
00083 /dev/disk/disk360 00083 current
00084 /dev/disk/disk360 00084 current
00085 /dev/disk/disk360 00085 current
00086 /dev/disk/disk360 00086 current
00087 /dev/disk/disk360 00087 current
00088 /dev/disk/disk360 00088 current
00089 /dev/disk/disk360 00089 current
00090 /dev/disk/disk360 00090 current
00091 /dev/disk/disk360 00091 current
00092 /dev/disk/disk360 00092 current
00093 /dev/disk/disk360 00093 current
00094 /dev/disk/disk360 00094 current
00095 /dev/disk/disk360 00095 current
00096 /dev/disk/disk360 00096 current
00097 /dev/disk/disk360 00097 current
00098 /dev/disk/disk360 00098 current
00099 /dev/disk/disk360 00099 current
00100 /dev/disk/disk360 00100 current
00101 /dev/disk/disk360 00101 current
00102 /dev/disk/disk360 00102 current
00103 /dev/disk/disk360 00103 current
00104 /dev/disk/disk360 00104 current
00105 /dev/disk/disk360 00105 current
00106 /dev/disk/disk360 00106 current
00107 /dev/disk/disk360 00107 current
00108 /dev/disk/disk360 00108 current
00109 /dev/disk/disk360 00109 current
00110 /dev/disk/disk360 00110 current
00111 /dev/disk/disk360 00111 current
00112 /dev/disk/disk360 00112 current
00113 /dev/disk/disk360 00113 current
00114 /dev/disk/disk360 00114 current
00115 /dev/disk/disk360 00115 current
00116 /dev/disk/disk360 00116 current
00117 /dev/disk/disk360 00117 current
00118 /dev/disk/disk360 00118 current
00119 /dev/disk/disk360 00119 current
00120 /dev/disk/disk360 00120 current
00121 /dev/disk/disk360 00121 current
00122 /dev/disk/disk360 00122 current
00123 /dev/disk/disk360 00123 current
00124 /dev/disk/disk360 00124 current
00125 /dev/disk/disk360 00125 current
00126 /dev/disk/disk360 00126 current
00127 /dev/disk/disk360 00127 current
00128 /dev/disk/disk360 00128 current
00129 /dev/disk/disk360 00129 current
00130 /dev/disk/disk360 00130 current
00131 /dev/disk/disk360 00131 current
00132 /dev/disk/disk360 00132 current
00133 /dev/disk/disk360 00133 current
00134 /dev/disk/disk360 00134 current
00135 /dev/disk/disk360 00135 current
00136 /dev/disk/disk360 00136 current
00137 /dev/disk/disk360 00137 current
00138 /dev/disk/disk360 00138 current
00139 /dev/disk/disk360 00139 current
00140 /dev/disk/disk360 00140 current
00141 /dev/disk/disk360 00141 current
00142 /dev/disk/disk360 00142 current
00143 /dev/disk/disk360 00143 current
00144 /dev/disk/disk360 00144 current
00145 /dev/disk/disk360 00145 current
00146 /dev/disk/disk360 00146 current
00147 /dev/disk/disk360 00147 current
00148 /dev/disk/disk360 00148 current
00149 /dev/disk/disk360 00149 current
00150 /dev/disk/disk360 00150 current
00151 /dev/disk/disk360 00151 current
00152 /dev/disk/disk360 00152 current
00153 /dev/disk/disk360 00153 current
00154 /dev/disk/disk360 00154 current
00155 /dev/disk/disk360 00155 current
00156 /dev/disk/disk360 00156 current
00157 /dev/disk/disk360 00157 current
00158 /dev/disk/disk360 00158 current
00159 /dev/disk/disk360 00159 current
00160 /dev/disk/disk360 00160 current
00161 /dev/disk/disk360 00161 current
00162 /dev/disk/disk360 00162 current
00163 /dev/disk/disk360 00163 current
00164 /dev/disk/disk360 00164 current
00165 /dev/disk/disk360 00165 current
00166 /dev/disk/disk360 00166 current
00167 /dev/disk/disk360 00167 current
00168 /dev/disk/disk360 00168 current
00169 /dev/disk/disk360 00169 current
00170 /dev/disk/disk360 00170 current
00171 /dev/disk/disk360 00171 current
00172 /dev/disk/disk360 00172 current
00173 /dev/disk/disk360 00173 current
00174 /dev/disk/disk360 00174 current
00175 /dev/disk/disk360 00175 current
00176 /dev/disk/disk360 00176 current
00177 /dev/disk/disk360 00177 current
00178 /dev/disk/disk360 00178 current
00179 /dev/disk/disk360 00179 current
00180 /dev/disk/disk360 00180 current
00181 /dev/disk/disk360 00181 current
00182 /dev/disk/disk360 00182 current
00183 /dev/disk/disk360 00183 current
00184 /dev/disk/disk360 00184 current
00185 /dev/disk/disk360 00185 current
00186 /dev/disk/disk360 00186 current
00187 /dev/disk/disk360 00187 current
00188 /dev/disk/disk360 00188 current
00189 /dev/disk/disk360 00189 current
00190 /dev/disk/disk360 00190 current
00191 /dev/disk/disk360 00191 current
00192 /dev/disk/disk360 00192 current
00193 /dev/disk/disk360 00193 current
00194 /dev/disk/disk360 00194 current
00195 /dev/disk/disk360 00195 current
00196 /dev/disk/disk360 00196 current
00197 /dev/disk/disk360 00197 current
00198 /dev/disk/disk360 00198 current
00199 /dev/disk/disk360 00199 current
00200 /dev/disk/disk360 00200 current
00201 /dev/disk/disk360 00201 current
00202 /dev/disk/disk360 00202 current
00203 /dev/disk/disk360 00203 current
00204 /dev/disk/disk360 00204 current
00205 /dev/disk/disk360 00205 current
00206 /dev/disk/disk360 00206 current
00207 /dev/disk/disk360 00207 current
00208 /dev/disk/disk360 00208 current
00209 /dev/disk/disk360 00209 current
00210 /dev/disk/disk360 00210 current
00211 /dev/disk/disk360 00211 current
00212 /dev/disk/disk360 00212 current
00213 /dev/disk/disk360 00213 current
00214 /dev/disk/disk360 00214 current
00215 /dev/disk/disk360 00215 current
00216 /dev/disk/disk360 00216 current
00217 /dev/disk/disk360 00217 current
00218 /dev/disk/disk360 00218 current
00219 /dev/disk/disk360 00219 current
00220 /dev/disk/disk360 00220 current
00221 /dev/disk/disk360 00221 current
00222 /dev/disk/disk360 00222 current
00223 /dev/disk/disk360 00223 current
00224 /dev/disk/disk360 00224 current
00225 /dev/disk/disk360 00225 current
00226 /dev/disk/disk360 00226 current
00227 /dev/disk/disk360 00227 current
00228 /dev/disk/disk360 00228 current
00229 /dev/disk/disk360 00229 current
00230 /dev/disk/disk360 00230 current
00231 /dev/disk/disk360 00231 current
00232 /dev/disk/disk360 00232 current
00233 /dev/disk/disk360 00233 current
00234 /dev/disk/disk360 00234 current
00235 /dev/disk/disk360 00235 current
00236 /dev/disk/disk360 00236 current
00237 /dev/disk/disk360 00237 current
00238 /dev/disk/disk360 00238 current
00239 /dev/disk/disk360 00239 current
00240 /dev/disk/disk360 00240 current
00241 /dev/disk/disk360 00241 current
00242 /dev/disk/disk360 00242 current
00243 /dev/disk/disk360 00243 current
00244 /dev/disk/disk360 00244 current
00245 /dev/disk/disk360 00245 current
00246 /dev/disk/disk360 00246 current
00247 /dev/disk/disk360 00247 current
00248 /dev/disk/disk360 00248 current
00249 /dev/disk/disk360 00249 current
00250 /dev/disk/disk360 00250 current
00251 /dev/disk/disk360 00251 current
00252 /dev/disk/disk360 00252 current
00253 /dev/disk/disk360 00253 current
00254 /dev/disk/disk360 00254 current

Torsten.
Acclaimed Contributor

Re: PE and LE

There are no free PEs, so you cannot create another LV.

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!   
Durvesh Mendhekar
Regular Advisor

Re: PE and LE

Hi,

Add PV to your VG and then try to create a LV into it.

Refer attahed document.

Durvesh
R.K. #
Honored Contributor

Re: PE and LE

Hello..

VGDISPLAY ahs a lot of information
# vgdisplay -v

Total PE 255
Alloc PE 255
Free PE 0 <<<<

So you have no free PE left in your VG, hence you have to add a disk to before you can create an LV.
Don't fix what ain't broke
Matti_Kurkela
Honored Contributor

Re: PE and LE

vgdisplay output:
> PE Size (Mbytes) 32

The extent size of a VG is defined at VG creation time, so even if you add a new disk to your vg254, it would use the same extent size.

Even the vgmodify command cannot change the extent size of an existing VG: if you need to change the extent size, you must create a completely new VG and copy the data over to it.

Your VG name "vg254" suggests you have a lot of volume groups. You might wish to read about LVM v2.x, a new feature of HP-UX 11.31 March 2008 and later releases:

http://docs.hp.com/en/lvm-v2/L2_whitepaper_8.pdf

You should also read the LVM Limits whitepaper:

http://docs.hp.com/en/6054/LVM_Limits_White_Paper_V4.pdf

MK
MK
newunix
Frequent Advisor

Re: PE and LE

so Matti

what u mean is eventhough if i add a disk to that particular vg ,,, i have to recreate the vg and restore the data back to it..

but i have pe size in 32

and max pe per pv is 1016 from the above output

so i have disk up to 31 gb appro( 32 * 1016 )

is it necessary to use vbgmodify cmd here
newunix
Frequent Advisor

Re: PE and LE

hi

just now i am in to unix and steped in to lvm..

reply me for the last post.

if i am correct or not
Johnson Punniyalingam
Honored Contributor

Re: PE and LE

Yes , You are Right, Congratulations into moving to LVM ..:)

But did you read the "Documents or PDF files" which >>Matti<< Gave you ? -> Hence you are beginner you must read & understand the documents ,

vgmodify -> can be used only in HPUX 11.31 version if you are running below than,
you need remove the Volume Group and recreate Volume Group inorder to adjust.
Problems are common to all, but attitude makes the difference
Kranti Mahmud
Honored Contributor

Re: PE and LE

Hi newunix,

as a fresh unix user, u shud have good knowledge on LVM. The attached doc will help U.

Rgds-Kranti
Dont look BACK as U will miss something INFRONT!
Michael Steele_2
Honored Contributor

Re: PE and LE

Hi

Yep, you can with 11.31, else he's right. What's your version?

11.31
vgmodify -e # -s # /dev/vg /dev/dsk/c...

Below 11.31
vgcreate a new vg. This means you've got to acquire new luns, create the new vg and copy old vg to new vg.

Open up a new thread if the later.
Support Fatherhood - Stop Family Law
Matti_Kurkela
Honored Contributor

Re: PE and LE

Your vgdisplay output said:

>Max LV 255
>Cur LV 1
>Open LV 1
>Max PV 16
>Cur PV 1
>Act PV 1
>Max PE per PV 1016
>VGDA 2
>PE Size (Mbytes) 32

This means:
* You can add up to 15 more disks/storage LUNs to this VG. (Max PV - Cur PV = 15)
Because you are now using only 1 disk, there is plenty of room for growth in this aspect.

* Each of those disks should be 32512 MeB or less in size; if you try to add a larger disk to this VG, only the first 32512 MeB is actually used. (PE size * Max PE per PV = 32512 MeB)
As a single physical disk can today hold one terabyte or more, this is very likely going to be a bottleneck.

* Therefore, the maximum total size of this VG is currently restricted to 520192 MeB. (PE size * Max PE per PV * Max PV = 520192 MeB)

* With vgmodify, you can increase the Max PE per PV value up to 65535; this would allow adding disks of 2097120 MeB (= slightly less than 2 TeB) to this VG, increasing the maximum size of the VG to 33553920 MeB = about 31 TeB.

* With vgmodify, you can also increase the Max PV value to 255; if you use vgmodify to change both values, the absolute maximum size is 509 TeB (which is way larger than currently supported by any filesystem).

When a LVM 1.0 VG is created, the system administrator must estimate how big the VG will grow in the future, and adjust the "PE size", "Max PE per PV" and "Max PV" values accordingly.

With vgmodify, you can change the "Max PE per PV" and "Max PV" values later; however, the PE size is set in stone at VG creation time and cannot be changed without destroying & recreating the VG.

It's usually easier to manage a few large disks than a large number of small disks. And if I can choose between a large PE size or a large "Max PE per PV", I would prefer larger PE size. Less PEs = smaller LVM metadata = smaller LVM configuration backup files in /etc/lvmconf on the root filesystem. (With large "Max PE per PV" and "Max PV", those files can become inconveniently large.)

The _minimum_ useful size of a LV is always one extent, so if you increase the PE size, the minimum size of a LV increases; but if you have a multi-terabyte VG, there is usually no need to micro-manage each megabyte individually.

MK
MK
newunix
Frequent Advisor

Re: PE and LE

i am liitle bit clear now

thanks for all responses