LVM Volume Group Dynamic LUN Expansion (DLE) and Contraction (DLC) (September 2009)
60
LV Name /dev/vg1/lvol1
LV Status available/syncd
LV Size (Mbytes) 204784
Current LE 25598
Allocated PE 51196
Used PV 2
--- Physical volumes ---
PV Name /dev/disk/disk46
PV Status available
Total PE 38398
Free PE 12800
...
PV Name /dev/disk/disk47
PV Status available
Total PE 25598
Free PE 0
7. Run online vgmodify in review mode to verify that the second PV requires reconfiguration
for the DLE and to check the number of new extents to be added.
# vgmodify -r -a -E vg1 /dev/rdisk/disk47
Physical volume "/dev/rdisk/disk47" requires reconfiguration for
expansion.
Current number of extents: 25598
Number of extents after reconfiguration: 25602
Physical volume "/dev/rdisk/disk47" was not changed.
In this case, only 4 new extents are added because the VG already has 63996 extents
(38398 + 25598) after the reconfiguration of the first PV. Therefore, you can only add four
more extents before reaching the maximum number of extents for the VG (64000 =
maximum VG size 500GB/extent size 8MB).
8. Run online vgmodify in change mode to perform the reconfiguration of the second PV.
# vgmodify -a -E vg1 /dev/rdisk/disk47
Reconfiguration to expand physical volume "/dev/rdisk/disk47"
succeeded.
Previous number of extents: 25598
Number of extents after reconfiguration: 25602
Physical volume "/dev/rdisk/disk47" was changed.
Volume Group configuration for /dev/vg1 has been saved in
/etc/lvmconf/vg1.conf
9. Run vgdisplay –v to view the results.
# vgdisplay –v vg1
--- Volume groups ---
VG Name /dev/vg1
...
PE Size (Mbytes) 8
Total PE 64000
Alloc PE 51196
Free PE 12804
...
VG Version 2.1
VG Max Size 500g
VG Max Extents 64000
--- Logical volumes ---
LV Name /dev/vg1/lvol1
LV Status available/syncd
LV Size (Mbytes) 204784
Current LE 25598