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

12
# vgmodify –a n vg02
For handling the root and non-root volume groups, see the preceding Performing an offline DLE
se
ction.
Online vgmodify
This section discusses the use of the vgmodify command on an activated volume group. Online
vgmodify is supported starting with the HP-UX 11i v3 September 2008 Update release.
Beginning with the HP-UX 11iv3 September 2008 Update, you can use online vgmodify for
Dynamic LUN Expansion. Beginning with the HP-UX 11i v3 March 2009 Update, you can also use
online vgmodify for Dynamic LUN Contraction and to change the characteristics of a volume group.
Online vgmodify enables you to handle a LUN expansion and LUN contraction while the volume
group is online. Most of the high end devices (for example, HP Enterprise Virtual Array) enable you to
increase or decrease the capacity of a LUN without affecting the availability of the LUN. This is
referred to as Dynamic LUN Expansion (DLE) and Dynamic LUN Contraction (DLC), respectively. The
online vgmodify command enables you to take advantage of these features.
After a DLE using the device utilities, you can use online vgmodify to enable LVM to access this new
space. After the volume group has been adjusted by
vgmodify, you can allocate the new space
using the normal LVM method by
lvextend or lvcreate. Handling LUN expansion using online
vgmodify is referred to as online DLE.
To use vgmodify for online DLE, you must explicitly specify the –a option (to indicate that this is an
online operation) and the –E option (to indicate that the user desires to handle a DLE operation). You
can either choose to handle DLE on all the disks belonging to the volume group or can explicitly list
the physical volumes for which DLE needs to be handled. When you specify a set of physical volumes
in conjunction with the –E option, the change in disk size of a physical volume not belonging to the
specified set is ignored by online DLE.
Prior to using the LUN contraction capabilities at the device end, you must prepare the physical
volume for a DLC (to a particular size smaller than the current size) using the vgmodify command. If
you do not and perform a DLC, the LUN is marked as unavailable. Handling LUN contraction using
online vgmodify is referred to as online DLC.
To use vgmodify for online DLC, you much explicitly specify the –a option (to indicate that this is an
online operation) and the –C option (to indicate that the user desires to handle a DLC operation). The
–C option expects the value to be specified, which is the new size to which vgmodify needs to
prepare the physical volume for a DLC. The new size must always be less than the current size of the
physical volume.
To use online vgmodify to change the characteristics of the volume group (like changing the max_pv
settings or changing the number of logical volumes), you must specify the –a option (to indicate that
this is an online operation) along with the other options. During this operation, the volume group is
suspended and is resumed on completion of the configuration changes.
Prerequisites
T
he volume group must be active.
The volume group must not be activated in shared mode or read-only mode.
The volume group must not be in a quiesced state.
All physical volumes belonging to volume group must be accessible.
There cannot be any entries in the bad block directory of any physical volume in the volume
group. The vgmodify command reports any disks containing bad blocks and exit without
making any changes. Use pvdisplay –d to display the count of bad blocks and verify this