HP-UX System Administrator's Guide: Logical Volume Management (5900-3028, March 2013)

1. Run vgmodify to collect information about the volume group.
Save the output from these three commands:
# vgmodify -o -r vgnn
# vgmodify -v -t vgnn
# vgmodify -v -n -t vgnn
The -o option attempts to optimize the values by making full use of the existing LVM metadata
space. The -t option reports the optimized range of settings without renumbering physical
extents; the -n option enables renumbering of physical extents.
2. Based on the information collected in the previous step, choose new values for the volume
group parameters.
3. The new values may increase the size of the volume group reserved area (VGRA) on each
physical volume. The VGRA resides in the LVM header, so increasing its size may require
moving the first physical extent of any user data on physical volume. Use the pvmove command
to move the first physical extent to another location.
4. Review the values by running vgmodify with the new settings and the -r option.
5. Deactivate the volume group, if needed.
TIP: Beginning with the March 2009 Update of HP-UX, the volume group can be active
when running vgmodify.
6. Commit the new values by running vgmodify without the -r option.
7. If needed, activate the volume group. Run the vgdisplay command to verify the settings
have been applied.
Example: vgmodify for a Version 1.0 Volume Group
As an example, you expect to add larger disks to the volume group vg32. You want to increase
the maximum number of physical extents per physical volume (max_pe) and the maximum number
of physical volumes (max_pv). Here are the steps involved:
1. Run vgmodify to collect information about the volume group.
Save the output from these three commands:
# vgmodify -o -r vg32
Current Volume Group settings:
Max LV 255
Max PV 16
Max PE per PV 1016
PE Size (Mbytes) 32
VGRA Size (Kbytes) 176
New configuration requires "max_pes" are increased from 1016 to 6652
The current and new Volume Group parameters differ.
An update to the Volume Group IS required
New Volume Group settings:
Max LV 255
Max PV 16
Max PE per PV 6652
PE Size (Mbytes) 32
VGRA Size (Kbytes) 896
Review complete. Volume group not modified
# vgmodify -v -t vg32
Current Volume Group settings:
Max LV 255
Max PV 16
Max PE per PV 1016
PE Size (Mbytes) 32
VGRA Size (Kbytes) 176
VGRA space (Kbytes) on Physical Volumes with extents in use:
PV current -n
Common LVM Tasks 59