LVM Volume Group Dynamic LUN Expansion (DLE) and Contraction (DLC) (September 2009)
53
5. Verify the result of the DLE reconfiguration by running the vgdisplay –v command to check
the total number of extents for the VG, the total number of free extents for the VG, the number
of extents for each PV, and the number of free extents for each PV.
Online DLC
1. Determin
e which physical volume is over-provisioned and decide what the new (smaller) PV
size will be. Use the The pvdisplay –v command to assist in this decision by displaying
the total number of extents for the PV and the number of free extents for the PV. It also shows
if the extents at the end of the PV are free. If the PV has no free extents, you might need the
pvmove command to relocate the portions of the logical volumes residing on the extents at
the end of the PV.
2. Use the vgmodify review mode to verify if the desired (smaller) PV size will be too small. If
the new PV size requires extents to be removed that are allocated to logical volumes,
vgmodify reports that the specified PV size is too small and reports the smallest PV size that
the PV can be contracted to.
# vgmodify –r –a –C 8g vg1 /dev/rdisk/disk50 # Review mode (-r)
3. Perform the actual DLC reconfiguration (change mode).
# vgmodify –a –C 8g vg1 /dev/rdisk/disk50 # Change mode (-r removed
4. Verify the result of the DLC reconfiguration by running the vgdisplay –v command to check
the total number of extents for the VG, the total number of free extents for the VG, the total
number of extents for the PV, and the number of free extents for the PV. The size of the PV
reported by pvdisplay (determined by multiplying extent size by total number of extents)
must be less than or equal to the size that the LUN is going to be contracted to.
5. Run the appropriate storage utility to contract the LUN to the new (smaller) size. If the LUN is
contracted to a size smaller than what pvdisplay reported, the PV is marked as
unavailable.
Online reprovisioning to increase the ma
ximum volume group size
Use this procedure when the volume group reaches its maximum VG size limit.
You initially set the maximum VG size when you created the Version 2.x volume group with the
vgcreate command. Use the vgdisplay command to view the maximum VG size. The largest
maximum VG size that you can select in vgcreate and vgmodify for Versions 2.0 and 2.1 is 2 PB.
This value is listed in the lvmadm –t command output, which displays all of the Version 1.0 and 2.x
limits For more information on maximum size limits for Version 2.x volume groups, see the
whitepapers and manpages in the Command usage section.
When the maximum VG size is rea
ched, the vgdisplay output shows that the Total PE count for the VG
matches the VG Max Extents count. Typically, when the maximum VG size limit is reached, the last PV
that was added through vgcreate or vgextend was not fully configured. In other words, the
number of extents configured for the last PV are typically not to the full capacity of the PV. Also, if the
VG is at its maximum VG size limit, a vgextend attempt to add another PV fails with the Error:
The volume group exceeds the configured size message. In addition, a vgmodify DLE
attempt reports that no additional extents were added to the VG.
At that point, if the volume group has no more free extents, logical volumes cannot be expanded. If
more space is needed for storing additional user data, use the vgmodify command to increase the
maximum VG size.
A minimum extent size of 64 MB is required for the maximum VG size limit of 2 PB for Versions 2.0
and 2.1, as reported by the vgcreate -V 2.x –E –S 2p command. If the volume group extent
size is less than 64 MB, use the vgcreate –V 2.x –E –s extent_size command to determine
the maximum possible VG size limit.
To increase the maximum VG size for the volume group, follow these steps: