cancel
Showing results for
Did you mean:

SOLVED
Go to solution

## PE extent size

Hi ,

I know that default size of an PE is 4 MB and we can assign the value to a PE more than 4 MB.

What is the advantages by assigning more than 4MB to a PE

Regards
Pavan
14 REPLIES 14
Solution

## Re: PE extent size

Hi,

NOTE: One of the VGâ s parameters is max_pe, i.e the maximum number of physical extents this VG can handle per disk. The default value is 1016. Multiplying this with the default PE size of 4MB results in approx. 4GB disk space that can be handled by this VG. Adding a larger disk to this VG later is not possible. Believe me - there are absolutely no options to do this other than vgcreate! Anyway - vgcreate automatically adjusts max_pe in order be able to handle the largest PV given in the arguments. Its always a good idea to set max_pe explicitely to a value large enough to allow for future expansions. This can be done with the -e option of vgcreate.

You can use this command to create VG with specific PE size

#vgcreate â s 4 â p 16 vgnew /dev/dsk/c0t5d0 /dev/dsk/c0t6d0

Regards,
Subodh
Honored Contributor

## Re: PE extent size

hi

if you use PE size of 4 MB and MAX_PE that is max PE per pv is 65535 then single disk of size 4*65535MB can be accomodated in the VG.

if PE size is 256 MB and max PE is set at 5000 then the maximun size of disk that cane be added to the VG is 256*5000MB.

PE size paramaeter can be set only at the time of creating a VG and cant be later on modified as such.

MAX PE can be modified using vgmodify caommand and assocaited patches if vgmodify is supported.

regards
sujit
Honored Contributor

## Re: PE extent size

1)The PE size and max_per_per_pv together define the maximum size that can be used from a disk/pv

ie the size that can be used from a PV = pe size x max_pe_per_pv

here only max_pe_per_pv can be changed after vgcreation .
and its maximum value is 65535 meaning that if the pe size is 4 mb you can use only appox 140 Gb(4x65535) space from a single pv ,

2) the maximum size of LV that can be create in a vg = Pe size x 65535

ie if the pe size is 4MB ,you are limiting the maximum lv size to 140Gb even when you have more free space on the vg
Honored Contributor

## Re: PE extent size

Sujith>>>if PE size is 256 MB and max PE is set at 5000 then the maximun size of disk that cane be added to the VG is 256*5000MB.

I believe you can add bigger disk than 256*5000MB but only 256*50000MB will be usable from that pv and the rest space will remain unaddressed/unused

Rgds!
Johnson

## Re: PE extent size

Hi All,

Thanks for your responces.So its always better idea to have PE size with more than 4MB to support future inclusions.

vgmodify -e can be done online or have to deactivate VG..?

REgards
himacs

## Re: PE extent size

Yes.

What Johnson said is true as we can add the disk more than PE size*65535 but only that much space could be allocatable from that PV.

Honored Contributor

## Re: PE extent size

>>vgmodify -e can be done online or have to deactivate VG..?

Volume group version 2.0 and higher -- vg should be active

volume group version 1.0 use --- vgmodify -a if the vg is active
Honored Contributor

## Re: PE extent size

what OS version are you running ?

Only HPUX 11.31 -> Supports "vgmodify"

>>>vgmodify -e can be done online or have to deactivate VG..?<<<

All the physical volumes associated with the volume group must be available for the vgmodify command to succeed.

http://docs.hp.com/en/B2355-60130/vgmodify.1M.html
Problems are common to all, but attitude makes the difference
Honored Contributor

## Re: PE extent size

Hi

And and interesting toss of answers.

The size of the PE serves two purposes:

a) First PE is the LVM header or 'VGRA' (* volume group reserve area *) on every PV
b) Determines the number of 1024 blocks of data per PE

a) The 'VGRA' contains all the metadata needed so establish the length and bredth of each PV and VG and LV, as well as the VGID which is used in MC/SG. Without this information Online JFS file system blocks of data would cross out of and into disk segments that they shouldn't.

Note the most common error seen when a PE is too small is : "File too large".

When you see 'File too large' then the PE has run out of room and can no longer serve as an LVM header / VGRA.

PE size is determine with this formula:

PE_SIZE = 2 * ( 30 + MAX_PE ) / 1024

Note: 1024 = file system block size.
(* Note that I can no longer find the reference to this formula, the doc has been moved. *)

See below:

http://docs.hp.com/en/5992-6576/5992-6576.pdf
Support Fatherhood - Stop Family Law

## Re: PE extent size

Hi

after reading this post i have a doubt

suppose i am allocating 20 gb disk space from storage and initialized with pvcreate cmd.

# pvcreate /dev/rdsk/c1t3d2s1

i need all the values to be @ maximum

so how can i have a vgcreate command.
Honored Contributor

## Re: PE extent size

vgmodify -e 4500 -s 16 /dev/vg07 /dev/dsk/c10t2/d5

PE_SIZE defaults to 4 MB but can be increase to any power of 2. I.e., 1,2,4,8,16 ... 256.

MAX_PE (* total PE's on in a VG *) defaults to 1016.

Note these formulaa:

PE_SIZE = 2 * ( 30 + MAX_PE ) / 1024

256 = 2 * ( 30 + x ) /1024
256 * 1024 = 2 * ( 30 + x)
262144 /2 -30 = x
131042
Support Fatherhood - Stop Family Law
Honored Contributor

## Re: PE extent size

> suppose i am allocating 20 gb disk space from storage and initialized with pvcreate cmd.

If you are creating a new VG, the vgcreate will automatically change the MAX_PE value from 1016 to about 5000. You can add more 20 GB disks (up to 16 if you do not specify a different value for MAX_PV) to this VG. But you cannot add something bigger such as a 40 GB or 100 GB disk. The MAX_PE value was set when you used vgcreate. On newer versions of HP-UX, the vgmodify command can change some values under some conditions, but it is better to decide how big your disk will be in the future. A 20 GB disk is trivial in size. If you expect to use 500 GB or even 2000 GB disks, set the PE_SIZE to 64 or 128 and also set MAX_PE to 30000 or even 50000.

## Re: PE extent size

Hi All,

Thanks for your support.I will keep ypur suggestions in mind while creating new VG.

Thanks once again!!

Regards
himacs

## Re: PE extent size

hi michael

can u plz explain me in detail

MAX_PE (* total PE's on in a VG *) defaults to 1016.

Note these formulaa:

PE_SIZE = 2 * ( 30 + MAX_PE ) / 1024

256 = 2 * ( 30 + x ) /1024
256 * 1024 = 2 * ( 30 + x)
262144 /2 -30 = x
131042

why 2 and 30 is used ..

final ans 131042 indicates max _pe and where it is used ???