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