3 .TH VGCREATE 8 "LVM TOOLS 2.02.44-cvs (02-17-09)" "Sistina Software UK" \" -*- nroff -*-
5 vgcreate \- create a volume group
11 .IR AllocationPolicy ]
12 .RB [ \-A | \-\-autobackup " {" y | n }]
13 .RB [ \-c | \-\-clustered " {" y | n }]
14 .RB [ \-d | \-\-debug ]
15 .RB [ \-h | \-\-help ]
16 .RB [ \-l | \-\-maxlogicalvolumes
17 .IR MaxLogicalVolumes ]
18 .RB [ -M | \-\-metadatatype type]
19 .RB [ -p | \-\-maxphysicalvolumes
20 .IR MaxPhysicalVolumes ]
21 .RB [ \-s | \-\-physicalextentsize
22 .IR PhysicalExtentSize [ \fBkKmMgGtT\fR ]]
23 .RB [ \-t | \-\-test ]
24 .RB [ \-v | \-\-verbose ]
26 .I VolumeGroupName PhysicalVolumePath
27 .RI [ PhysicalVolumePath ...]
30 creates a new volume group called
32 using the block special device
33 .IR PhysicalVolumePath
34 previously configured for LVM with
37 See \fBlvm\fP for common options.
39 .BR \-c ", " \-\-clustered " " { y | n }
40 If clustered locking is enabled, this defaults to \fBy\fP indicating that
41 this Volume Group is shared with other nodes in the cluster.
43 If the new Volume Group contains only local disks that are not visible
44 on the other nodes, you must specify \fB\-\-clustered\ n\fP.
45 If the cluster infrastructure is unavailable on a particular node at a
46 particular time, you may still be able to use such Volume Groups.
48 .BR \-l ", " \-\-maxlogicalvolumes " " \fIMaxLogicalVolumes\fR
49 Sets the maximum number of logical volumes allowed in this
51 The setting can be changed with \fBvgchange\fP.
52 For volume groups with metadata in lvm1 format, the limit
53 and default value is 255.
54 If the metadata uses lvm2 format, the default value is 0
55 which removes this restriction: there is then no limit.
57 .BR \-p ", " \-\-maxphysicalvolumes " " \fIMaxPhysicalVolumes\fR
58 Sets the maximum number of physical volumes that can belong
60 The setting can be changed with \fBvgchange\fP.
61 For volume groups with metadata in lvm1 format, the limit
62 and default value is 255.
63 If the metadata uses lvm2 format, the default value is 0
64 which removes this restriction: there is then no limit.
65 If you have a large number of physical volumes in
66 a volume group with metadata in lvm2 format,
67 for tool performance reasons, you should consider
68 some use of \fB--metadatacopies 0\fP
69 as described in \fBpvcreate(8)\fP.
71 .BR \-s ", " \-\-physicalextentsize " " \fIPhysicalExtentSize\fR[\fBkKmMgGtT\fR]
72 Sets the physical extent size on physical volumes of this volume group.
73 A size suffix (k for kilobytes up to t for terabytes) is optional, megabytes
74 is the default if no suffix is present.
75 The default is 4 MB and it must be at least 1 KB and a power of 2.
77 Once this value has been set, it is difficult to change it without recreating
78 the volume group which would involve backing up and restoring data on any
79 logical volumes. However, if no extents need moving for the new
80 value to apply, it can be altered using vgchange \-s.
82 If the volume group metadata uses lvm1 format, extents can vary in size from
83 8KB to 16GB and there is a limit of 65534 extents in each logical volume. The
84 default of 4 MB leads to a maximum logical volume size of around 256GB.
86 If the volume group metadata uses lvm2 format those restrictions do not apply,
87 but having a large number of extents will slow down the tools but have no
88 impact on I/O performance to the logical volume. The smallest PE is 1KB.
90 The 2.4 kernel has a limitation of 2TB per block device.
92 To create a volume group named
94 using physical volumes
95 .BR /dev/hdk1 ", and " /dev/hdl1
96 with default physical extent size of 4MB:
99 \ vgcreate test_vg /dev/sdk1 /dev/sdl1