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

13
is the cause of the failure. To overcome this problem, the disk can be replaced and the
configuration restored with vgcfgrestore.
The volume group must not have a cluster lock physical volume. The cmviewcl –v
command displays the device path name of the disk configured as a cluster lock LUN.
The increase in disk size must be greater than the size of a physical extent on the physical
volume.
The number of extents allocated on the physical volume in question must not already b e
equal to the max_pe or max_pv for the volume group.
Online vgmodify procedures
Performing an online DLE
1. The trigger for dynamic expansion of a disk is usually when you find out that a configuration
operation fails because of lack of space on a particular physical volume. For example, you
have a contiguous logical volume on a particular physical volume PV1. You plan to extend
this logical volume, but do not have the required space on PV1. In this case, one option is to
dynamically expand the LUN and use vgmodify to take account of the size change.
2. Decide on the correct size to which to expand the LUN. Expanding the disk to a larger size
arbitrarily might not be the right thing to do. Here, you can use vgmodify in table mode to
decide on the optimal size to which the disk is to be expanded.
# vgmodify -t –v vg1 #Use the table output to determine the right size
for expansion. (Form ore information, see the Common
Versi
on 1.0 examples.)
3. Perform the DLE operation using the relevant disk utilities.
4. Use the review mode to ensure that a DLE on the disk will yield the desired results as follows:
# vgmodify -v –r –a –E vg1 #Note –r, review mode.
5. Perform the actual DLE operation in the change mode as follows:
# vgmodify –a –E vg1 #Note, same options and arguments as in
the previous step, but without –r option.
Performing an online DLC
When you realize that you have over-provisioned for certain disks that are being used by LVM volume
groups, perform a DLC operation. Follow these steps:
1. Decide the correct size to which to contract the physical volume.
2. Use the vgmodify command to perform the DLC from the LVM side.
3. Use the review mode to ensure that a DLC on the disk will yield the desired results. Note that
you must specify the size to which the disk is to be reduced along with –C option. You must
specify only one path with the –C option.
# vgmodify –r –a –C dlc_size vg1 /dev/rdisk/disk53
#Note –r, review mode.
Review the output and take the necessary steps suggested. Then, perform the operation with
the suitable size.
4. Perform the actual DLC operation in the change mode.
# vgmodify –a –C dlc_size vg1 /dev/rdisk/disk53
#Note, same options and arguments as in the
previous step, but without –r option.