LVM Volume Group Dynamic LUN Expansion (DLE) and Contraction (DLC) (September 2009)
39
pvmove, lvreduce, or lvremove. Run vgmodify –r –e max_pe –p max_pv vgname, where
max_pe and max_pv are the chosen values. Finally, when a maintenance window is available,
deactivate the volume group and run vgmodify with the same options as before but without –r.
This example assumes you want to place a disk that is 90 GB in size and increase the number of
physical volumes to at least 20.
1. Verify the current configuration.
# vgmodify -tv vg01
Volume Group configuration for /dev/vg01 has been saved in
/etc/lvmconf/vg01.conf
Current Volume Group settings:
Max LV 255
Max PV 16
Max PE per PV 5119
PE Size (Mbytes) 4
VGRA Size (Kbytes) 736
VGRA space (Kbytes) on Physical Volumes with extents in use:
PV current -n
/dev/rdsk/c0 t0d0 896 4096
/dev/rdsk/c0t1d0 896 4096
/dev/rdsk/c0t3d0 896 4096
Summary 896 4096
Volume Group optimized settings (no PEs renumbered):
max_pv(-p) max_pe(-e) Disk size (Mb)
3 35836 143345
4 26876 107505
5 21500 86001
6 17916 71665
7 15356 61425
* Entries deleted for brevity
21 5116 56306
22 4860 19441
23 4604 18417
* Entries deleted for brevity
105 1020 4081
Note without –n that we can only place 5 disks of the required size or greater into the
volume group. Also that the summary shows that with –n you can handle a larger VGRA so
using –n is beneficial.
# vgmodify -tnv vg01
Volume Group configuration for /dev/vg01 has been saved in
/etc/lvmconf/vg01.conf
Current Volume Group settings:
Max LV 255
Max PV 16
Max PE per PV 5119
PE Size (Mbytes) 4
VGRA Size (Kbytes) 736
VGRA space (Kbytes) on Physical Volumes with extents in use:
PV current -n
/dev/rdsk/c0t0d0 896 4096
/dev/rdsk/c0t1d0 896 4096
/dev/rdsk/c0t3d0 896 4096