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

69
example, you want to unmirror the logical volume and use the pvmove command to move half of the
extents from the first PV to the second PV to allow both LUNs to be contracted.
1. Unmirror the logical volume.
# lvreduce -m 0 /dev/vg1/lvol1
Logical volume "/dev/vg1/lvol1" has been successfully reduced.
Volume Group configuration for /dev/vg1 has been saved in
/etc/lvmconf/vg1.conf
2. Review the results.
# lvdisplay -v /dev/vg1/lvol1
--- Logical volumes ---
LV Name /dev/vg1/lvol1
...
Mirror copies 0
...
LV Size (Mbytes) 409064
Current LE 51133
Allocated PE 51133
...
--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/disk/disk46 51133 51133
--- Logical extents ---
LE PV1 PE1 Status 1
00000 /dev/disk/disk46 00000 current
00001 /dev/disk/disk46 00001 current
00002 /dev/disk/disk46 00002 current
00003 /dev/disk/disk46 00003 current
00004 /dev/disk/disk46 00004 current
*Entries deleted for brevity
51129 /dev/disk/disk46 51129 current
51130 /dev/disk/disk46 51130 current
51131 /dev/disk/disk46 51131 current
51132 /dev/disk/disk46 51132 current
# vgdisplay –v vg1
--- Volume groups ---
VG Name /dev/vg1
...
PE Size (Mbytes) 8
Total PE 102266
Alloc PE 51133
Free PE 51133
...
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 1
--- Physical volumes ---
PV Name /dev/disk/disk46
PV Status available
Total PE 51133