Example: Vgmodify For A Version 2.X Volume Group - HP -UX 11i Administrator's Manual

Logical volume management
Hide thumbs Also See for HP-UX 11i:
Table of Contents

Advertisement

2.
If review mode indicates that the maximum VG size can be increased, perform the actual
reprovisioning reconfiguration. This operation reconfigures every PV in the VG to the new
(larger) maximum VG size. This operation also automatically adds new extents to PVs where
the new extents were previously not added because the volume group was at its maximum
number of extents.
# vgmodify -a -E -S 64t 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, and
additional extents that might have been added to some of the PVs..
4.
If any vgextend were previously unable to add PVs to the volume group, rerun those
commands now. The vgextend commands must succeed in adding more PVs to the VG. Run
vgdisplay -v to verify that more free extents are now available.
5.
Expand logical volumes using lvextend -l as necessary to allow them to accommodate
more user data. You can also create additional logical volumes using lvcreate. You can
also add additional mirrors using lvextend -m.
To decrease the maximum Volume Group size for a Version 2.x volume group, follow these steps:
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.
Common LVM Tasks
63

Advertisement

Table of Contents
loading

Table of Contents