LVM Volume Group Dynamic LUN Expansion (DLE) and Contraction (DLC) (September 2009)

51
vgmodify -a -C DLC_Size [-r] VolumeGroupName pv_path
Reconfigure physical volumes for a change in the maximum volume group size
vgmodify -a [-E] -S Max_VG_Size [-r] VolumeGroupName
The –a option is required in all cases because the vgmodify command for Version 2.x volume
groups is only supported on activated volume groups. For a complete list of options, see
vgmodify(1M).
Command usage
In the following cases, you can use the vgmodify command to reconfigure a Version 2.x volume
group. In all cases, the operation is performed while the volume group is activated. User applications
can continue running without disruption (they might continue sending I/Os to the logical volumes in
the volume group).
For more information on Version 2.x volume groups and maximum limits (for example, maximum
volume group size, maximum logical volume size, and maximum number of physical volumes and
logical volumes), see the following LVM Version 2.x whitepapers located on docs.hp.com
:
LVM Version 2.x Volume Groups in HP-UX 11i v3 (September 2008)
LVM Limits White Paper (September 2008)
For information on how to set the maximum volume group size limit at volume group creation time on
Version 2.x volume groups, see vgcreate(1M) and lvm(7).
For information on how to display limits for Version 2.x volume groups, see vgdisplay(1M) and
lvmadm(1M).
Most high-end storage arrays (for example, HP Enterprise Virtual Array) provide utilities that can
expand or contract the size of a LUN without disrupting the applications using the LUN. These
features are called online dynamic LUN expansion (DLE) and online dynamic LUN contraction (DLC).
Online DLE to increase the space available for user data
T
he LUN for a physical volume was dynamically expanded using a storage utility (such as those
available on EVA arrays) and the physical volume needs to be reconfigured using online vgmodify
DLE (-E option) to make use of the new space for user data. After the physical volume is
reconfigured, you can expand the logical volumes containing the user data with lvextend, or you
can create new logical volumes with lvcreate.
Online DLE to increase the space available for LVM configuration data
T
he LUN for a physical volume was dynamically expanded using a storage utility (such as those
available on EVA arrays) and the physical volume needs to be reconfigured using online vgmodify
DLE (-E option) to make use of the new space for LVM configuration data. For example, following
online vgmodify DLE, you can invoke vgmodify with the –S option to use the new space to
increase the maximum volume group size. You can also specify the –E and –S options together to
perform DLE and maximum VG size increase in a single step. LVM uses the space it needs to increase
the maximum VG size and any leftover space is made available as new extents for user data.
Online reprovisioning to increase the ma
ximum volume group size
The maximum VG size you chose when you invoked vgcreate needs to be increased to allow more
extents to be added to the VG, either through DLE or by adding more PVs. You can use the online
vgmodify –S option to increase (or reprovision) the maximum VG size. Increasing the maximum VG
size might require that additional space be added to every PV through DLE. 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 PVs to increase the maximum
VG size. If insufficient free extents are available at the end of some PVs, and those PVs cannot be
expanded further via DLE, it might be necessary to make the extents at the ends of those PVs free by
using the pvmove command to relocate the portions of the logical volumes that are using those
extents. The maximum VG size is not changed until all PVs in the VG are reconfigured.