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

73
25530 current /dev/vg1/lvol1 25530
25531 current /dev/vg1/lvol1 25531
25532 current /dev/vg1/lvol1 25532
# vgdisplay –v vg1
--- Volume groups ---
VG Name /dev/vg1
...
PE Size (Mbytes) 8
Total PE 76666
Alloc PE 51133
Free PE 25533
...
VG Version 2.1
VG Max Size 256t
VG Max Extents 33554432
--- Logical volumes ---
LV Name /dev/vg1/lvol1
LV Status available/syncd
LV Size (Mbytes) 409064
Current LE 51133
Allocated PE 51133
Used PV 2
--- Physical volumes ---
PV Name /dev/disk/disk46
PV Status available
Total PE 25533
Free PE 0
...
PV Name /dev/disk/disk47
PV Status available
Total PE 51133
Free PE 25533
10. Run a storage utility to contract the first PV from 400 GB to 200 GB.
11. Verify that the LUN is smaller.
# diskinfo /dev/rdisk/disk46
SCSI describe of /dev/rdisk/disk46:
size: 209715200 Kbytes
Online DLC not requiring pvmove
In the previous example, you performed a DLC of the first PV from 400 GB to 200 GB, which
required using pvmove to relocate extents of the logical volume before preparing the first PV for
contraction. In this example, you decide to prepare the second PV for contraction to just 300 GB,
which does not require using pvmove first.
1. Run vgmodify in review mode on the second PV to verify that it can now be prepared for
contraction to 300 GB.
# vgmodify -r -a -C 300g vg1 /dev/rdisk/disk47
Physical volume "/dev/rdisk/disk47" requires reconfiguration
for contraction to requested size 307200 MB.
Current number of extents: 51133
Number of extents after reconfiguration: 38333
The physical volume "/dev/rdisk/disk47" can be reconfigured for
contraction
to a minimum size of 205329 MB by removing free extents from the
end of the physical volume.