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

17
# vgmodify –v -r –a -E vg04
Volume Group configuration for /dev/vg1 has been saved in
/etc/lvmconf/vg1.conf
/dev/rdisk/disk43 Warning: Max_PE_per_PV for the volume group
(12900) too small for this PV (17501).
Using only 12900 PEs from this physical volume.
/dev/rdisk/disk46 Warning: Max_PE_per_PV for the volume group
(12900) too small for this PV (17501).
Using only 12900 PEs from this physical volume.
"/dev/rdisk/disk43" size changed from 52428800 to 71687369kb
"/dev/rdisk/disk43" size is limited by the maximum extents per PV
to 52838400.
"/dev/rdisk/disk47" size changed from 3145728 to 52428800kb
An update to the Volume Group IS required
Review complete. Volume group not modified
The results of the review indicate the /dev/rdisk/disk43 size increased since it was
initialized with pvcreate. LVM has the correct size for /dev/rdisk/disk46, so it has not
changed size since it was initialized with pvcreate. Both are unable to allocate all their
space as the maximum number of PEs per PV setting is too low. The /dev/rdisk/disk47
size increased, and LVM can use all its new space.
3. Do an online DLE to use the additional space the can be accommodated using the current
max_PE value.
Alternatively, change the max_PE value appropriately using online vgmodify to use all the
additional disk space added. Then, perform the DLE (see the examples of physical extent
renumbering in that section).
Performing online DLE when all additional disk space can be allocated
This example assumes you have a 50 GB disk belonging to volume group vg1 that has its max_PE per
PV value set to 25535. The disk size was increased to 68 GB using the relevant disk utilities.
1. Review current volume group parameters.
# vgdisplay vg1
--- Volume groups ---
VG Name /dev/vg1
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 1
Open LV 0
Max PV 16
Cur PV 1
Act PV 1
Max PE per PV 25535
VGDA 2
PE Size (Mbytes) 4
Total PE 12799
Alloc PE 12799
Free PE 0
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0
VG Version 1.0
VG Max Size 1634240m
VG Max Extents 408560
There are 12799 extents allocated on this physical volume.