HP-UX System Administrator's Guide: Logical Volume Management (5900-3028, March 2013)
1. Use the review mode of vgmodify to verify that the volume group maximum size can be
decreased to the desired lower value.
# vgmodify -r -a -S 32t vg1
2. If review mode indicates that the maximum VG size can be decreased, perform the actual
reprovisioning reconfiguration. The vgmodify command reconfigures every PV in the VG to
reduce the amount of space being used for LVM configuration date. The unused space is made
available as new extents for user data
# vgmodify -a -S 32t vg1
3. Verify the result of the reprovisioning reconfiguration by running the vgdisplay -v command
to check the new maximum VG size, the new maximum number of extents for the VG, the new
total number of extents for the VG, and the new number of free extents for the VG.
Example: vgmodify for a Version 2.x Volume Group
Here is an example of online reprovisioning when a volume group has reached its maximum VG
size limit. In this example, the vgmodify -S option is used to increase the maximum VG size for
a 2.x volume group that has reached its maximum VG size limit. Here is the scenario:
The volume group /dev/vg1 has two physical volumes, /dev/disk/disk46 and /dev/disk/
disk47.
The physical volume /dev/disk/disk46 currently has 38398 extents and some extents at the
end of the physical volume are free. The physical volume /dev/disk/disk47 currently has
25602 extents. The volume group currently has 64000 extents (38398 + 25602 = 64000).
The maximum VG size as shown by vgdisplay is 500 GB. The maximum number of extents in
the volume group is 64000.
The diskinfo command shows that both physical volumes are roughly 300 GB in size. However,
since the maximum VG size is only 500 GB, roughly 100 GB is currently unavailable for use on
/dev/disk/disk47. In addition, any attempt to add more physical volumes through the
vgextend command will fail since the volume group is already at its maximum VG size limit.
To make the full 300 GB on /dev/disk/disk47 available for use, and to allow additional
physical volumes to be added to the volume group through the vgextend command, the vgmodify
-S option can be used to increase the maximum VG size. In this example, it is increased from 500
GB to 8 TB to allow room for future growth. The steps involved are:
1. Run vgdisplay, which shows that the maximum VG size is 500 GB and the maximum
number of extents in the volume group (determined from the maximum VG size) is 64000.
# vgdisplay -v vg1
--- Volume groups ---
VG Name /dev/vg1
...
VG Version 2.1
VG Max Size 500 GB
VG Max Entents 64000
...
2. Run diskinfo on the physical volumes to display their size.
# diskinfo /dev/rdisk/disk46
# diskinfo /dev/rdisk/disk47
3. Run online vgmodify in review mode to verify that all physical volumes can be reconfigured
to the new (larger) maximum VG size of 8TB.
# vgmodify -r -a -E -S 8t vg1
Physical volume "/dev/disk/disk46" requires reconfiguration to be
provisioned to the requested maximum volume group size 8388608 MB.
Current number of extents: 38398
Number of extents after reconfiguration: 38396
...
Common LVM Tasks 63