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