Handling Size Increases
From the LUN Side:
Disk arrays typically allow a LUN to be resized. If the volume group is activated during size
increase, this is known as Dynamic LUN Expansion (DLE). If you increase the size of a LUN, follow
these steps to incorporate the additional space into the volume group:
1.
Increase the LUN size using the instructions for the array.
2.
Verify that the LUN is expanded by running the
diskinfo
command.
From the LVM Side (for Version 1.0 Volume Groups):
Do the following for Version 1.0 volume groups.
1.
Run
vgmodify
to detect any physical volume size changes. It also reports whether all of the
space can be made available to the volume group.
2.
If
vgmodify
reports that the maximum number of physical extents per physical volume
(
max_pe
) is too small to accommodate the new size, use
vgmodify
with the
-t
and
-n
options to determine a new value for
max_pe
, as described in
“Modifying Volume Group
Parameters” (page 58)
.
3.
Review the values by running
vgmodify
with the new settings and the
-r
option.
4.
Deactivate the volume group, if needed.
TIP:
Beginning with the September 2008 Update, you can use
vgmodify
to recognize and
accommodate size increases without deactivating the volume group. For more information,
see vgmodify(1M).
5.
Commit any new value of
max_pe
and update the physical volume information by running
vgmodify
without the
-r
option.
6.
If needed, activate the volume group. To verify that the increased space is available, run the
vgdisplay
and
pvdisplay
commands.
From the LVM Side (for Version 2.x Volume Groups):
Do the following for Version 2.x volume groups.
NOTE:
Beginning with the September 2009 Update, the
vgmodify
also supports Version 2.x
volume groups, but the volume groups must be in active mode to run
vgmodify
. For more
information, see vgmodify(1M).
If the LUN for a physical volume was dynamically expanded using an array utility, the
vgmodify
-E
option can be used to make available the new space for user data. After the physical volume
is reconfigured, you can expand logical volumes with
lvextend
, or you can create new logical
volumes with
lvcreate
.
The extra space added to a physical volume through an array utility can also be used for additional
LVM configuration data when increasing the maximum VG size through the
vgmodify -S
option
(see
“Modifying Volume Group Parameters” (page 58)
). The
vgmodify –E
and
–S
options can
also be used together to perform DLE and to increase maximum VG size increase in a single step.
To handle dynamic LUN expansion for a PV in a Version 2.x volume group, follow these steps:
1.
Use
vgdisplay -v
to determine which PV in the volume group require expansion and
decide how much each LUN needs to be expanded. This decision can be based on which
logical volumes need to grow and which PVs they can reside on. This decision can also be
based on whether or not the DLE is being performed as part of increasing the maximum VG
size. See the
“Modifying Volume Group Parameters” (page 58)
section for a description for
DLE in combination with increasing VG size limit.
2.
Use the
vgmodify -r
(review) option to verify which physical volumes require reconfiguration
for DLE and to check if the reconfiguration will yield the desired result. If no PVs are specified
78
Administering LVM