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