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