]> sourceware.org Git - lvm2.git/blame - man/vgcreate.8.in
update reworded string
[lvm2.git] / man / vgcreate.8.in
CommitLineData
5951ef33 1.TH VGCREATE 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
922ce479
AK
2.SH NAME
3vgcreate \- 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
31creates a new volume group called
32.I VolumeGroupName
2ce3412b
DW
33using the block special device \fIPhysicalDevicePath\fP.
34.sp
35If \fIPhysicalDevicePath\fP was not previously configured for LVM with
36\fBpvcreate (8)\fP, the device will be initialized with the same
37default values used with \fBpvcreate\fP. If non-default
c78b0274 38\fPpvcreate\fP values are desired, they may be given on the
2ce3412b
DW
39commandline with the same options as \fPpvcreate\fP. See
40\fBPHYSICAL DEVICE OPTIONS\fP for available options. Note
41that the restore-related options such as --restorefile, --uuid,
42and --physicalvolumesize are not available. If a restore operation
43is needed, use \fBpvcreate (8)\fP and \fBvgcfgrestore (8)\fP.
922ce479
AK
44.SH OPTIONS
45See \fBlvm\fP for common options.
46.TP
147b7d5e 47.BR \-c ", " \-\-clustered " " { y | n }
54396b89
AK
48If clustered locking is enabled, this defaults to \fBy\fP indicating that
49this Volume Group is shared with other nodes in the cluster.
50
51If the new Volume Group contains only local disks that are not visible
52on the other nodes, you must specify \fB\-\-clustered\ n\fP.
147b7d5e 53If the cluster infrastructure is unavailable on a particular node at a
54396b89 54particular time, you may still be able to use such Volume Groups.
147b7d5e 55.TP
922ce479 56.BR \-l ", " \-\-maxlogicalvolumes " " \fIMaxLogicalVolumes\fR
73a9487f
AK
57Sets the maximum number of logical volumes allowed in this
58volume group.
59The setting can be changed with \fBvgchange\fP.
60For volume groups with metadata in lvm1 format, the limit
61and default value is 255.
62If the metadata uses lvm2 format, the default value is 0
63which removes this restriction: there is then no limit.
922ce479
AK
64.TP
65.BR \-p ", " \-\-maxphysicalvolumes " " \fIMaxPhysicalVolumes\fR
73a9487f
AK
66Sets the maximum number of physical volumes that can belong
67to this volume group.
68The setting can be changed with \fBvgchange\fP.
69For volume groups with metadata in lvm1 format, the limit
70and default value is 255.
9e111ef6
DW
71If the metadata uses lvm2 format, the value 0 removes this restriction:
72there is then no limit. If you have a large number of physical volumes in
73a volume group with metadata in lvm2 format, for tool performance reasons,
74you 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
78Sets the desired number of metadata copies in the volume group. If set to
79a non-zero value, LVM will automatically manage the 'metadataignore'
1c0c6cc8 80flags on the physical volumes (see \fBpvcreate\fP or \fBpvchange\fP --metadataignore\fP) in order
9e111ef6
DW
81to achieve \fINumberOfCopies\fP copies of metadata. If set to \fIunmanaged\fP,
82LVM will not automatically manage the 'metadataignore' flags. If set to
83\fIall\fP, LVM will first clear all of the 'metadataignore' flags on all
84metadata areas in the volume group, then set the value to \fIunmanaged\fP.
85The \fBvgmetadatacopies\fP option is useful for volume groups containing
86large numbers of physical volumes with metadata as it may be used to
87minimize metadata read and write overhead.
88The default value is \fIunmanaged\fP.
922ce479 89.TP
c1060e13 90.BR \-s ", " \-\-physicalextentsize " " \fIPhysicalExtentSize\fR[\fBbBsSkKmMgGtTpPeE\fR]
922ce479
AK
91Sets the physical extent size on physical volumes of this volume group.
92A size suffix (k for kilobytes up to t for terabytes) is optional, megabytes
76f97cd7
AK
93is the default if no suffix is present.
94The default is 4 MB and it must be at least 1 KB and a power of 2.
95
73a9487f
AK
96Once this value has been set, it is difficult to change it without recreating
97the volume group which would involve backing up and restoring data on any
76f97cd7
AK
98logical volumes. However, if no extents need moving for the new
99value to apply, it can be altered using vgchange \-s.
100
101If the volume group metadata uses lvm1 format, extents can vary in size from
1028KB to 16GB and there is a limit of 65534 extents in each logical volume. The
103default of 4 MB leads to a maximum logical volume size of around 256GB.
104
105If the volume group metadata uses lvm2 format those restrictions do not apply,
106but having a large number of extents will slow down the tools but have no
107impact on I/O performance to the logical volume. The smallest PE is 1KB.
108
73a9487f 109The 2.4 kernel has a limitation of 2TB per block device.
2ce3412b
DW
110.SH PHYSICAL DEVICE OPTIONS
111The following options are available for initializing physical devices in the
112volume 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
130To create a volume group named
131.B test_vg
132using physical volumes
c4c107f2 133.BR /dev/sdk1 ", and " /dev/sdl1
922ce479
AK
134with 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)
This page took 1.790354 seconds and 5 git commands to generate.