Operating System - HP-UX
1832872 Members
2740 Online
110048 Solutions
New Discussion

vgcreate fails with larger Physical volume

 
Yash_2
Occasional Contributor

vgcreate fails with larger Physical volume

I am using HP-ux 11.0 . As root, I issued the command vgcreate -p 50 /dev/vguse /dev/dsk/c1t0d1. The Physical Volume c1t0d1 had already been created. However the vgcreate command failed. The same command worked for smaller PVs, but this one was 52G in size.

I then tried to create the volume group through sam and it worked. As seen from the syslog.log, the command that sam ran to create the VG was :
vgcreate -e 12756 -l 255 -p 16 -s 4 /dev/vguse /dev/dsk/c1t0d1

According to the vgcreate documentation, the default value for max_pe is adjusted to match the physical volume size, which means the -e switch would have taken the value 12756 when I manually ran the command. The value for -l is 255 by default. The only difference is in the -p option.

What might be the reason behind the failure of the command with my supplied arguments?

8 REPLIES 8
Stanimir
Trusted Contributor

Re: vgcreate fails with larger Physical volume

Hi!
I suppose the option -p is
related not for phis.extends, but
for the NUMBER of PV's in VG /32 by default/.
So 50 is very big value.
Regards,Stan
Yash_2
Occasional Contributor

Re: vgcreate fails with larger Physical volume

I know that the -p option IS for max number pf Physical volumes. The default value is 16. But the same command, with -p 50 worked for smaller PVs. So 50 is not a very high value. Anyway, the valid value for -p ranges from 1 to 255.
Michael Tully
Honored Contributor

Re: vgcreate fails with larger Physical volume

The -e option sets the number of megabytes in each physical extent, where pe_size is expressed in units of megabytes (MB) in the range 1 to 256.
pe_size must be equal to a power of 2 (1, 2, 4, 8, etc.). The default value for pe_size is 4 (four megabytes). Even so the limit has been reached with your arguments. The -p 16 is the default.
Anyone for a Mutiny ?
Jean-Louis Phelix
Honored Contributor

Re: vgcreate fails with larger Physical volume

Hi,

In fact it doesn't work simply because you would need too many pe's (VGRA size would be too big). If you increase the pe size (for example to 8 or 16), you will be able to use '-p 50'.

Regards.
It works for me (© Bill McNAMARA ...)
Yash_2
Occasional Contributor

Re: vgcreate fails with larger Physical volume

-e max_pe
??
Set the maximum number of physical extents that can be allocated from any of the physical volumes in the volume group. 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. The maximum number of physical extents can be a value in the range 1 to 65535.
Armin Feller
Honored Contributor

Re: vgcreate fails with larger Physical volume

Could you please provide the command you are using and the error message. I think LVM gets problems with the VGRA.
Armin Feller
Honored Contributor

Re: vgcreate fails with larger Physical volume

It is possible to have large -e and -p values but you must also increase -s (pe_size) as this will allow a larger extent to put the VGRA tables in. And the VGRA can only be in one PE.

Regards ...
Armin
Michael Steele_2
Honored Contributor

Re: vgcreate fails with larger Physical volume

Question: "File too large error" indicated during vgcreate failure?

Most of what you need has been presented in the above posts but there is also a formula and a couple of guidelines that you can use for calculating PE_SIZE. Here is the formula:

2 * ( 30 + MAX_PE ) / 1024 = PE_SIZE

Here is one guideline:

If the size of any PV's in the VG exceed 1016 * PE_SIZE then increase MAX_PE, else, ignore MAX_PE.

Here is a 2nd guideline:

If you have smaller PV's already configured in the VG then vgcreate will fail.

And yes, PE_SIZE can only be a power of 2, 1,2,4,8,16,32,64,128,256.

And yes, the default MAX_PE = 1016

This is all you need.
Support Fatherhood - Stop Family Law