HP-UX System Administrator's Guide: Logical Volume Management (5900-3028, March 2013)

Total Spare PVs in use 0
VG Version 1.0
vgmodify for a Version 2.x Volume Group
If the maximum volume group size (chosen when the Version 2.x volume group was created by
the vgcreate command) needs to be increased, then the vgmodify -S option can be used to
increase the maximum volume group size
For instance, the maximum volume group size might need to be increased to allow more extents
to be added to the volume group through the vgextend command or through LUN expansion
(see the vgmodify -E option described in“Modifying Physical Volume Characteristics (page 77)).
The maximum volume group size can also be reduced through the vgmodify -S option to make
more extents available on the physical volumes.
Increasing the maximum volume group size might require that additional space be added to every
physical volume through LUN expansion. In this case, you can invoke the E and S options
together to handle the LUN expansions and increase the maximum VG size in a single step.
LVM might also use free extents at the ends of the physical volumes to increase the maximum
volume group size. If insufficient free extents are available at the end of some physical volumes,
and those physical volume cannot be expanded further via LUN expansion, it might be necessary
to free the extents at the ends of those physical volumes by using the pvmove command to relocate
the portions of the logical volumes that are using those extents.
When using the vgmodify -S option to increase the maximum volume group size, note that the
maximum volume group size is not increased until all physical volumes in the volume group are
reconfigured.
When using the vgmodify -S option to decrease the maximum volume group size, note that the
maximum volume group size is decreased prior to reconfiguring the physical volumes.
To increase the maximum size of a Version 2.x volume group, follow these steps:
1. Use the vgmodify review mode to verify that there is enough free space on all of the physical
volumes to reconfigure them to the desired larger maximum VG size. The vgmodify command
checks for free extents at the ends of the PVs that it can utilize, and also checks for free spaces
resulting from prior LUN expansions. You must provide the -E option and the -S option for
review mode to check for LUN expansions. It might be necessary to use the pvmove command
to relocate the portions of logical volumes residing at the ends of the PVs.
# vgmodify -r -a -E -S 64t vg1
2. If review mode indicates that the maximum VG size can be increased, perform the actual
reprovisioning reconfiguration. This operation reconfigures every PV in the VG to the new
(larger) maximum VG size. This operation also automatically adds new extents to PVs where
the new extents were previously not added because the volume group was at its maximum
number of extents.
# vgmodify -a -E -S 64t vg1
3. Verify the result of the reprovisioning reconfiguration by running the vgdisplay -v command
to check the new maximum VG size, the new maximum number of extents for the VG, and
additional extents that might have been added to some of the PVs..
4. If any vgextend were previously unable to add PVs to the volume group, rerun those
commands now. The vgextend commands must succeed in adding more PVs to the VG. Run
vgdisplay -v to verify that more free extents are now available.
5. Expand logical volumes using lvextend -l as necessary to allow them to accommodate
more user data. You can also create additional logical volumes using lvcreate. You can
also add additional mirrors using lvextend -m.
To decrease the maximum Volume Group size for a Version 2.x volume group, follow these steps:
62 Administering LVM