LVM Version 2.0 Volume Groups in HP-UX 11i v3 (September 2008)

Simplified Provisioning
With 1.0 version volume groups, you provision the volume group with three parameters: max PVs, max extents,
and max LVs. Furthermore, 1.0 volume groups keep their disk metadata within one physical extent. Both of these
factors make it challenging to configure 1.0 volume groups can easily grow over time. With 2.x version volume
groups, you provide only one maximum when provisioning. This is the maximum size of the volume group (new –S
option). The size entered with –S is the size of the user data. LVM guarantees that for any 2.x volume group, you
can later add physical volumes and logical volumes up to the 2.x supported limits. In addition, LVM disk
metadata can be larger than one physical extent, thus giving much more flexibility on how to configure and
provision a volume group.
To make room for LVM metadata, the actual size of the volume group is larger than what is specified with –S.
For a 2.x volume group, you do not need to consider if the default maximum number of extents per physical
volumes, the default maximum number of logical volumes, or the default maximum number physical volumes are
sufficient. LVM manages this automatically.
Tip: When thinking about your volume group needs, consider how fast your storage requirements have grown
over time. Estimate how fast and how long particular volume groups will exist. For example, if you have a
database that doubles in size every two years, and you expect the application environment to last ten years,
provisioning five times the current amount is a good starting point.
Example
To create a 2.0 volume group provisioned for 1 petabyte, enter:
# vgcreate -V 2.0 -s 32 -S 1p myvg /dev/disk/disk149
There is a relationship between the maximum number of extents and the extent size when selecting the maximum
volume group size. To help in selecting the extent size, you can preview it with vgcreate extent size or maximum
volume group size.
After you know the volume group size you want to provision for, you can determine the minimum extent size
required to achieve it. For that, use vgcreate with the –E option.
Example
What is the minimum extent size to provision a volume group for 1 petabyte?
# vgcreate -V 2.0 -E -S 1p
Max_VG_size=1p:extent_size=32m
The maximum size for a volume group is displayed with vgdisplay in the “VG Max Size” field.
What is the Disadvantage of Over Provisioning?
The cost of over provisioning is reduced compared to 1.0 volume groups. It costs only disk space; it does not cost
system memory. When a large 2.x volume group is provisioned, enough disk space is reserved for the metadata
to handle any LVM configuration for a volume group of that size.
16