vgcreate(1M)vgcreate(1M)NAMEvgcreate - create LVM volume group
SYNOPSIS
autobackup] extensibility] max_pe] max_lv] max_pv] pe_size] pvg_name]
vg_name pv_path ...
pe_size vg_size autobackup] extensibility] pvg_name] vg_name
pv_path ...
pe_size | vg_size}
DESCRIPTION
The command without the option creates a new volume group. vg_name is
a symbolic name for the volume group and must be used in all references
to it. vg_name is the path to a directory entry under that must con‐
tain a character special file named Except for the entry, the vg_name
directory should be empty. A user may explicitly create the vg_name
directory and the file before creating the volume group. If absent,
the command will automatically create the directory and the file,
assigning the minor number. If the file is automatically created, any
available minor number may be assigned to the file.
leaves the volume group in an active state.
Before assigning a physical volume to a volume group, the physical vol‐
ume has to be created using the command (see pvcreate(1M)).
If fails to install the first specified physical volume into the volume
group, the volume group is not created. If, for any reason, one of the
remaining specified physical volumes cannot be installed into the vol‐
ume group, an error message is printed, but the installation continues
until the end of the list of physical volumes.
The command with the option displays information which may be useful in
deciding on parameters for use in creating a volume group version 2.0
and higher.
The option (only for volume groups versions 2.0 and higher) displays
the relationship between physical extent size (pe_size) and maximum
volume group size (vg_size). See lvm(7) for more on this topic. A
pe_size or a vg_size must be supplied on the command line. If pe_size
is specified, then the maximum volume group size which can be created
using that extent size is displayed using the suffix notation explained
in the description of the option. If the vg_size is specified then the
minimum extent size required to support the given maximum volume group
size is displayed in megabytes.
Options and Arguments
recognizes the following options and arguments:
Specify the version of the volume group.
Currently only and are supported. Different
versions represent significant changes in
LVM software and data layout and may have
compatibility implications when volume
groups are shared or moved from system to
system. See lvm(7) for more details. The
default version is 1.0.
pv_path The block device path name of a physical
volume that will be assigned to the new vol‐
ume group.
On PA-RISC systems, pv_path should be the
path name for the whole disk. For HP
Integrity system boot physical volumes,
pv_path should be the path name for the disk
section containing the HP-UX partition (see
model(1) and getconf(1)). For HP Integrity
system non-boot physical volumes, pv_path
can be the path name for the whole disk or
the disk section containing the HP-UX parti‐
tion.
You can specify physical volume links pv-
links for a physical volume providing dif‐
ferent paths that reference the same physi‐
cal volume in the pv_path list. The order
in which the paths are listed is important.
The first path becomes the to the physical
volume, and the second becomes an to the
physical volume. The is the default path
used to access the physical volume. (see
section). If the becomes unavailable, LVM
automatically switches to the to access the
physical volume. Currently, LVM supports a
maximum of 8 paths to a physical volume (7
alternate and one primary).
vg_name The path name of a subdirectory of the
directory. vg_name must be empty except for
a character special file named Typically,
this directory name is in the form where NN
numbers sequentially from
Set automatic backup for this invocation of this command.
autobackup can have one of the following
values:
Automatically back up configuration changes
made to the volume group.
This is the default.
After this command executes, the com‐
mand (see vgcfgbackup(1M)) is exe‐
cuted for the volume group.
Do not back up configuration changes this
time.
Only applicable to volume groups version 1.0.
Set the maximum number of physical extents
that can be allocated from any of the physi‐
cal volumes in the volume group. The
default value for max_pe is However, if the
size of any physical volume exceeds times
the pe_size, the default value for max_pe is
adjusted to match the physical volume size.
The maximum number of physical extents can
be a value in the range 1 to 65535.
Only applicable to volume groups version 1.0.
This option will force a volume group to be
created with a physical volume which has
alternate block(s) already allocated, (that
is, this physical volume was not initialized
using This option should be used with
extreme caution. If the volume group to be
created has a different physical extent
size, the alternate block(s) might be inside
the user data area. Potential data corrup‐
tion could occur.
Create a new physical volume group with the name
pvg_name. All physical volumes specified in
the pv_path parameter become a member of the
newly created physical volume group.
The physical volume group information is
stored in an ASCII file, The file can be
edited to create a physical volume group
instead of using the command. However,
ensure that the physical volumes to be used
have already been installed in the volume
group prior to creating the physical volume
group.
The physical volume group name must be
unique within a volume group although iden‐
tical physical volume group names can appear
in different volume groups (see lvmpvg(4)
for format details).
Only applicable to volume groups version 1.0.
Set the maximum number of logical volumes
that the volume group is allowed to contain.
The default value for max_lv is The maximum
number of logical volumes can be a value in
the range 1 to 255.
Only applicable to volume groups version 1.0.
Set the maximum number of physical volumes
that the volume group is allowed to contain.
The default value for max_pv is The maximum
number of physical volumes can be a value in
the range 1 to 255.
Sets the number of megabytes in each physical extent, where
pe_size is expressed in units of megabytes
(MB) in the range 1 to 256. pe_size must be
equal to a power of 2 (1, 2, 4, 8, etc.).
The default value for pe_size is (four
megabytes) for volume groups version 1.0.
For volume groups versions 2.0 and higher,
this is a required parameter. See lvm(7)
for more information on extent sizes on vol‐
ume groups versions 2.0 and higher.
Set the allocation permission for adding physical extents
on the physical volumes specified by the
pv_path parameter. extensibility can have
one of the following values:
Allow allocation of additional physical
extents on the physical volume.
This is the default.
Prohibit allocation of additional physical
extents on the physical volume.
Logical volumes residing on the phys‐
ical volume can still be accessed
after the volume group has been acti‐
vated by the command.
Only applicable to volume groups versions 2.0 and 2.1.
Sets the maximum size of the volume group.
The maximum size is the total size of all
physical extents in the volume group. The
unit for is specified as a suffix. The rec‐
ognized values for the suffix are
(megabytes), (gigabytes), (terabytes), and
(petabytes). If no suffix is supplied, then
(megabytes) is assumed. A of 512 terabytes
would be specified as 512t. Only whole num‐
bers are accepted. The maximum supported
vg_size is 2p.
If the product of the physical extent size
and the total number of physical extents for
the physical volumes specified on the com‐
mand line is greater than the value speci‐
fied, then vg_size is upgraded to take
account of this size and an informational
message is issued.
Only applicable to volume groups versions 2.0 and higher.
Either or must be supplied. This option
will display the maximum VG size based on
the given physical extent size option) or
minimum physical extent size based on the
max VG size option). The output will be in
where x and y are determined by or See the
section in lvm(7) for more information.
Alternate Links (PVLinks)
In this release of HP-UX, LVM continues to support Alternate Links to a
device to allow continued access to the device, if the primary link
fails. This multiple link or multipath solution increases data avail‐
ability, but does not allow the multiple paths to be used simultane‐
ously.
There is a new feature introduced in the Mass Storage Subsystem on this
version of HP-UX that also supports multiple paths to a device and
allows access to the multiple paths simultaneously. The Mass Storage
Subsystem will balance the I/O load across the valid paths. This new
multi-path behavior is enabled and disabled through the use of the
scsimgr command. See scsimgr(1M) for details.
It is no longer required or recommended to configure LVM with alternate
links. However, it is possible to maintain the traditional LVM behav‐
ior. To do so, both of the following criteria must be met:
· Only the legacy device special file naming convention is used
in the volume group configuration.
· The command is used to disable the Mass Storage Subsystem mul‐
tipath behavior.
EXTERNAL INFLUENCES
Environment Variables
determines the language in which messages are displayed.
If is not specified or is null, it defaults to "C" (see lang(5)).
If any internationalization variable contains an invalid setting, all
internationalization variables default to "C" (see environ(5)).
EXAMPLES
Create a volume group version 1.0 named containing two physical volumes
with extent size set to 2 MB, from scratch.
Initialize the disks using
Create a volume group version 1.0.
or
The vg_name directory and group file will be created automati‐
cally. Optionally, these files can be created before doing the
vgcreate, as follows:
The minor number for the group file should be unique among all
the volume groups on the system. It has the format 0xNN0000,
where NN runs from to
If the file is automatically created, any available minor number
may be assigned to the group file.
Create a volume group version 1.0 named that can contain a maxi‐
mum of three logical volumes, with extent size set to 8 MB:
Create a volume group version 1.0 named and a physical volume
group named with two physical volumes:
Using the feature to create a volume group version 1.0 named
with a physical volume that can be referenced by two different
paths. and refer to the same physical volume, accessed via dif‐
ferent controller hardware paths. In this example, becomes the
to the physical volume. becomes an to the physical volume.
Create a volume group version 2.0 named with 2 physical volumes, an
extent size of 256 megabytes and a maximum total size of 1 petabyte.
Initialize the disks using pvcreate
Create the volume group version 2.0.
The directory and file will be created automatically. Option‐
ally, these files can be created before doing the as follows:
Notice that the major number for a volume group version 2.0 or
higher is 128 while the major number for a volume group version
1.0 is 64. Also, the volume group number occupies the high
order 12 bits of the minor number rather than the high order 8
bits as in volume groups version 1.0.
Create a volume group version 2.0 of size comparable to a volume
group version 1.0 created with and on an already initialized
disk.
First calculate the appropriate vg_size parameter as follows:
(in megabytes) Now create the volume group version 2.0.
Display the minimum extent size required to create a 512 ter‐
abyte volume group version 2.0.
SEE ALSOgetconf(1), model(1), idisk(1M), lvmadm(1M), pvcreate(1M), scsimgr(1M),
vgchange(1M), vgdisplay(1M), vgextend(1M), vgreduce(1M), environ(5),
lang(5), intro(7), lvm(7).
vgcreate(1M)