VGCREATE(8)

NAME
vgcreate - create a volume group

SYNOPSIS
vgcreate [-A/--autobackup y/n] [-d/--debug] [-l/--maxlogicalvolumes MaxLogicalVolumes] [-p/--maxphysicalvolumes MaxPhysicalVolumes] [-h/-?/--help] [-s/--physicalextentsize PhysicalExtentSize[kKmMgGtT] [-v/--verbose] VolumeGroupName PhysicalVolumePath [PhysicalVolumePath...]

DESCRIPTION
vgcreate creates a new volume group with a least one physical volume in it.

  OPTIONS

-A, --autobackup y/n
    Controls automatic backup of VG metadata after the change ( see vgcfgbackup(8) ). Default is yes.

-d, --debug
    Enables additional debugging output (if compiled with DEBUG).

-l, --maxlogicalvolumes MaxLogicalVolumes
    Sets the maximum possible logical volume count. More logical volumes can't be created in this volume group. Absolute maximum is 256.

-p, --maxphysicalvolumes MaxPhysicalVolumes
    Sets the maximum possible physical volume count. More physical volumes can't be included in this volume group. Absolute maximum is 256.

-h, -?, --help
    Print a usage message on standard output and exit successfully.

-s, --physicalextentsize PhysicalExtentSize[kKmMgGtT]
    Sets the physical extent size in default unit megabyte on physical volumes of this volume group. A size suffix of k for kilobyte or m for megabyte is optional. Values can be from 8KB to 512MB in powers of 2 and unit KB with default 4 MB.

-v, --verbose
    Display verbose runtime information about vgcreate's activities.

Examples
"vgcreate test_vg /dev/sd[k-m]1" creates a volume group named "test_vg" with three physical volumes with default physical extent size of 4MB. Due to limitations in the kernel, the physical extend size limits the maximum logical volume size.

DIAGNOSTICS
vgcreate returns an exit state of 0 for success and > 0 for error;
1  no volume group and physical volume names on command line
2  no physical volume names on command line
3  invalid volume group name
4  error checking existence of volume group
5  maximum number of volume groups exceeded
6  error reading physical volume(s)
7  invalid physical volume name
8  error getting physical volume size
9  no new physical volume
10 physical volumes occurs multiple times on command line
11 memory reallocation error
12 no valid physical volumes on command line
13 some invalid physical volumes on command line
14 physical volume is too small
15 error setting up VGDA
16 error writing VGDA to physical volumes
17 error creating VGDA in kernel
18 error inserting volume group into lvmtab
19 error doing backup of VGDA
20 error writing VGDA to lvmtab
21 volume group directory already exists in /dev
95 driver/module not in kernel
96 invalid i/o protocol version
97 error locking logical volume manager
98 invalid lvmtab (run vgscan(8))
99 invalid command line

ENVIRONMENT VARIABLES

LVM_AUTOBACKUP
    If this variable is set to "no" then the automatic backup of VG metadata is turned off.

See also
lvm(8), pvdisplay(8), pvcreate(8), vgdisplay(8), vgextend(8), vgreduce(8), lvcreate(8), lvdisplay(8), lvextend(8), lvreduce(8)

AUTHOR
Heinz Mauelshagen <linux-lvm@ez-darmstadt.telekom.de>