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. in‐
134 herit 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 de‐
174 notes 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 no‐
229 tification from udev. It will continue irrespective of any pos‐
230 sible udev processing in the background. Only use this if udev
231 is not running or has rules that ignore the devices LVM creates.
232
233 --poolmetadatasize [+]Size[m|UNIT]
234 Specifies the new size of the pool metadata LV. The plus prefix
235 + can be used, in which case the value is added to the current
236 size.
237
238 --profile String
239 An alias for --commandprofile or --metadataprofile, depending on
240 the command.
241
242 -q|--quiet ...
243 Suppress output and log messages. Overrides --debug and --ver‐
244 bose. Repeat once to also suppress any prompts with answer
245 'no'.
246
247 --reportformat basic|json
248 Overrides current output format for reports which is defined
249 globally by the report/output_format setting in lvm.conf. basic
250 is the original format with columns and rows. If there is more
251 than one report per command, each report is prefixed with the
252 report name for identification. json produces report output in
253 JSON format. See lvmreport(7) for more information.
254
255 -r|--resizefs
256 Resize underlying filesystem together with the LV using
257 fsadm(8).
258
259 -L|--size [+]Size[m|UNIT]
260 Specifies the new size of the LV. The --size and --extents op‐
261 tions are alternate methods of specifying size. The total num‐
262 ber of physical extents used will be greater when redundant data
263 is needed for RAID levels. When the plus + or minus - prefix is
264 used, the value is not an absolute size, but is relative and
265 added or subtracted from the current size.
266
267 -i|--stripes Number
268 Specifies the number of stripes in a striped LV. This is the
269 number of PVs (devices) that a striped LV is spread across. Data
270 that appears sequential in the LV is spread across multiple de‐
271 vices in units of the stripe size (see --stripesize). This does
272 not change existing allocated space, but only applies to space
273 being allocated by the command. When creating a RAID 4/5/6 LV,
274 this number does not include the extra devices that are required
275 for parity. The largest number depends on the RAID type (raid0:
276 64, raid10: 32, raid4/5: 63, raid6: 62), and when unspecified,
277 the default depends on the RAID type (raid0: 2, raid10: 2,
278 raid4/5: 3, raid6: 5.) To stripe a new raid LV across all PVs
279 by default, see lvm.conf allocation/raid_stripe_all_devices.
280
281 -I|--stripesize Size[k|UNIT]
282 The amount of data that is written to one device before moving
283 to the next in a striped LV.
284
285 -t|--test
286 Run in test mode. Commands will not update metadata. This is
287 implemented by disabling all metadata writing but nevertheless
288 returning success to the calling function. This may lead to un‐
289 usual error messages in multi-stage operations if a tool relies
290 on reading back metadata it believes has changed but hasn't.
291
292 --type linear|striped|snapshot|mir‐
293 ror|raid|thin|cache|vdo|thin-pool|cache-pool|vdo-pool
294 The LV type, also known as "segment type" or "segtype". See us‐
295 age descriptions for the specific ways to use these types. For
296 more information about redundancy and performance (raid<N>, mir‐
297 ror, striped, linear) see lvmraid(7). For thin provisioning
298 (thin, thin-pool) see lvmthin(7). For performance caching
299 (cache, cache-pool) see lvmcache(7). For copy-on-write snap‐
300 shots (snapshot) see usage definitions. For VDO (vdo) see
301 lvmvdo(7). Several commands omit an explicit type option be‐
302 cause the type is inferred from other options or shortcuts (e.g.
303 --stripes, --mirrors, --snapshot, --virtualsize, --thin,
304 --cache, --vdo). Use inferred types with care because it can
305 lead to unexpected results.
306
307 --usepolicies
308 Perform an operation according to the policy configured in
309 lvm.conf or a profile.
310
311 -v|--verbose ...
312 Set verbose level. Repeat from 1 to 4 times to increase the de‐
313 tail of messages sent to stdout and stderr.
314
315 --version
316 Display version information.
317
318 -y|--yes
319 Do not prompt for confirmation interactively but always assume
320 the answer yes. Use with extreme caution. (For automatic no,
321 see -qq.)
322
324 LV
325 Logical Volume name. See lvm(8) for valid names. An LV posi‐
326 tional arg generally includes the VG name and LV name, e.g.
327 VG/LV. LV followed by _<type> indicates that an LV of the given
328 type is required. (raid represents raid<N> type)
329
330 PV
331 Physical Volume name, a device path under /dev. For commands
332 managing physical extents, a PV positional arg generally accepts
333 a suffix indicating a range (or multiple ranges) of physical ex‐
334 tents (PEs). When the first PE is omitted, it defaults to the
335 start of the device, and when the last PE is omitted it defaults
336 to end. Start and end range (inclusive): PV[:PE-PE]... Start
337 and length range (counting from 0): PV[:PE+PE]...
338
339 String
340 See the option description for information about the string con‐
341 tent.
342
343 Size[UNIT]
344 Size is an input number that accepts an optional unit. Input
345 units are always treated as base two values, regardless of capi‐
346 talization, e.g. 'k' and 'K' both refer to 1024. The default
347 input unit is specified by letter, followed by |UNIT. UNIT rep‐
348 resents other possible input units: bBsSkKmMgGtTpPeE. b|B is
349 bytes, s|S is sectors of 512 bytes, k|K is KiB, m|M is MiB, g|G
350 is GiB, t|T is TiB, p|P is PiB, e|E is EiB. (This should not be
351 confused with the output control --units, where capital letters
352 mean multiple of 1000.)
353
355 See lvm(8) for information about environment variables used by lvm.
356 For example, LVM_VG_NAME can generally be substituted for a required VG
357 parameter.
358
360 Extend the size of an LV by 54MiB, using a specific PV.
361 lvextend -L +54 vg01/lvol10 /dev/sdk3
362
363 Extend the size of an LV by the amount of free space on PV /dev/sdk3.
364 This is equivalent to specifying "-l +100%PVS" on the command line.
365 lvextend vg01/lvol01 /dev/sdk3
366
367 Extend an LV by 16MiB using specific physical extents.
368 lvextend -L+16m vg01/lvol01 /dev/sda:8-9 /dev/sdb:8-9
369
371 lvm(8) lvm.conf(5) lvmconfig(8)
372
373 pvchange(8) pvck(8) pvcreate(8) pvdisplay(8) pvmove(8) pvremove(8)
374 pvresize(8) pvs(8) pvscan(8)
375
376 vgcfgbackup(8) vgcfgrestore(8) vgchange(8) vgck(8) vgcreate(8) vgcon‐
377 vert(8) vgdisplay(8) vgexport(8) vgextend(8) vgimport(8) vgimport‐
378 clone(8) vgmerge(8) vgmknodes(8) vgreduce(8) vgremove(8) vgrename(8)
379 vgs(8) vgscan(8) vgsplit(8)
380
381 lvcreate(8) lvchange(8) lvconvert(8) lvdisplay(8) lvextend(8) lvre‐
382 duce(8) lvremove(8) lvrename(8) lvresize(8) lvs(8) lvscan(8)
383
384 lvm-fullreport(8) lvm-lvpoll(8) lvm2-activation-generator(8) blkdeacti‐
385 vate(8) lvmdump(8)
386
387 dmeventd(8) lvmpolld(8) lvmlockd(8) lvmlockctl(8) cmirrord(8) lvmd‐
388 busd(8)
389
390 lvmsystemid(7) lvmreport(7) lvmraid(7) lvmthin(7) lvmcache(7)
391
392
393
394Red Hat, Inc. LVM TOOLS 2.03.11(2) (2021-01-08) LVEXTEND(8)