cancel
Showing results for 
Search instead for 
Did you mean: 

vgmodify help

SOLVED
Go to solution
mjos
Super Advisor

vgmodify help

Hi,
I need help with vgmodify command. I know there are many docs available regarding vgmodify but I need help from anybody who has actually executed vgmodify in a prod environment. The below VG & file-systems are clustered & are running on the primary node. I want to increase the max PV & Max PE per PV without deactivating the VG. The max size lun that can be added to this VG is 130 GB. I want to add a 256 GB lun & extend the VG.

VG Name /dev/orvg_db01
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 10
Open LV 10
Max PV 16
Cur PV 16
Act PV 16
Max PE per PV 4095
VGDA 32
PE Size (Mbytes) 32
Total PE 58864
Alloc PE 53825
Free PE 5039
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0
VG Version 1.0.0


The server is running B.11.31 U ia64 OS & vgmodify is fully supported.

Thanks in advance for any help that can be provided.
27 REPLIES
Torsten.
Acclaimed Contributor

Re: vgmodify help

At the moment I cannot remember on which update release the vgmodify became online capable. I suggest to review the 11.31 release notes.

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!   
Torsten.
Acclaimed Contributor

Re: vgmodify help

Found it:

"Online vgmodify is supported starting with the HP-UX 11i v3 September 2008 Update release. "

from

Using the vgmodify command to perform LVM Volume Group Dynamic LUN Expansion (DLE) and Contraction (DLC)

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!   
singh sanjeev
Trusted Contributor

Re: vgmodify help

Starting with the September 2008 release of HP-UX 11i Version 3, you can use the â E and
â a options to vgmodify to recognize and accommodate size changes without deactivating the
volume group. For more information, see vgmodify(1M).
Sanjeev Singh
mjos
Super Advisor

Re: vgmodify help

Thanks we have the Sep-2009 bundle. But I need help in how to execute the vgmodify commands for increasing the increase the max PV & Max PE per PV
Torsten.
Acclaimed Contributor
Solution

Re: vgmodify help

Search the web for the document:

"Using the vgmodify command to perform LVM Volume Group Dynamic LUN Expansion (DLE) and Contraction (DLC)"

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!   
Torsten.
Acclaimed Contributor

Re: vgmodify help

http://h20000.www2.hp.com/bc/docs/support/SupportManual/c01920387/c01920387.pdf (BSC link updated by admin)

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!   
mjos
Super Advisor

Re: vgmodify help

Thanks Torsten, there is a pvmove command in there. Can you let me know if I do a pvmove command, will it remove any data or bring down the databases running on that VG.
When I do a vgmodify -tnv -

Physical Extent zero is not free on all PVs. You will not achieve these
values until the first extent is made free (see pvmove(1M)) on all the
following disks:

So as per the doc, I have to free up the first extent on all the disks by doing a pvmove.
James R. Ferguson
Acclaimed Contributor

Re: vgmodify help

Hi:

> Can you let me know if I do a pvmove command, will it remove any data or bring down the databases running on that VG.

A 'pvmove' can be used while the logical volume is in normal operating mode. However, do not interrupt the process as this can lead to a stale extent condition.

Regards!

...JRF...
mjos
Super Advisor

Re: vgmodify help

Thanks, I think I will backup all the data & then try the pvmove, don't want to take any risk with losing the data or bringing down the db.
mjos
Super Advisor

Re: vgmodify help

I just read the man pages for pvmove

"pvmove cannot be performed if the volume group is activated in shared
mode."

This VG in question is clustered across two nodes & has LUNs from an external storage presented to two nodes. Currently the VG is active only on the primary node with the secondary node acting as failover. In this scenario, will the pvmove command work on the primary node, since the LUNs are shared across both the nodes.
James R. Ferguson
Acclaimed Contributor

Re: vgmodify help

Hi (again):

> Currently the VG is active only on the primary node with the secondary node acting as failover.

Then the volume group isn't in "shared" mode. Shared means that it is active for read/write on both nodes. See the 'lvchange(1M)' manpages.

Regards!

...JRF...
Benoy Daniel
Trusted Contributor

Re: vgmodify help

Online vgmodify is only supported in LVM2 and not in LVM1.

http://h20000.www2.hp.com/bc/docs/support/SupportManual/c01920387/c01920387.pdf (BSC link updated by admin)
Torsten.
Acclaimed Contributor

Re: vgmodify help

See page 14 - online examples for LVM 1.0.

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!   
Torsten.
Acclaimed Contributor

Re: vgmodify help

VG is LVM version 1:

# pvmove /dev/dsk/c3t0d1:0 /dev/dsk/c3t0d1
pvmove: The volume group "/dev/vg01" is not active. Only an active
volume group can be extended.

# vgchange -a y vg01
Activated volume group
Volume group "vg01" has been successfully changed.


# pvmove /dev/dsk/c3t0d1:0 /dev/dsk/c3t0d1
Transferring logical extents of logical volume "/dev/vg01/lvol1"...
Physical volume "/dev/dsk/c3t0d1" has been successfully moved.
Volume Group configuration for /dev/vg01 has been saved in /etc/lvmconf/vg01.con
f

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!   
mjos
Super Advisor

Re: vgmodify help

When I do a pvmove, it gives me the below error -

#pvmove /dev/disk/disk2909:0 /dev/disk/disk2909
pvmove: Not enough free physical extents available.
Logical volume "/dev/orvg_db01/lvdat01" could not be extended.
pvmove: Cannot find a free physical extent for logical extent 0
of logical volume "/dev/orvg_db01/lvdat01".

#vgdisplay orvg_db01
--- Volume groups ---
VG Name /dev/orvg_db01
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 5
Open LV 5
Max PV 16
Cur PV 3
Act PV 3
Max PE per PV 1023
VGDA 6
PE Size (Mbytes) 32
Total PE 2557
Alloc PE 2206
Free PE 351
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

I need to free up the first extent on all the below luns

Physical Extent zero is not free on all PVs. You will not achieve these
values until the first extent is made free (see pvmove(1M)) on all the
following disks:
/dev/rdisk/disk2909
/dev/rdisk/disk2913
/dev/rdisk/disk4684

Torsten.
Acclaimed Contributor

Re: vgmodify help

If you already have 3 PVs, why not simply add a fourth?

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!   
mjos
Super Advisor

Re: vgmodify help

Well, here I want to increase the MAX PV to 255 & MAX_PE to 15868. This is a different VG and not the first one which I specified. This VG is not in Prod so I thought to test the vgmodify here.
Torsten.
Acclaimed Contributor

Re: vgmodify help

Increasing the MAX values should work anyway, I think.

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!   
mjos
Super Advisor

Re: vgmodify help

Thanks, I think it should work but now I am running into a different issue. Vgmodify is not taking the -a switch for doing it in online mode

#vgmodify -a -p 24 -e 4348 orvg_db01
Usage: vgmodify
[-e MaxPhysicalExtents]
[-p MaxPhysicalVolumes]
[-l MaxLogicalVolumes]
[-v]
[-n]
[-r]
[-B bootable]
VolumeGroupName {[pv_path] [pv_path] ....}

or vgmodify -o [-v] [-r] [-B bootable] VolumeGroupName {[pv_path] ....}

or vgmodify -t [-v] [-n] [-B bootable] VolumeGroupName {[pv_path] ....}
"a": Illegal option.
#vgmodify -p 24 -e 4348 orvg_db01
vgmodify: The volume group "orvg_db01" is active on this system.
Cannot perform requested change.
Torsten.
Acclaimed Contributor

Re: vgmodify help

If this is another server now it probably has an older version installed.

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!   
mjos
Super Advisor

Re: vgmodify help

The server is B.11.31 U ia64.
How do I check for the version installed?
Torsten.
Acclaimed Contributor

Re: vgmodify help

Use swlist and check the core OE components - must be September 2008 or later.

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!   
mjos
Super Advisor

Re: vgmodify help

#swlist | grep OE
HPUX11i-OE B.11.31.0709 HP-UX Foundation Operating Environment

The version is July-09. I also looked in man pages for vgmodify but couldn't see the -a switch there.
Torsten.
Acclaimed Contributor

Re: vgmodify help

It's september 2007.

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!