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 [ --nolocking ]
54 [ --profile String ]
55 [ --version ]
56
58 -A|--autobackup y|n
59 Specifies if metadata should be backed up automatically after a
60 change. Enabling this is strongly advised! See vgcfgbackup(8)
61 for more information.
62
63 --commandprofile String
64 The command profile to use for command configuration. See
65 lvm.conf(5) for more information about profiles.
66
67 --config String
68 Config settings for the command. These override lvm.conf set‐
69 tings. The String arg uses the same format as lvm.conf, or may
70 use section/field syntax. See lvm.conf(5) for more information
71 about config.
72
73 --dataalignment Size[k|UNIT]
74 Align the start of a PV data area with a multiple of this num‐
75 ber. To see the location of the first Physical Extent (PE) of
76 an existing PV, use pvs -o +pe_start. In addition, it may be
77 shifted by an alignment offset, see --dataalignmentoffset. Also
78 specify an appropriate PE size when creating a VG.
79
80 --dataalignmentoffset Size[k|UNIT]
81 Shift the start of the PV 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 --nolocking
127 Disable locking.
128
129 --profile String
130 An alias for --commandprofile or --metadataprofile, depending on
131 the command.
132
133 --pvmetadatacopies 0|1|2
134 The number of metadata areas to set aside on a PV for storing VG
135 metadata. When 2, one copy of the VG metadata is stored at the
136 front of the PV and a second copy is stored at the end. When 1,
137 one copy of the VG metadata is stored at the front of the PV.
138 When 0, no copies of the VG metadata are stored on the given PV.
139 This may be useful in VGs containing many PVs (this places limi‐
140 tations on the ability to use vgsplit later.)
141
142 -q|--quiet ...
143 Suppress output and log messages. Overrides --debug and --ver‐
144 bose. Repeat once to also suppress any prompts with answer
145 'no'.
146
147 --reportformat basic|json
148 Overrides current output format for reports which is defined
149 globally by the report/output_format setting in lvm.conf. basic
150 is the original format with columns and rows. If there is more
151 than one report per command, each report is prefixed with the
152 report name for identification. json produces report output in
153 JSON format. See lvmreport(7) for more information.
154
155 --restoremissing
156 Add a PV back into a VG after the PV was missing and then
157 returned, e.g. due to a transient failure. The PV is not reini‐
158 tialized.
159
160 -t|--test
161 Run in test mode. Commands will not update metadata. This is
162 implemented by disabling all metadata writing but nevertheless
163 returning success to the calling function. This may lead to
164 unusual error messages in multi-stage operations if a tool
165 relies on reading back metadata it believes has changed but
166 hasn't.
167
168 -v|--verbose ...
169 Set verbose level. Repeat from 1 to 4 times to increase the
170 detail of messages sent to stdout and stderr.
171
172 --version
173 Display version information.
174
175 -y|--yes
176 Do not prompt for confirmation interactively but always assume
177 the answer yes. Use with extreme caution. (For automatic no,
178 see -qq.)
179
180 -Z|--zero y|n
181 Controls if the first 4 sectors (2048 bytes) of the device are
182 wiped. The default is to wipe these sectors unless either or
183 both of --restorefile or --uuid are specified.
184
186 VG
187 Volume Group name. See lvm(8) for valid names.
188
189 PV
190 Physical Volume name, a device path under /dev. For commands
191 managing physical extents, a PV positional arg generally accepts
192 a suffix indicating a range (or multiple ranges) of physical
193 extents (PEs). When the first PE is omitted, it defaults to the
194 start of the device, and when the last PE is omitted it defaults
195 to end. Start and end range (inclusive): PV[:PE-PE]... Start
196 and length range (counting from 0): PV[:PE+PE]...
197
198 String
199 See the option description for information about the string con‐
200 tent.
201
202 Size[UNIT]
203 Size is an input number that accepts an optional unit. Input
204 units are always treated as base two values, regardless of capi‐
205 talization, e.g. 'k' and 'K' both refer to 1024. The default
206 input unit is specified by letter, followed by |UNIT. UNIT rep‐
207 resents other possible input units: bBsSkKmMgGtTpPeE. b|B is
208 bytes, s|S is sectors of 512 bytes, k|K is kilobytes, m|M is
209 megabytes, g|G is gigabytes, t|T is terabytes, p|P is petabytes,
210 e|E is exabytes. (This should not be confused with the output
211 control --units, where capital letters mean multiple of 1000.)
212
214 See lvm(8) for information about environment variables used by lvm.
215 For example, LVM_VG_NAME can generally be substituted for a required VG
216 parameter.
217
219 Add two PVs to a VG.
220 vgextend vg00 /dev/sda4 /dev/sdn1
221
223 lvm(8) lvm.conf(5) lvmconfig(8)
224
225 pvchange(8) pvck(8) pvcreate(8) pvdisplay(8) pvmove(8) pvremove(8)
226 pvresize(8) pvs(8) pvscan(8)
227
228 vgcfgbackup(8) vgcfgrestore(8) vgchange(8) vgck(8) vgcreate(8) vgcon‐
229 vert(8) vgdisplay(8) vgexport(8) vgextend(8) vgimport(8) vgimport‐
230 clone(8) vgmerge(8) vgmknodes(8) vgreduce(8) vgremove(8) vgrename(8)
231 vgs(8) vgscan(8) vgsplit(8)
232
233 lvcreate(8) lvchange(8) lvconvert(8) lvdisplay(8) lvextend(8) lvre‐
234 duce(8) lvremove(8) lvrename(8) lvresize(8) lvs(8) lvscan(8)
235
236 lvm-fullreport(8) lvm-lvpoll(8) lvm2-activation-generator(8) blkdeacti‐
237 vate(8) lvmdump(8)
238
239 dmeventd(8) lvmpolld(8) lvmlockd(8) lvmlockctl(8) cmirrord(8) lvmd‐
240 busd(8)
241
242 lvmsystemid(7) lvmreport(7) lvmraid(7) lvmthin(7) lvmcache(7)
243
244
245
246Red Hat, Inc. LVM TOOLS 2.03.09(2) (2020-03-26) VGEXTEND(8)