1LVEXTEND(8) System Manager's Manual LVEXTEND(8)
2
3
4
6 lvextend - Add space to a logical volume
7
9 lvextend option_args position_args
10 [ option_args ]
11 [ position_args ]
12
13 --alloc contiguous|cling|cling_by_tags|normal|anywhere|inherit
14 -A|--autobackup y|n
15 --commandprofile String
16 --config String
17 -d|--debug
18 --driverloaded y|n
19 -l|--extents [+]Number[PERCENT]
20 -f|--force
21 -h|--help
22 --lockopt String
23 --longhelp
24 -m|--mirrors Number
25 -n|--nofsck
26 --nolocking
27 --nosync
28 --noudevsync
29 --poolmetadatasize [+]Size[m|UNIT]
30 --profile String
31 -q|--quiet
32 --reportformat basic|json
33 -r|--resizefs
34 -L|--size [+]Size[m|UNIT]
35 -i|--stripes Number
36 -I|--stripesize Size[k|UNIT]
37 -t|--test
38 --type linear|striped|snapshot|mir‐
39 ror|raid|thin|cache|vdo|thin-pool|cache-pool|vdo-pool
40 --usepolicies
41 -v|--verbose
42 --version
43 -y|--yes
44
46 lvextend extends the size of an LV. This requires allocating logical
47 extents from the VG's free physical extents. If the extension adds a
48 new LV segment, the new segment will use the existing segment type of
49 the LV.
50
51 Extending a copy-on-write snapshot LV adds space for COW blocks.
52
53 Use lvconvert(8) to change the number of data images in a RAID or mir‐
54 rored LV.
55
56 In the usage section below, --size Size can be replaced with --extents
57 Number. See both descriptions the options section.
58
60 Extend an LV by a specified size.
61
62 lvextend -L|--size [+]Size[m|UNIT] LV
63 [ -l|--extents [+]Number[PERCENT] ]
64 [ -r|--resizefs ]
65 [ -i|--stripes Number ]
66 [ -I|--stripesize Size[k|UNIT] ]
67 [ --poolmetadatasize [+]Size[m|UNIT] ]
68 [ COMMON_OPTIONS ]
69 [ PV ... ]
70 -
71
72 Extend an LV by specified PV extents.
73
74 lvextend LV PV ...
75 [ -r|--resizefs ]
76 [ -i|--stripes Number ]
77 [ -I|--stripesize Size[k|UNIT] ]
78 [ COMMON_OPTIONS ]
79 -
80
81 Extend a pool metadata SubLV by a specified size.
82
83 lvextend --poolmetadatasize [+]Size[m|UNIT] LV_thinpool
84 [ -i|--stripes Number ]
85 [ -I|--stripesize Size[k|UNIT] ]
86 [ COMMON_OPTIONS ]
87 [ PV ... ]
88 -
89
90 Extend an LV according to a predefined policy.
91
92 lvextend --usepolicies LV_snapshot_thinpool
93 [ -r|--resizefs ]
94 [ COMMON_OPTIONS ]
95 [ PV ... ]
96 -
97
98 Common options for command:
99 [ -A|--autobackup y|n ]
100 [ -f|--force ]
101 [ -m|--mirrors Number ]
102 [ -n|--nofsck ]
103 [ --alloc contiguous|cling|cling_by_tags|normal|anywhere|inherit
104 ]
105 [ --nosync ]
106 [ --noudevsync ]
107 [ --reportformat basic|json ]
108 [ --type linear|striped|snapshot|mir‐
109 ror|raid|thin|cache|vdo|thin-pool|cache-pool|vdo-pool ]
110
111 Common options for lvm:
112 [ -d|--debug ]
113 [ -h|--help ]
114 [ -q|--quiet ]
115 [ -t|--test ]
116 [ -v|--verbose ]
117 [ -y|--yes ]
118 [ --commandprofile String ]
119 [ --config String ]
120 [ --driverloaded y|n ]
121 [ --lockopt String ]
122 [ --longhelp ]
123 [ --nolocking ]
124 [ --profile String ]
125 [ --version ]
126
128 --alloc contiguous|cling|cling_by_tags|normal|anywhere|inherit
129 Determines the allocation policy when a command needs to allo‐
130 cate Physical Extents (PEs) from the VG. Each VG and LV has an
131 allocation policy which can be changed with vgchange/lvchange,
132 or overriden on the command line. normal applies common sense
133 rules such as not placing parallel stripes on the same PV.
134 inherit applies the VG policy to an LV. contiguous requires new
135 PEs be placed adjacent to existing PEs. cling places new PEs on
136 the same PV as existing PEs in the same stripe of the LV. If
137 there are sufficient PEs for an allocation, but normal does not
138 use them, anywhere will use them even if it reduces performance,
139 e.g. by placing two stripes on the same PV. Optional positional
140 PV args on the command line can also be used to limit which PVs
141 the command will use for allocation. See lvm(8) for more infor‐
142 mation about allocation.
143
144 -A|--autobackup y|n
145 Specifies if metadata should be backed up automatically after a
146 change. Enabling this is strongly advised! See vgcfgbackup(8)
147 for more information.
148
149 --commandprofile String
150 The command profile to use for command configuration. See
151 lvm.conf(5) for more information about profiles.
152
153 --config String
154 Config settings for the command. These override lvm.conf set‐
155 tings. The String arg uses the same format as lvm.conf, or may
156 use section/field syntax. See lvm.conf(5) for more information
157 about config.
158
159 -d|--debug ...
160 Set debug level. Repeat from 1 to 6 times to increase the detail
161 of messages sent to the log file and/or syslog (if configured).
162
163 --driverloaded y|n
164 If set to no, the command will not attempt to use device-mapper.
165 For testing and debugging.
166
167 -l|--extents [+]Number[PERCENT]
168 Specifies the new size of the LV in logical extents. The --size
169 and --extents options are alternate methods of specifying size.
170 The total number of physical extents used will be greater when
171 redundant data is needed for RAID levels. An alternate syntax
172 allows the size to be determined indirectly as a percentage of
173 the size of a related VG, LV, or set of PVs. The suffix %VG
174 denotes the total size of the VG, the suffix %FREE the remaining
175 free space in the VG, and the suffix %PVS the free space in the
176 specified PVs. For a snapshot, the size can be expressed as a
177 percentage of the total size of the origin LV with the suffix
178 %ORIGIN (100%ORIGIN provides space for the whole origin). When
179 expressed as a percentage, the size defines an upper limit for
180 the number of logical extents in the new LV. The precise number
181 of logical extents in the new LV is not determined until the
182 command has completed. When the plus + or minus - prefix is
183 used, the value is not an absolute size, but is relative and
184 added or subtracted from the current size.
185
186 -f|--force ...
187 Override various checks, confirmations and protections. Use
188 with extreme caution.
189
190 -h|--help
191 Display help text.
192
193 --lockopt String
194 Used to pass options for special cases to lvmlockd. See lvm‐
195 lockd(8) for more information.
196
197 --longhelp
198 Display long help text.
199
200 -m|--mirrors Number
201 Not used.
202
203 -n|--nofsck
204 Do not perform fsck before resizing filesystem when filesystem
205 requires it. You may need to use --force to proceed with this
206 option.
207
208 --nolocking
209 Disable locking.
210
211 --nosync
212 Causes the creation of mirror, raid1, raid4, raid5 and raid10 to
213 skip the initial synchronization. In case of mirror, raid1 and
214 raid10, any data written afterwards will be mirrored, but the
215 original contents will not be copied. In case of raid4 and
216 raid5, no parity blocks will be written, though any data written
217 afterwards will cause parity blocks to be stored. This is use‐
218 ful for skipping a potentially long and resource intensive ini‐
219 tial sync of an empty mirror/raid1/raid4/raid5 and raid10 LV.
220 This option is not valid for raid6, because raid6 relies on
221 proper parity (P and Q Syndromes) being created during initial
222 synchronization in order to reconstruct proper user date in case
223 of device failures. raid0 and raid0_meta do not provide any
224 data copies or parity support and thus do not support initial
225 synchronization.
226
227 --noudevsync
228 Disables udev synchronisation. The process will not wait for
229 notification from udev. It will continue irrespective of any
230 possible udev processing in the background. Only use this if
231 udev is not running or has rules that ignore the devices LVM
232 creates.
233
234 --poolmetadatasize [+]Size[m|UNIT]
235 Specifies the new size of the pool metadata LV. The plus prefix
236 + can be used, in which case the value is added to the current
237 size.
238
239 --profile String
240 An alias for --commandprofile or --metadataprofile, depending on
241 the command.
242
243 -q|--quiet ...
244 Suppress output and log messages. Overrides --debug and --ver‐
245 bose. Repeat once to also suppress any prompts with answer
246 'no'.
247
248 --reportformat basic|json
249 Overrides current output format for reports which is defined
250 globally by the report/output_format setting in lvm.conf. basic
251 is the original format with columns and rows. If there is more
252 than one report per command, each report is prefixed with the
253 report name for identification. json produces report output in
254 JSON format. See lvmreport(7) for more information.
255
256 -r|--resizefs
257 Resize underlying filesystem together with the LV using
258 fsadm(8).
259
260 -L|--size [+]Size[m|UNIT]
261 Specifies the new size of the LV. The --size and --extents
262 options are alternate methods of specifying size. The total
263 number of physical extents used will be greater when redundant
264 data is needed for RAID levels. When the plus + or minus - pre‐
265 fix is used, the value is not an absolute size, but is relative
266 and added or subtracted from the current size.
267
268 -i|--stripes Number
269 Specifies the number of stripes in a striped LV. This is the
270 number of PVs (devices) that a striped LV is spread across. Data
271 that appears sequential in the LV is spread across multiple
272 devices in units of the stripe size (see --stripesize). This
273 does not change existing allocated space, but only applies to
274 space being allocated by the command. When creating a RAID
275 4/5/6 LV, this number does not include the extra devices that
276 are required for parity. The largest number depends on the RAID
277 type (raid0: 64, raid10: 32, raid4/5: 63, raid6: 62), and when
278 unspecified, the default depends on the RAID type (raid0: 2,
279 raid10: 2, raid4/5: 3, raid6: 5.) To stripe a new raid LV
280 across all PVs by default, see lvm.conf alloca‐
281 tion/raid_stripe_all_devices.
282
283 -I|--stripesize Size[k|UNIT]
284 The amount of data that is written to one device before moving
285 to the next in a striped LV.
286
287 -t|--test
288 Run in test mode. Commands will not update metadata. This is
289 implemented by disabling all metadata writing but nevertheless
290 returning success to the calling function. This may lead to
291 unusual error messages in multi-stage operations if a tool
292 relies on reading back metadata it believes has changed but
293 hasn't.
294
295 --type linear|striped|snapshot|mir‐
296 ror|raid|thin|cache|vdo|thin-pool|cache-pool|vdo-pool
297 The LV type, also known as "segment type" or "segtype". See
298 usage descriptions for the specific ways to use these types.
299 For more information about redundancy and performance (raid<N>,
300 mirror, striped, linear) see lvmraid(7). For thin provisioning
301 (thin, thin-pool) see lvmthin(7). For performance caching
302 (cache, cache-pool) see lvmcache(7). For copy-on-write snap‐
303 shots (snapshot) see usage definitions. For VDO (vdo) see
304 lvmvdo(7). Several commands omit an explicit type option
305 because the type is inferred from other options or shortcuts
306 (e.g. --stripes, --mirrors, --snapshot, --virtualsize, --thin,
307 --cache, --vdo). Use inferred types with care because it can
308 lead to unexpected results.
309
310 --usepolicies
311 Perform an operation according to the policy configured in
312 lvm.conf or a profile.
313
314 -v|--verbose ...
315 Set verbose level. Repeat from 1 to 4 times to increase the
316 detail of messages sent to stdout and stderr.
317
318 --version
319 Display version information.
320
321 -y|--yes
322 Do not prompt for confirmation interactively but always assume
323 the answer yes. Use with extreme caution. (For automatic no,
324 see -qq.)
325
327 LV
328 Logical Volume name. See lvm(8) for valid names. An LV posi‐
329 tional arg generally includes the VG name and LV name, e.g.
330 VG/LV. LV followed by _<type> indicates that an LV of the given
331 type is required. (raid represents raid<N> type)
332
333 PV
334 Physical Volume name, a device path under /dev. For commands
335 managing physical extents, a PV positional arg generally accepts
336 a suffix indicating a range (or multiple ranges) of physical
337 extents (PEs). When the first PE is omitted, it defaults to the
338 start of the device, and when the last PE is omitted it defaults
339 to end. Start and end range (inclusive): PV[:PE-PE]... Start
340 and length range (counting from 0): PV[:PE+PE]...
341
342 String
343 See the option description for information about the string con‐
344 tent.
345
346 Size[UNIT]
347 Size is an input number that accepts an optional unit. Input
348 units are always treated as base two values, regardless of capi‐
349 talization, e.g. 'k' and 'K' both refer to 1024. The default
350 input unit is specified by letter, followed by |UNIT. UNIT rep‐
351 resents other possible input units: bBsSkKmMgGtTpPeE. b|B is
352 bytes, s|S is sectors of 512 bytes, k|K is kilobytes, m|M is
353 megabytes, g|G is gigabytes, t|T is terabytes, p|P is petabytes,
354 e|E is exabytes. (This should not be confused with the output
355 control --units, where capital letters mean multiple of 1000.)
356
358 See lvm(8) for information about environment variables used by lvm.
359 For example, LVM_VG_NAME can generally be substituted for a required VG
360 parameter.
361
363 Extend the size of an LV by 54MiB, using a specific PV.
364 lvextend -L +54 vg01/lvol10 /dev/sdk3
365
366 Extend the size of an LV by the amount of free space on PV /dev/sdk3.
367 This is equivalent to specifying "-l +100%PVS" on the command line.
368 lvextend vg01/lvol01 /dev/sdk3
369
370 Extend an LV by 16MiB using specific physical extents.
371 lvextend -L+16m vg01/lvol01 /dev/sda:8-9 /dev/sdb:8-9
372
374 lvm(8) lvm.conf(5) lvmconfig(8)
375
376 pvchange(8) pvck(8) pvcreate(8) pvdisplay(8) pvmove(8) pvremove(8)
377 pvresize(8) pvs(8) pvscan(8)
378
379 vgcfgbackup(8) vgcfgrestore(8) vgchange(8) vgck(8) vgcreate(8) vgcon‐
380 vert(8) vgdisplay(8) vgexport(8) vgextend(8) vgimport(8) vgimport‐
381 clone(8) vgmerge(8) vgmknodes(8) vgreduce(8) vgremove(8) vgrename(8)
382 vgs(8) vgscan(8) vgsplit(8)
383
384 lvcreate(8) lvchange(8) lvconvert(8) lvdisplay(8) lvextend(8) lvre‐
385 duce(8) lvremove(8) lvrename(8) lvresize(8) lvs(8) lvscan(8)
386
387 lvm-fullreport(8) lvm-lvpoll(8) lvm2-activation-generator(8) blkdeacti‐
388 vate(8) lvmdump(8)
389
390 dmeventd(8) lvmpolld(8) lvmlockd(8) lvmlockctl(8) cmirrord(8) lvmd‐
391 busd(8)
392
393 lvmsystemid(7) lvmreport(7) lvmraid(7) lvmthin(7) lvmcache(7)
394
395
396
397Red Hat, Inc. LVM TOOLS 2.03.06(2) (2019-10-23) LVEXTEND(8)