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

36
Online and offline volume group configuration change examples
The examples in this section are for both online and offline, and assume the volume group is already
activated. In offline mode, this is not a requirement as vgmodify activates the volume group, if
needed. If vgmodify activates the volume group, it deactivates it before completion.
In offline mode, the volume group can be active in case of review mode, but must be activated during
the actual vgmodify operation. In online mode, the volume group must be active during the actual
operation.
Increasing the maximum number of physical volumes and accommodating larger disks –
without PE renumbering
Using vgmodify -t, select the entry from the tables that meets the requirement for the maximum disk
size with an adequate number of physical volumes. If you cannot achieve the number of physical
volumes you require, use the vgmodify -tn option. If you use a setting from the –tn table and this
requires physical extent renumbering lower, run vgmodify –tnv and check that no disks need the
first physical extent to be made free. If they do, free up this extent on each disk using 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 23 GB in size and increase the number of
physical volumes to at least 19.
1. Review the current configuration
# vgmodify -tv vg02
Volume Group configuration for /dev/vg02 has been saved in
/etc/lvmconf/vg02.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 all Physical Volumes:
PV current -n
/dev/rdsk/c0t0d0 896 4096
/dev/rdsk/c1t0d0 896 4096
Summary 896 4096
Volume Group optimized settings (no PEs renumbered):
max_pv(-p) max_pe(-e) Disk size (Mb)
2 53756 215025
3 35836 143345
4 26876 107505
* Entries deleted for brevity *
17 6140 24561
18 5884 23537
19 5628 22513
20 5372 21489
21 5116 20465
22 4860 19441
* Entries deleted for brevity *
141 632 2529
Table mode displays the current settings, including the current VGRA size. The –v argument
shows the amount of space for the VGRA on each of the physical volumes. The summary