1833861 Members
2064 Online
110063 Solutions
New Discussion

about create VG

 
SOLVED
Go to solution
rayche
Frequent Advisor

about create VG

Hi,

I remember there is relationship between the size of PE,the number of PV and the number of PEs when we create VG.
For example, I use four PVs and the size of PV is 46G, when I vgcreate -s 1 /dev/vgcheck ....., there is error message :
VGRA for the disk is too big for the specified parameters. Increase the
extent size or decrease max_PVs/max_LVs and try again.
but when I change "-s 1" to "-s 2", VG can be created successfully, so who can tell me the deatailed relationship between those parameter ( number of PE,number of PV,PE SIZE,PV SIZE..)?

Thanks.
4 REPLIES 4
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: about create VG

Essentially the size of any one PV or any one LVOL is limited by the product of pe_size which must be a power of two multiple of 1MiB and max_pe's. Max_pe can be no larger than 64Ki so you need to choose values so that max_pe's X pe_size will accomodate your largest anticipated PV or LVOL and at the same time max_pe's must be <= 65535. That's really all there is to it. It you don't specify the values then defaults are used which may not accodate your needs.
If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: about create VG

By the way, smaller PE's are slightly favored over larger PE's only because you are less likely to fit an exact number of larger PE's on a given disk so that some space at the end of the disk may go unused --- although in today's world the loss of 8MiB or 64MiB at the end of the disk would likely be considered trivial. There is no performance advantage to any PE size over another with one dubious exception. If you are running extent-based stripes then smaller PE's better distribute the I/O but the smallest possible PE (1MiB) is still much too large to be a good stripe size.
If it ain't broke, I can fix that.
Michael Steele_2
Honored Contributor

Re: about create VG

Try:

vgcreate -s 32 /dev/vg## /dev/dsk/c#t#d# where:

-s = PE_SIZE (*default = 4mb *)

PE must be a power of 2: 1,2,4,8,16,32,64,128 or 256

Everything must fit into one PE. The VGRA is one PE.

The default value for max_pe is 1016. However, if the size of any physical volume exceeds 1016 times the pe_size, the default value for max_pe is adjusted to match the physical volume size.

PV_SIZE > 1016 * PE_SIZE

If PV_SIZE exceeds (1016 * PE_SIZE) then MAX_PE is increased.

32 mb PE_SIZE
47104 mb for PV_SIZE (* 46 GB *)

Equals 1472 MAX_PE. Use vgdisplay to verify.

http://docs.hp.com/en/B2355-60103/vgcreate.1M.html
Support Fatherhood - Stop Family Law
rayche
Frequent Advisor

Re: about create VG

Thanks for your relply.