vgcreate.1m (2010 09)

v
vgcreate(1M) vgcreate(1M)
Environment Variables
LANG determines the language in which messages are displayed.
If
LANG 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
/dev/vg03
containing two physical volumes with extent size
set to 2 MB, from scratch.
Initialize the disks using
pvcreate.
pvcreate /dev/rdsk/c1t0d0
pvcreate /dev/rdsk/c1t2d0
Create a volume group version 1.0.
vgcreate -s 2 /dev/vg03 /dev/dsk/c1t0d0 /dev/dsk/c1t2d0
or
vgcreate -V 1.0 -s 2 /dev/vg03 /dev/dsk/c1t0d0 /dev/dsk/c1t2d0
The vg_name directory and group file will be created automatically. Optionally, these files can be
created before doing the vgcreate, as follows:
mkdir /dev/vg03
mknod /dev/vg03/group c 64 0x030000
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 00 to ff.
If the
group file is automatically created, any available minor number may be assigned to the
group file.
Create a volume group version 1.0 named
/dev/vg01 that can contain a maximum of three logical
volumes, with extent size set to 8 MB:
vgcreate -V 1.0 -l 3 -s 8 /dev/vg01 /dev/dsk/c3t4d0
Create a volume group version 1.0 named /dev/vg00 and a physical volume group named PVG0
with two physical volumes:
vgcreate -V 1.0 -g PVG0 /dev/vg00 /dev/dsk/c1t0d0 /dev/dsk/c2t0d0
Using the PVLinks feature to create a volume group version 1.0 named /dev/vg00 with a physical
volume that can be referenced by two different paths. /dev/dsk/c3t0d0
and
/dev/dsk/c4t0d0 refer to the same physical volume, accessed via different controller hardware
paths. In this example,
/dev/dsk/c3t0d0
becomes the primary link to the physical volume.
/dev/dsk/c4t0d0 becomes an
alternate link to the physical volume.
vgcreate -V 1.0 /dev/vg00 /dev/dsk/c3t0d0 /dev/dsk/c4t0d0
Create a volume group version 2.0 named /dev/vg09 with 2 physical volumes, an extent size of 256
megabytes and a maximum total size of 1 petabyte.
Initialize the disks using pvcreate
pvcreate /dev/rdisk/disk20
pvcreate /dev/rdisk/disk21
Create the volume group version 2.0.
vgcreate -V 2.0 -s 256 -S 1p /dev/vg09 /dev/disk/disk20 /dev/disk/disk21
The vg_name directory and group file will be created automatically. Optionally, these files can be
created before doing the vgcreate, as follows:
mkdir /dev/vg09
mknod /dev/vg09/group c 128 0x009000
NOTE: 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 ver-
sion 1.0.
4 Hewlett-Packard Company 4 HP-UX 11i Version 3: September 2010