Operating System - HP-UX
1827448 Members
5832 Online
109965 Solutions
New Discussion

Can we change the Maximum number of PVs in an existing VG ?

 
Sundar G
Frequent Advisor

Can we change the Maximum number of PVs in an existing VG ?

Hi Gurus,

We are trying to extend a VG with a newly created PV. During this process the vgextend command shows and error,

"can't extend volume group,
Too many links"

It seems that the maximum number of PVs for that VG was configured as 16.

Is it possible to increase the number of PVs allocated to the problematic VG, so that I can complete the vgextend with out issues?

Please give a light on this scenario.

Thanks and Regards

Sundar
11 REPLIES 11
DCE
Honored Contributor

Re: Can we change the Maximum number of PVs in an existing VG ?

Sundar,

The answer to your question is no. You cannot change the max PV number for a VG once it is created. you will need to recreate the vg from scratch in order to increase the number of PV's.

That being said, I have seen mentioned a couple times in this forum an UNSUPPORTED program called vgmodify taht some HP ce's have access to. You may want to ask your ce is he has a copy.........

Dave

Sundar G
Frequent Advisor

Re: Can we change the Maximum number of PVs in an existing VG ?

Thanks All,

Actually here is the VGDISPALY output.

[prd1]: /home/uadmin # vgdisplay /dev/vg_data
--- Volume groups ---
VG Name /dev/vg_data
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 27
Open LV 27
Max PV 16
Cur PV 16
Act PV 16
Max PE per PV 1279
VGDA 32
PE Size (Mbytes) 8
Total PE 20464
Alloc PE 20217
Free PE 247
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

Now I am trying to extend this VG with an already created PV. It shows me the followign error.

[prd1]: /home/uadmin # vgextend /dev/vg_data /dev/dsk/c12t2d7
vgextend: Couldn't install the physical volume "/dev/dsk/c12t2d7".
Too many links

I suspect that Max PV and Cur PV are same. (or) Less number of Free PE available.

Gurus,

can you please consider the scenario and help me?

Thanks in advance
DCE
Honored Contributor

Re: Can we change the Maximum number of PVs in an existing VG ?


Sundar,

According to your vgdisplay the current and mx pv's are 16
Max PV 16
Cur PV 16

This means you cannot add any more disks to the vg.
Tim Nelson
Honored Contributor

Re: Can we change the Maximum number of PVs in an existing VG ?

Other than the proposed unsupported script menioned the only supported way to change the max_pv is at vgcreate time.

If you can get some downtime you could vgcreate another volume group with all the required number of disk. Then copy all data from the old vg to the new vg.

A quick vgexport and vgimport would not work either as there is no option to modify the max_pv.
OldSchool
Honored Contributor

Re: Can we change the Maximum number of PVs in an existing VG ?

You currently have 16 physical volumes in the group, and the group is defined as having a maximum of 16 volumes, so you *can't* add any.

As noted by DCE, the only way to change MAX_PV is re-create the volume group with a larger size. Or the unsupported application.......
Torsten.
Acclaimed Contributor

Re: Can we change the Maximum number of PVs in an existing VG ?

Exactly the same problem, VG name and values here:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1033809

Result is the same.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Michael Steele_2
Honored Contributor

Re: Can we change the Maximum number of PVs in an existing VG ?

How many of these PV's are alternate links? In other words are there two fibre channels to each PV? If you have two, one a backup, then you can remove the alternate in order to gain more links.

I don't think you probably want to do that. But you can verify your alternate links with vgdisplay -v vg## | more.

Its also possible, and I would recommend this course of action to verify first in a lab machine, to use physical volume groups.

/etc/lvmpvg

cat | /etc/lvmpvg
vg01
pvg1
c1t9d0
c1t8d0
pvg0
c0t9d0
c0t8d0

Here the alternates are in pvg0.

# vgcreate -g pvg1 /dev/vg01 /dev/dsk/c1t9d0 /dev/dsk/c1t8d0


# vgcreate -g pvg0 /dev/vg01 /dev/dsk/c0t9d0 /dev/dsk/c0t8d0

And again your alternates are in pvg0.

But there may be some daisy chaining to do, check with your disk array admins. since my notes indicate a non disk array scenario that would use 'redundant disk bus chains'. Also the mirror policy becomes :

PVG-Strict

I don't no if this will reduce your PV links, but the suggestion to me is that you'll cut it in half with lvmpvg.

So experiment in a lab.
Support Fatherhood - Stop Family Law
Phillip Thayer
Esteemed Contributor

Re: Can we change the Maximum number of PVs in an existing VG ?

So that begs to question whether it is good practice to create VG's with the value of MaxPV set as the Maximum number of PV's allowed so that you do not run into this problem? Is that possible?
Once it's in production it's all bugs after that.
OldSchool
Honored Contributor

Re: Can we change the Maximum number of PVs in an existing VG ?

Phillip,

I don't see why it would cause problems. 16 is only the default, but the value can range from 1 to 255.
Albert_31
Trusted Contributor

Re: Can we change the Maximum number of PVs in an existing VG ?

Hello Phillip,

The default is set to 16 and can be increased, however for every increase the memory occupied by the LVM structures aslo increases, hence you have to use it with some idea of how much growth will be there in the vg..

regards


albert
Phillip Thayer
Esteemed Contributor

Re: Can we change the Maximum number of PVs in an existing VG ?

But, provided that it is a large memory system and the memory space is not an issue would this be a better practice to set the default PVs when a VG is created to be 255? Then the problem mentioned in this thread would not be a problem.

Phil
Once it's in production it's all bugs after that.