1833875 Members
1984 Online
110063 Solutions
New Discussion

Max_PE_per_PV too small?

 
SOLVED
Go to solution
dictum9
Super Advisor

Max_PE_per_PV too small?

Running into issues creating a large VG:


vgcreate -s 64 /dev/vg01 /dev/dsk/c6t0d0

vgextend: Warning: Max_PE_per_PV for the volume group (1199) too small for this PV (1359).
Using only 1199 PEs from this physical volume.


Should I go to "-s 128" or adjust Max_PE_per_PV with the "-e" switch?
7 REPLIES 7
James R. Ferguson
Acclaimed Contributor
Solution

Re: Max_PE_per_PV too small?

Hi:

My choice would be to adjust the 'max_pe' value with '-e max_pe'. Choose a value that is large enough to accomodate the addition of any larger disk that you might anticipate.

Regards!

...JRF...
Denver Osborn
Honored Contributor

Re: Max_PE_per_PV too small?

If patches are up to date then lvm should adjust the MAX PE per PV to accomodate the largest disk at the time the VG is created. You may want to look at patches too.

For now looks like you'll need to calculate the max pe yourself and specify "-e maxpe". No need to keep increasing the pe size when all you need is for more extents.

ex/ for 8GB disk use default pe size (4MB) and "-e 2048". Use care with choosing the parameters, once their set you're done for the life of this VG. Only way to change it in the future would be to recreate the VG.

Hope this helps,
-denver
erics_1
Honored Contributor

Re: Max_PE_per_PV too small?

Using -e, you'd only be able to set to 1199 based on the lvm warning above. I'd suggest using -l and/or -p to limit the max lvols/max pv parameters. By default max lvols gets set to 255 and max pv 16.

HTH,
Eric
dictum9
Super Advisor

Re: Max_PE_per_PV too small?

It is a large VG which has over 600GB with 8 disks.

Now, I used the following switches:

vgcreate -s 32 -e 3200

I got no error and all looks good.
Is that good enough, or should I make -e a factor of 2?

Denver Osborn
Honored Contributor

Re: Max_PE_per_PV too small?

So the largest lun your VG can hold is approx 100GB. If you used defaults you can have a total of 16 LUNs in your VG. Over the life of the volume you can grow as large as 1.6TB... total of 255 lvols.

If this won't meet your needs, then recreate the VG using larger parms for max PV or max PE. One thing to look out for is the size of /etc/lvmconf/vgname.conf file. With larger parms and extent size these files can also be larger than you're used to. A small root fs could fill up fast if you're adding a lot of similar volumes.

-denver
James R. Ferguson
Acclaimed Contributor

Re: Max_PE_per_PV too small?

Hi (again):

The number of physical extents chosen does not have to be a power of two as you asked. It should be a value that is equal or larger than the largest physical disk you will ever add

Once you create a volume group, you can't change its LVM geometry without recreating it. Hence, choose wisely. For example, if you need 10 physical volumes initially, but might want to double that later, be sure to specify '-p 20' for the 'max_pv'.

The overall LVM header (VGRA) resides in one physical disk extent (on each member of a volume group). The size of the Volume Group Reserved Area (VGRA) is proportional to the values of 'max_pe', 'pe_size' and to a lesser extent 'max_pv' and 'max_lv'. Chapter-16 of the Software Recovery Handbook has a table showing this.

Regards!

...JRF...
dictum9
Super Advisor

Re: Max_PE_per_PV too small?

The largest LUN I can possibly need to accomodate is about 85GB.

This is how I got to this number 3200. I ran vgcreate with -s 64 while this gave me an error, it told me about the Max_PE_per_PV numbers it had and would use and it seemed that -e 1600 would work. So I figured that if I halved -s to 32 I would have to double -e from 1600 to 3200 and I did that.