1VGCREATE(8)                 System Manager's Manual                VGCREATE(8)
2
3
4

NAME

6       vgcreate - create a volume group
7

SYNOPSIS

9       vgcreate  [--addtag  Tag]  [--alloc  AllocationPolicy] [-A|--autobackup
10       {y|n}] [-c|--clustered {y|n}] [-d|--debug]  [-h|--help]  [-l|--maxlogi‐
11       calvolumes  MaxLogicalVolumes]  [-M|--metadatatypetype] [-p|--maxphysi‐
12       calvolumes MaxPhysicalVolumes] [-s|--physicalextentsize PhysicalExtent‐
13       Size[kKmMgGtT]]  [-t|--test] [-v|--verbose] [--version] VolumeGroupName
14       PhysicalVolumePath [PhysicalVolumePath...]
15

DESCRIPTION

17       vgcreate creates a new volume group called  VolumeGroupName  using  the
18       block  special  device PhysicalVolumePath previously configured for LVM
19       with pvcreate(8).
20

OPTIONS

22       See lvm for common options.
23
24       -c, --clustered {y|n}
25              If clustered locking is enabled,  this  indicates  whether  this
26              Volume  Group  is  shared  with  other  nodes  in the cluster or
27              whether it contains only local disks that are not visible on the
28              other  nodes.  If the cluster infrastructure is unavailable on a
29              particular node at a particular time, you may still be  able  to
30              use Volume Groups that are not marked as clustered.
31
32       -l, --maxlogicalvolumes MaxLogicalVolumes
33              Sets  the maximum number of logical volumes allowed in this vol‐
34              ume group.  The setting can be changed with vgchange.  For  vol‐
35              ume  groups  with metadata in lvm1 format, the limit and default
36              value is 255.  If the metadata uses  lvm2  format,  the  default
37              value  is  0  which  removes  this restriction: there is then no
38              limit.
39
40       -p, --maxphysicalvolumes MaxPhysicalVolumes
41              Sets the maximum number of physical volumes that can  belong  to
42              this  volume  group.   The setting can be changed with vgchange.
43              For volume groups with metadata in lvm1 format,  the  limit  and
44              default  value  is  255.   If the metadata uses lvm2 format, the
45              default value is 0 which removes this restriction: there is then
46              no  limit.   If you have a large number of physical volumes in a
47              volume group with metadata in lvm2 format, for tool  performance
48              reasons,  you  should consider some use of --metadatacopies 0 as
49              described in pvcreate(8).
50
51       -s, --physicalextentsize PhysicalExtentSize[kKmMgGtT]
52              Sets the physical extent size on physical volumes of this volume
53              group.  A size suffix (k for kilobytes up to t for terabytes) is
54              optional, megabytes is the default if no suffix is present.  The
55              default is 4 MB and it must be at least 1 KB and a power of 2.
56
57              Once this value has been set, it is difficult to change it with‐
58              out recreating the volume group which would involve  backing  up
59              and  restoring  data  on  any  logical  volumes.  However, if no
60              extents need moving for the  new  value  to  apply,  it  can  be
61              altered using vgchange -s.
62
63              If  the volume group metadata uses lvm1 format, extents can vary
64              in size from 8KB to 16GB and there is a limit of  65534  extents
65              in  each logical volume.  The default of 4 MB leads to a maximum
66              logical volume size of around 256GB.
67
68              If the volume group metadata uses lvm2 format those restrictions
69              do  not  apply,  but  having a large number of extents will slow
70              down the tools but have no impact on I/O performance to the log‐
71              ical volume.  The smallest PE is 1KB.
72
73              The 2.4 kernel has a limitation of 2TB per block device.
74

EXAMPLES

76       To   create  a  volume  group  named  test_vg  using  physical  volumes
77       /dev/hdk1, and /dev/hdl1 with default physical extent size of 4MB:
78
79            vgcreate test_vg /dev/sdk1 /dev/sdl1
80
81

SEE ALSO

83       lvm(8), pvdisplay(8),  pvcreate(8),  vgdisplay(8),  vgextend(8),  vgre‐
84       duce(8), lvcreate(8), lvdisplay(8), lvextend(8), lvreduce(8)
85
86
87
88Sistina Software UK                LVM TOOLS                       VGCREATE(8)
Impressum