Operating System - HP-UX
1837523 Members
3386 Online
110117 Solutions
New Discussion

Re: changing a VG's 'max_pe' value

 
SOLVED
Go to solution
Mark Henry_1
Frequent Advisor

changing a VG's 'max_pe' value

Hi All,

I recently added a new lun to a volume group and was informed that while the physical volume contained 2559 physical extents, the max_pe for that VG was 2500, therefore it would only use that smaller #.
Is there a way to modify that value for the volume group? I can only see how to set it when vgcreate'ing.

In what scenario would you want to limit the amount of PE's allocatable to a VG - you can only assign a PV to a single VG, right? It's not like you could use the unused PE's in another VG...

Cheers,

Mark
3 REPLIES 3
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: changing a VG's 'max_pe' value

Hi Mark,

You have just discovered a 'feature' of LVM.
If you attempt to extend a volume group by adding an additional PV you are limited by the max PE per PV set when the VG was created.


If it ain't broke, I can fix that.
James R. Ferguson
Acclaimed Contributor

Re: changing a VG's 'max_pe' value

Hi Mark:

The values of 'max_pe', 'max_pv', 'pe_size' and 'max_lv' are fixed at 'vgcreate' and cannot be changed unless the volume group is recreated from scratch.

'max_pe' is set to 1016 or the the number of physical extents in the largest disk used in the 'vgcreate' process. See the 'vgcreate' man pages for more details.

The 'max_pe' value is used to calculate the physical-to-logical extent mapping information kept in the VGRA. It is written to the disk first, and then data afterwards, so there is no provision to expand this mapping.

Stated differently, the size of the LVM structures must fit into one physical extent. Thus, different geometries can be found by varying 'pe_size', 'max_pv', 'max_lv' and 'max_pe'. In many cases, this means carefully choosing these values at the time of the 'vgcreate', and may mean incrasing the value of 'pe_size'.

Regards!

...JRF...
Roger Baptiste
Honored Contributor

Re: changing a VG's 'max_pe' value

Mark,

Please read this Document:
**KBRC00004285** (it explains it all!)

The basic reason for these restrictions is
VGDA (which needs to be in every disk of the
VG) cannot be larger than the size of one
extent. So, if you set a large number
of PE extent during the VG creation, it would
mean a larger VGDA, which means the Extent size
will increase!!, since it has to house the
mapping of a larger number of extents.
So, you have to choose between balancing
the maximum number of PV's/PE's/PE size.

Two other useful documents to refer to:
Docid: KBRC00001020

DocId: KBRC00000244

HTH
raj

Take it easy.