1VGEXTEND(8) System Manager's Manual VGEXTEND(8)
2
3
4
6 vgextend - Add physical volumes to a volume group
7
9 vgextend position_args
10 [ option_args ]
11
13 vgextend adds one or more PVs to a VG. This increases the space avail‐
14 able for LVs in the VG.
15
16 Also, PVs that have gone missing and then returned, e.g. due to a tran‐
17 sient device failure, can be added back to the VG without re-initializ‐
18 ing them (see --restoremissing).
19
20 If the specified PVs have not yet been initialized with pvcreate, vgex‐
21 tend will initialize them. In this case pvcreate options can be used,
22 e.g. --labelsector, --metadatasize, --metadataignore, --pvmetadata‐
23 copies, --dataalignment, --dataalignmentoffset.
24
26 vgextend VG PV ...
27 [ -A|--autobackup y|n ]
28 [ -f|--force ]
29 [ -Z|--zero y|n ]
30 [ -M|--metadatatype lvm2 ]
31 [ --labelsector Number ]
32 [ --metadatasize Size[m|UNIT] ]
33 [ --pvmetadatacopies 0|1|2 ]
34 [ --metadataignore y|n ]
35 [ --dataalignment Size[k|UNIT] ]
36 [ --dataalignmentoffset Size[k|UNIT] ]
37 [ --reportformat basic|json ]
38 [ --restoremissing ]
39 [ COMMON_OPTIONS ]
40
41 Common options for lvm:
42 [ -d|--debug ]
43 [ -h|--help ]
44 [ -q|--quiet ]
45 [ -t|--test ]
46 [ -v|--verbose ]
47 [ -y|--yes ]
48 [ --commandprofile String ]
49 [ --config String ]
50 [ --driverloaded y|n ]
51 [ --lockopt String ]
52 [ --longhelp ]
53 [ --profile String ]
54 [ --version ]
55
57 -A|--autobackup y|n
58 Specifies if metadata should be backed up automatically after a
59 change. Enabling this is strongly advised! See vgcfgbackup(8)
60 for more information.
61
62 --commandprofile String
63 The command profile to use for command configuration. See
64 lvm.conf(5) for more information about profiles.
65
66 --config String
67 Config settings for the command. These override lvm.conf set‐
68 tings. The String arg uses the same format as lvm.conf, or may
69 use section/field syntax. See lvm.conf(5) for more information
70 about config.
71
72 --dataalignment Size[k|UNIT]
73 Align the start of the data to a multiple of this number. Also
74 specify an appropriate Physical Extent size when creating a VG.
75 To see the location of the first Physical Extent of an existing
76 PV, use pvs -o +pe_start. In addition, it may be shifted by an
77 alignment offset. See lvm.conf/data_alignment_offset_detection
78 and --dataalignmentoffset.
79
80 --dataalignmentoffset Size[k|UNIT]
81 Shift the start of the data area by this additional offset.
82
83 -d|--debug ...
84 Set debug level. Repeat from 1 to 6 times to increase the detail
85 of messages sent to the log file and/or syslog (if configured).
86
87 --driverloaded y|n
88 If set to no, the command will not attempt to use device-mapper.
89 For testing and debugging.
90
91 -f|--force ...
92 Override various checks, confirmations and protections. Use
93 with extreme caution.
94
95 -h|--help
96 Display help text.
97
98 --labelsector Number
99 By default the PV is labelled with an LVM2 identifier in its
100 second sector (sector 1). This lets you use a different sector
101 near the start of the disk (between 0 and 3 inclusive - see
102 LABEL_SCAN_SECTORS in the source). Use with care.
103
104 --lockopt String
105 Used to pass options for special cases to lvmlockd. See lvm‐
106 lockd(8) for more information.
107
108 --longhelp
109 Display long help text.
110
111 --metadataignore y|n
112 Specifies the metadataignore property of a PV. If yes, metadata
113 areas on the PV are ignored, and lvm will not store metadata in
114 the metadata areas of the PV. If no, lvm will store metadata on
115 the PV.
116
117 --metadatasize Size[m|UNIT]
118 The approximate amount of space used for each VG metadata area.
119 The size may be rounded.
120
121 -M|--metadatatype lvm2
122 Specifies the type of on-disk metadata to use. lvm2 (or just 2)
123 is the current, standard format. lvm1 (or just 1) is no longer
124 used.
125
126 --profile String
127 An alias for --commandprofile or --metadataprofile, depending on
128 the command.
129
130 --pvmetadatacopies 0|1|2
131 The number of metadata areas to set aside on a PV for storing VG
132 metadata. When 2, one copy of the VG metadata is stored at the
133 front of the PV and a second copy is stored at the end. When 1,
134 one copy of the VG metadata is stored at the front of the PV
135 (starting in the 5th sector). When 0, no copies of the VG meta‐
136 data are stored on the given PV. This may be useful in VGs con‐
137 taining many PVs (this places limitations on the ability to use
138 vgsplit later.)
139
140 -q|--quiet ...
141 Suppress output and log messages. Overrides --debug and --ver‐
142 bose. Repeat once to also suppress any prompts with answer
143 'no'.
144
145 --reportformat basic|json
146 Overrides current output format for reports which is defined
147 globally by the report/output_format setting in lvm.conf. basic
148 is the original format with columns and rows. If there is more
149 than one report per command, each report is prefixed with the
150 report name for identification. json produces report output in
151 JSON format. See lvmreport(7) for more information.
152
153 --restoremissing
154 Add a PV back into a VG after the PV was missing and then
155 returned, e.g. due to a transient failure. The PV is not reini‐
156 tialized.
157
158 -t|--test
159 Run in test mode. Commands will not update metadata. This is
160 implemented by disabling all metadata writing but nevertheless
161 returning success to the calling function. This may lead to
162 unusual error messages in multi-stage operations if a tool
163 relies on reading back metadata it believes has changed but
164 hasn't.
165
166 -v|--verbose ...
167 Set verbose level. Repeat from 1 to 4 times to increase the
168 detail of messages sent to stdout and stderr.
169
170 --version
171 Display version information.
172
173 -y|--yes
174 Do not prompt for confirmation interactively but always assume
175 the answer yes. Use with extreme caution. (For automatic no,
176 see -qq.)
177
178 -Z|--zero y|n
179 Controls if the first 4 sectors (2048 bytes) of the device are
180 wiped. The default is to wipe these sectors unless either or
181 both of --restorefile or --uuid are specified.
182
184 VG
185 Volume Group name. See lvm(8) for valid names.
186
187 PV
188 Physical Volume name, a device path under /dev. For commands
189 managing physical extents, a PV positional arg generally accepts
190 a suffix indicating a range (or multiple ranges) of physical
191 extents (PEs). When the first PE is omitted, it defaults to the
192 start of the device, and when the last PE is omitted it defaults
193 to end. Start and end range (inclusive): PV[:PE-PE]... Start
194 and length range (counting from 0): PV[:PE+PE]...
195
196 String
197 See the option description for information about the string con‐
198 tent.
199
200 Size[UNIT]
201 Size is an input number that accepts an optional unit. Input
202 units are always treated as base two values, regardless of capi‐
203 talization, e.g. 'k' and 'K' both refer to 1024. The default
204 input unit is specified by letter, followed by |UNIT. UNIT rep‐
205 resents other possible input units: bBsSkKmMgGtTpPeE. b|B is
206 bytes, s|S is sectors of 512 bytes, k|K is kilobytes, m|M is
207 megabytes, g|G is gigabytes, t|T is terabytes, p|P is petabytes,
208 e|E is exabytes. (This should not be confused with the output
209 control --units, where capital letters mean multiple of 1000.)
210
212 See lvm(8) for information about environment variables used by lvm.
213 For example, LVM_VG_NAME can generally be substituted for a required VG
214 parameter.
215
217 Add two PVs to a VG.
218 vgextend vg00 /dev/sda4 /dev/sdn1
219
221 lvm(8) lvm.conf(5) lvmconfig(8)
222
223 pvchange(8) pvck(8) pvcreate(8) pvdisplay(8) pvmove(8) pvremove(8)
224 pvresize(8) pvs(8) pvscan(8)
225
226 vgcfgbackup(8) vgcfgrestore(8) vgchange(8) vgck(8) vgcreate(8) vgcon‐
227 vert(8) vgdisplay(8) vgexport(8) vgextend(8) vgimport(8) vgimport‐
228 clone(8) vgmerge(8) vgmknodes(8) vgreduce(8) vgremove(8) vgrename(8)
229 vgs(8) vgscan(8) vgsplit(8)
230
231 lvcreate(8) lvchange(8) lvconvert(8) lvdisplay(8) lvextend(8) lvre‐
232 duce(8) lvremove(8) lvrename(8) lvresize(8) lvs(8) lvscan(8)
233
234 lvm-fullreport(8) lvm-lvpoll(8) lvm2-activation-generator(8) blkdeacti‐
235 vate(8) lvmdump(8)
236
237 dmeventd(8) lvmetad(8) lvmpolld(8) lvmlockd(8) lvmlockctl(8) clvmd(8)
238 cmirrord(8) lvmdbusd(8)
239
240 lvmsystemid(7) lvmreport(7) lvmraid(7) lvmthin(7) lvmcache(7)
241
242
243
244Red Hat, Inc. LVM TOOLS 2.02.183(2) (2018-12-07) VGEXTEND(8)