LVM Version 2.0 Volume Groups in HP-UX 11i v3 (September 2008)
LVM Changes in the March 2008 Release of HP-UX 11i v3
Creation of a volume group
Automatic creation of the volume group directory and group file is available starting with the March 2008 release
of HP-UX 11i. It is available for 1.0 and 2.x volume groups. The following examples show volume group creation
using the legacy method (mkdir and mknod) and examples of automatic creation.
Creating a 1.0 volume group
To avoid manually creating the volume group directory and the group file, use vgcreate. In this case, vgcreate
automatically creates the directory and group file if they do not exist for this volume group.
Example
# vgcreate -s 8 -l 3 -p 16 -e 63535 /dev/vg01 /dev/dsk/c3t4d0
To select a particular volume group number or if you want to create the volume group the same way as in releases
before March 2008, first create the volume group directory and the group file.
Example
# mkdir /dev/vg01
# mknod /dev/vg01/group c 64 0x010000
# vgcreate -s 8 -l 3 -p 16 -e 63535 /dev/vg01 /dev/dsk/c3t4d0
Creating a 2.
x
volume group
• As with 1.0 volume groups, for 2.x volume groups, you can manually create the volume group directory and
group file, or use vgcreate to automatically create them if they do not already exist.
• A new –V option specifies the version of the volume group to create. To create a 2.x volume group, specify “–
V 2.0” or “–V 2.1” as an option on the command line. Version 1.0 volume groups are the default and –V 1.0
is also valid to specify a 1.0 version volume group.
• A new –S option must be used to create a 2.x volume group. It specifies the maximum size the volume group
may reach. LVM uses this size to reserve enough space on disk to accommodate the metadata for a volume
group of that size. Note this does not need to be the actual size of the volume group but how large the
volume group can grow over time. The “How to Provision a 2.x Volume Group” section discusses
provisioning strategies and tradeoffs.
• For a 2.x volume group, if the sum of the physical volume sizes passed on the command line is greater than
the maximum size specified with the –S option, vgcreate automatically increases the maximum size of the
volume group to the sum of the physical volumes sizes and displays an informational message.
• The maximum size specified requires a unit qualifier. The units are in Megabytes (2
20
), Gigabytes (2
30
),
Terabytes(2
40
), and Petabytes(2
50
), represented by m, g, t, and p, respectively, on the command line
• A new –E option displays which volume group size can be reached for a given extent size, or which minimum
extent size must be used for a given volume group size. Use this to determine the best fit of volume group size
and physical extent size.
• The –s option (to specify the extent size) is mandatory for 2.x volume groups.
• The –e, –l, –p, and –f options are invalid when applied to a 2.x volume group. If used for a 2.x volume
group, vgcreate fails.
–e max_pe is not needed for 2.x volume groups because the 2.x metadata format is provisioned so that the
number of physical extents can always grow to the maximum size specified with –S.
5