]>
Commit | Line | Data |
---|---|---|
5951ef33 | 1 | .TH VGCREATE 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*- |
922ce479 AK |
2 | .SH NAME |
3 | vgcreate \- create a volume group | |
4 | .SH SYNOPSIS | |
5 | .B vgcreate | |
12da72ad AK |
6 | .RB [ \-\-addtag |
7 | .IR Tag ] | |
63bea03e AK |
8 | .RB [ \-\-alloc |
9 | .IR AllocationPolicy ] | |
922ce479 | 10 | .RB [ \-A | \-\-autobackup " {" y | n }] |
147b7d5e | 11 | .RB [ \-c | \-\-clustered " {" y | n }] |
922ce479 AK |
12 | .RB [ \-d | \-\-debug ] |
13 | .RB [ \-h | \-\-help ] | |
14 | .RB [ \-l | \-\-maxlogicalvolumes | |
15 | .IR MaxLogicalVolumes ] | |
5a52dca9 | 16 | .RB [ -M | \-\-metadatatype type] |
922ce479 AK |
17 | .RB [ -p | \-\-maxphysicalvolumes |
18 | .IR MaxPhysicalVolumes ] | |
9e111ef6 DW |
19 | .RB [ \-\-[vg]metadatacopies ] |
20 | .IR NumberOfCopies|unmanaged|all ] | |
922ce479 | 21 | .RB [ \-s | \-\-physicalextentsize |
c1060e13 | 22 | .IR PhysicalExtentSize [ \fBbBsSkKmMgGtTpPeE\fR ]] |
5a52dca9 | 23 | .RB [ \-t | \-\-test ] |
922ce479 AK |
24 | .RB [ \-v | \-\-verbose ] |
25 | .RB [ \-\-version ] | |
4424497f | 26 | [ \fIPHYSICAL DEVICE OPTIONS\fP ] |
2ce3412b DW |
27 | .I VolumeGroupName PhysicalDevicePath |
28 | .RI [ PhysicalDevicePath ...] | |
922ce479 AK |
29 | .SH DESCRIPTION |
30 | .B vgcreate | |
31 | creates a new volume group called | |
32 | .I VolumeGroupName | |
2ce3412b DW |
33 | using the block special device \fIPhysicalDevicePath\fP. |
34 | .sp | |
35 | If \fIPhysicalDevicePath\fP was not previously configured for LVM with | |
36 | \fBpvcreate (8)\fP, the device will be initialized with the same | |
37 | default values used with \fBpvcreate\fP. If non-default | |
c78b0274 | 38 | \fPpvcreate\fP values are desired, they may be given on the |
2ce3412b DW |
39 | commandline with the same options as \fPpvcreate\fP. See |
40 | \fBPHYSICAL DEVICE OPTIONS\fP for available options. Note | |
41 | that the restore-related options such as --restorefile, --uuid, | |
42 | and --physicalvolumesize are not available. If a restore operation | |
43 | is needed, use \fBpvcreate (8)\fP and \fBvgcfgrestore (8)\fP. | |
922ce479 AK |
44 | .SH OPTIONS |
45 | See \fBlvm\fP for common options. | |
46 | .TP | |
147b7d5e | 47 | .BR \-c ", " \-\-clustered " " { y | n } |
54396b89 AK |
48 | If clustered locking is enabled, this defaults to \fBy\fP indicating that |
49 | this Volume Group is shared with other nodes in the cluster. | |
50 | ||
51 | If the new Volume Group contains only local disks that are not visible | |
52 | on the other nodes, you must specify \fB\-\-clustered\ n\fP. | |
147b7d5e | 53 | If the cluster infrastructure is unavailable on a particular node at a |
54396b89 | 54 | particular time, you may still be able to use such Volume Groups. |
147b7d5e | 55 | .TP |
922ce479 | 56 | .BR \-l ", " \-\-maxlogicalvolumes " " \fIMaxLogicalVolumes\fR |
73a9487f AK |
57 | Sets the maximum number of logical volumes allowed in this |
58 | volume group. | |
59 | The setting can be changed with \fBvgchange\fP. | |
60 | For volume groups with metadata in lvm1 format, the limit | |
61 | and default value is 255. | |
62 | If the metadata uses lvm2 format, the default value is 0 | |
63 | which removes this restriction: there is then no limit. | |
922ce479 AK |
64 | .TP |
65 | .BR \-p ", " \-\-maxphysicalvolumes " " \fIMaxPhysicalVolumes\fR | |
73a9487f AK |
66 | Sets the maximum number of physical volumes that can belong |
67 | to this volume group. | |
68 | The setting can be changed with \fBvgchange\fP. | |
69 | For volume groups with metadata in lvm1 format, the limit | |
70 | and default value is 255. | |
9e111ef6 DW |
71 | If the metadata uses lvm2 format, the value 0 removes this restriction: |
72 | there is then no limit. If you have a large number of physical volumes in | |
73 | a volume group with metadata in lvm2 format, for tool performance reasons, | |
74 | you should consider some use of \fB--pvmetadatacopies 0\fP as described in | |
75 | \fBpvcreate(8)\fP, and/or use \fB--vgmetadatacopies\fP. | |
76 | .TP | |
77 | .BR \-\-vgmetadatacopies " " \fINumberOfCopies|unmanaged|all\fP | |
78 | Sets the desired number of metadata copies in the volume group. If set to | |
79 | a non-zero value, LVM will automatically manage the 'metadataignore' | |
1c0c6cc8 | 80 | flags on the physical volumes (see \fBpvcreate\fP or \fBpvchange\fP --metadataignore\fP) in order |
9e111ef6 DW |
81 | to achieve \fINumberOfCopies\fP copies of metadata. If set to \fIunmanaged\fP, |
82 | LVM will not automatically manage the 'metadataignore' flags. If set to | |
83 | \fIall\fP, LVM will first clear all of the 'metadataignore' flags on all | |
84 | metadata areas in the volume group, then set the value to \fIunmanaged\fP. | |
85 | The \fBvgmetadatacopies\fP option is useful for volume groups containing | |
86 | large numbers of physical volumes with metadata as it may be used to | |
87 | minimize metadata read and write overhead. | |
88 | The default value is \fIunmanaged\fP. | |
922ce479 | 89 | .TP |
c1060e13 | 90 | .BR \-s ", " \-\-physicalextentsize " " \fIPhysicalExtentSize\fR[\fBbBsSkKmMgGtTpPeE\fR] |
922ce479 AK |
91 | Sets the physical extent size on physical volumes of this volume group. |
92 | A size suffix (k for kilobytes up to t for terabytes) is optional, megabytes | |
76f97cd7 AK |
93 | is the default if no suffix is present. |
94 | The default is 4 MB and it must be at least 1 KB and a power of 2. | |
95 | ||
73a9487f AK |
96 | Once this value has been set, it is difficult to change it without recreating |
97 | the volume group which would involve backing up and restoring data on any | |
76f97cd7 AK |
98 | logical volumes. However, if no extents need moving for the new |
99 | value to apply, it can be altered using vgchange \-s. | |
100 | ||
101 | If the volume group metadata uses lvm1 format, extents can vary in size from | |
102 | 8KB to 16GB and there is a limit of 65534 extents in each logical volume. The | |
103 | default of 4 MB leads to a maximum logical volume size of around 256GB. | |
104 | ||
105 | If the volume group metadata uses lvm2 format those restrictions do not apply, | |
106 | but having a large number of extents will slow down the tools but have no | |
107 | impact on I/O performance to the logical volume. The smallest PE is 1KB. | |
108 | ||
73a9487f | 109 | The 2.4 kernel has a limitation of 2TB per block device. |
2ce3412b DW |
110 | .SH PHYSICAL DEVICE OPTIONS |
111 | The following options are available for initializing physical devices in the | |
112 | volume group. These options are further described in the pvcreate man page. | |
113 | .TP | |
114 | .BR \-f ", " \-\-force | |
115 | .TP | |
116 | .BR \-y ", " \-\-yes | |
117 | .TP | |
118 | .BR \-Z ", " \-\-zero " y|n" | |
119 | .TP | |
120 | .BR \-\-labelsector " sector" | |
121 | .TP | |
122 | .BR \-\-metadatasize " size" | |
123 | .TP | |
0ddb66ef | 124 | .BR \-\-pvmetadatacopies " copies" |
2ce3412b DW |
125 | .TP |
126 | .BR \-\-dataalignment " alignment" | |
127 | .TP | |
128 | .BR \-\-dataalignmentoffset " alignment_offset" | |
922ce479 AK |
129 | .SH EXAMPLES |
130 | To create a volume group named | |
131 | .B test_vg | |
132 | using physical volumes | |
c4c107f2 | 133 | .BR /dev/sdk1 ", and " /dev/sdl1 |
922ce479 AK |
134 | with default physical extent size of 4MB: |
135 | .nf | |
136 | ||
63bea03e | 137 | \ vgcreate test_vg /dev/sdk1 /dev/sdl1 |
922ce479 AK |
138 | |
139 | .fi | |
922ce479 AK |
140 | .SH SEE ALSO |
141 | .BR lvm (8), | |
142 | .BR pvdisplay (8), | |
143 | .BR pvcreate (8), | |
144 | .BR vgdisplay (8), | |
145 | .BR vgextend (8), | |
146 | .BR vgreduce (8), | |
147 | .BR lvcreate (8), | |
148 | .BR lvdisplay (8), | |
149 | .BR lvextend (8), | |
150 | .BR lvreduce (8) |