1834454 Members
2865 Online
110067 Solutions
New Discussion

Inceasing the MAX PVs

 

Inceasing the MAX PVs

Good morning.

We are busy with a disk consolidation project.
What I need is to add the new disks to a server and increase the physical volumes on a volume group. How ever most of my volume groups have the default 16 MAX PVs limit and I would like to go beyond that.
As far as I know there is no way to increase this limit. But I have heard rumours that there is a vgmodify script/command that can be downloaded and used for this purpose. Do anyone know of it, if so where can I download if from ?

Thanks
9 REPLIES 9
Joaquin Gil de Vergara
Respected Contributor

Re: Inceasing the MAX PVs

i don't know this...

you must create the vg with the -p option to increase it. It's the only way
you can make a script knowing this.... but you must to move data betwen disks, split mirrors if you have, etc....

good luck!

Teach is the best way to learn
Robert-Jan Goossens
Honored Contributor

Re: Inceasing the MAX PVs

Hi,

Take a look at this doc, you will have to recreate the volume group.

http://www4.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000065678171

Hope it helps,

Robert-Jan.
James Murtagh
Honored Contributor

Re: Inceasing the MAX PVs

Hi Walter,

I'm not sure I understand the question - are you trying to increase this dynamically when the VG is online? The default is certainly 16 but the range can be 1 - 255, see "man vgcreate". I haven't seen any code which can do what you're asking, even from wtec.

Cheers,

James.

Re: Inceasing the MAX PVs

Yep what I'm trying to do is increase the MAX PV number dynamically on an existing volume group
James Murtagh
Honored Contributor

Re: Inceasing the MAX PVs


Well, you won't be able to do it when the VG is online. What may work is deactivating the VG and vgexport it. If you can then recreate it using the new value for max pv's without increasing the extent size you will be able to recreate the lvols and mount up the filesystems. There is a formula that determines the required extent size for given parameters but I don't know it offhand, HP should be able to supply it. Goes without saying take a backup etc before doing this. Also, you will need to study the lvdisplay output thoroughly in case you have lvextended or are using stripes etc for when you come to recreate the lvols.

twang
Honored Contributor

Re: Inceasing the MAX PVs

Hi,
If I am not mistaken, you cannot vgextend(such as # vgextend /dev/vgxx /dev/dsk/cxtyd0) a VG which Max PV is equal the Cur PV. That means you cannot add any more disks into that VG.
do a
#vgdisplay -v vgxx|more

to check the Max PV and Cur PV.

If this is your case, you have no choice but to backup the data and recreate the VG with a higher Max PV value

# vgcreate -p x .......

where 'x' is maximum number of PV allowed for this Volume Group.

Regards
twang
twang
Honored Contributor

Re: Inceasing the MAX PVs

Add to above reply, the maximum number of physical volumes(disks) in a volume group is 255. The default value is 16.
Marco Santerre
Honored Contributor

Re: Inceasing the MAX PVs

Unfortunately Walter, as everyone stated already, and for having gone through the exercise myself, the truth is that you have to recreate the Volume Group in order to extend the number of max PV. I've looked for scripts and such that would allow me to do this online, but so far I've come empty-handed, so maybe that's just what they are, rumors.
Cooperation is doing with a smile what you have to do anyhow.
James R. Ferguson
Acclaimed Contributor

Re: Inceasing the MAX PVs

Hi Folks:

James is suggesting a very clever trick!.

The 'vgexport' of the volume group removes knowledge of it from 'etc/lvmtab'. The 'vgcreate' of the volume group with '-p max_pv' set to a non-default value will write a new LVM header, but this is the only destructive update that should occur and should fit into one physical disk extent.

The next key to this is to know the exact placement of all logical volumes' extents, both in number and in placement in physical space. Thus, if lvol2 whas orignally created before lvol1 and thus begins at physical extent number-1, then lvol2 must be recreated first, followed by the 'lvcreate' for lvol1. If later, lvol2 was extended and the additional extents were placed after lvol1, then you must repeat the 'lvextend' exactly as it occurred originally.

Do *not* recreate any filesystems, since the data on the disk should be intact, too. The 'lvcreate' simply "lays down" the boundries for the extents of the filesystems.

Regards!

...JRF...