Operating System - HP-UX
1834942 Members
2587 Online
110071 Solutions
New Discussion

Re: vgcreate fails with VGRA error

 
SOLVED
Go to solution
S Elahee
Occasional Contributor

vgcreate fails with VGRA error

I issue the command:

mkdir /dev/bigdiskvg

mknod /dev/bigdiskvg/group c 64 0x020000

vgcreate -A n -x y -e 8683 -l 255 -p 16 -s 4 /dev/bigdiskvg /dev/dsk/c3t10d0 /dev/dsk/c3t8d0

vgcreate: Volume group "/dev/bigdiskvg" could not be created:
VGRA for the disk is too big for the specified parameters. Increase the
extent size or decrease max_PVs/max_LVs and try again.

Increasing the PE size all the way to the max generates the same error, the only way to make this work is to decrease the max_PVs. The strange thing is if I do this using SAM, the vg is created with the same parameters I am using from the command line (looking at SAM log).

Why can I not do this from CLI but SAM can do it with no errors? Shouldn't increasing the PE size allow the VG to be created? This error only happends on 36GB disks.
14 REPLIES 14
John Poff
Honored Contributor

Re: vgcreate fails with VGRA error

Hi,

We are using 36 Gb disks for vg00 on some new boxes. We are using a PE size of 8 Mb and we get 4340 PE per disk. You should be able to use twice that number of PE, or 8680 PE for a 4 Mb PE size. When you create the VG from sam, how many PEs are available from each disk? 8683 or 8680?

JP
Ted Ellis_2
Honored Contributor

Re: vgcreate fails with VGRA error

what's happening is basically a physics and math issue.... if you do not specify specific settings for pe and pv (e and p), the defaults get used... which is the 255 lvols and 16 pv... so you don't need to specify them here...

I have had this happen on large disks (LUNs)... the VGRA is not large enough to hold the reference mapping for all of the physical extents you are trying to create it... I think in SAM it may be getting adjusted on the back end so that it works. The easiest thing I have found here is to alter the physical volume limits, as you will not likely add another 14 disks if you are starting with 2... try and drop it to 10 and maybe tune the lvol limit to 200...

and don't try and force tune physical extents.. it will be done dynamically
Ted Ellis_2
Honored Contributor

Re: vgcreate fails with VGRA error

correction to my last... pretty sure you just need to drop the -e option and let the system dynamically tune this... the man page for vgcreate says it will be adjusted automatically. For a 36 GB disk you should not be hitting any real limits... my earlier comment was based on LUN sizes in the hundreds of GB...sorry
S Elahee
Occasional Contributor

Re: vgcreate fails with VGRA error

vgdisplay shows 8683 (That is where I got the info for the command line).
Anil C. Sedha
Trusted Contributor

Re: vgcreate fails with VGRA error

I agree with Ted.

Try dropping the -e option and i believe it should work fine. Though you specifying the max extent should also work. As per the man page it looks fine to me

This sure does work as per your sam logs.

Regards,
Anil
If you need to learn, now is the best opportunity
James R. Ferguson
Acclaimed Contributor
Solution

Re: vgcreate fails with VGRA error

Hi:

The VGRA must fit into a single, physical disk extent, as the error indicates.

Essentially the size of the LVM table is circumscribed by 'pe_size', 'max_pe', 'max_pv' and 'max_lv'. Reduce 'max_pv' and/or 'max_lv' and/or increase 'pe_size'.

This might best be done all at command line.

Regards!

...JRF...
S Elahee
Occasional Contributor

Re: vgcreate fails with VGRA error

===cut from sam log===
Executing the following command:\C/sbin/vgcreate -e 8683 -l 255 -p 16 -s 4 /dev/vg00 /dev/dsk/c3t0d0 /dev/dsk/c3t2d0 \C
John Poff
Honored Contributor

Re: vgcreate fails with VGRA error

I'm just curious. Does the VG you created in sam have Max LV of 255?

If you're really curious about what sam does with vgcreate, you could write a (very temporary) wrapper for the vgcreate command so that you can see what command line options sam really passes to it.

JP
Ashwani Kashyap
Honored Contributor

Re: vgcreate fails with VGRA error

Try increasing the PE Size
James R. Ferguson
Acclaimed Contributor

Re: vgcreate fails with VGRA error

Hi (again):

Forget SAM and use a commandline. In fact, SAM has provided you with most of it already.

First, think about your immediate and future growth of this volume group. Do you need 256 logical volumes? Do you need 255 physical volumes?

A key issue is adding more physical volumes later, after the initial 'vgcreate' has been done. The values of 'max_pe', 'pe_size', etc. are *fixed* during volume group creation and cannot be changed unless the volume group is destroyed and recreated.

You could try:

# vgcreate -e 9000 -l 25 -p 16 -s 8 /dev/bigdiskvg /dev/dsk/c3t10d0 /dev/dsk/c3t8d0

This offers 9000 8MB extents as a maximium usable on any disk now or later. It gives the ability to use 25-logical volumes and a maxiumum of 16-physical disk. Initially, two physical disk comprise the volume group.

Regards!

...JRF...



S Elahee
Occasional Contributor

Re: vgcreate fails with VGRA error

Thank you everyone for your help.

The only way I can get this to work is by decreasing the maximum number of PVs (-p 4).

What is still puzzling me is why increasing the
extent size has no effect. Also, why is SAM able to create this VG using the same parameters I am using from CLI?

The comment about putting a wrapper on vgcreate is confusing to me, does the vgcreate command in the samlog not accurately report what parameters SAM is passing?

TIA

...SLE
John Poff
Honored Contributor

Re: vgcreate fails with VGRA error

Hi,

As for my wrapper comment, I'm not sure I trust the log from sam. If you have tried the vgcreate command with the same options that sam reports in the log, and the command fails, something must be different. It would be interesting to try it to see if sam does use some different options.

JP
S Elahee
Occasional Contributor

Re: vgcreate fails with VGRA error

I probably should have included the pvcreate command in the original post.

The problem was not in the vgcreate command, but the problem was actually due to the pvcreate.

SAM actually ran another pvcreate after I had created the disks as bootable.

If I do a plain pvcreate -f /dev/dsk/c3t8d0 the vgcreate succeeds without a need to increase anything; however, if I issue the pvcreate -B -f /dev/dsk/c3t8d0 I get the VGRA error.

I am guessing this has something to do with the Boot Volume area being too small. If I do decrease the max number of PVs to 4, the VG will be created.

...SLE
James R. Ferguson
Acclaimed Contributor

Re: vgcreate fails with VGRA error

Hi (again):

Yes, making the disk bootable with 'pvcreate -B' makes all the difference in the world. From the link below: "The LVM header of a bootable disk is always 2912KB. The header size of a non-bootable disk...depends on the number of PV's, size of PV's, etc...":

http://us-support3.external.hp.com/iv/data/documents/DE_SW_UX_swrec_EN_01_E/LVM.pdf

Regards!

...JRF...