1LVEXTEND(8)                 System Manager's Manual                LVEXTEND(8)
2
3
4

NAME

6       lvextend — Add space to a logical volume
7

SYNOPSIS

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           --devices PV
19           --devicesfile String
20           --driverloaded y|n
21        -l|--extents [+]Number[PERCENT]
22        -f|--force
23           --fs String
24           --fsmode String
25        -h|--help
26           --journal String
27           --lockopt String
28           --longhelp
29        -m|--mirrors Number
30        -n|--nofsck
31           --nohints
32           --nolocking
33           --nosync
34           --noudevsync
35           --poolmetadatasize [+]Size[m|UNIT]
36           --profile String
37        -q|--quiet
38           --reportformat basic|json|json_std
39        -r|--resizefs
40        -L|--size [+]Size[m|UNIT]
41        -i|--stripes Number
42        -I|--stripesize Size[k|UNIT]
43        -t|--test
44           --type linear|striped|snapshot|raid|mirror|thin|thin-pool|vdo|
45       vdo-pool|cache|cache-pool|writecache
46           --usepolicies
47        -v|--verbose
48           --version
49        -y|--yes
50

DESCRIPTION

52       lvextend extends the size of an LV. This  requires  allocating  logical
53       extents  from  the  VG's free physical extents. If the extension adds a
54       new LV segment, the new segment will use the existing segment  type  of
55       the LV.
56
57       Extending a copy-on-write snapshot LV adds space for COW blocks.
58
59       Use  lvconvert(8) to change the number of data images in a RAID or mir‐
60       rored LV.
61
62       In the usage section below, --size Size can be replaced with  --extents
63       Number.  See both descriptions the options section.
64

USAGE

66       Extend an LV by a specified size.
67
68       lvextend -L|--size [+]Size[m|UNIT] LV
69           [ -l|--extents [+]Number[PERCENT] ]
70           [ -r|--resizefs ]
71           [ -i|--stripes Number ]
72           [ -I|--stripesize Size[k|UNIT] ]
73           [    --poolmetadatasize [+]Size[m|UNIT] ]
74           [    --fs String ]
75           [    --fsmode String ]
76           [ COMMON_OPTIONS ]
77           [ PV ... ]
78
79
80
81       Extend an LV by specified PV extents.
82
83       lvextend LV PV ...
84           [ -r|--resizefs ]
85           [ -i|--stripes Number ]
86           [ -I|--stripesize Size[k|UNIT] ]
87           [    --fs String ]
88           [    --fsmode String ]
89           [ COMMON_OPTIONS ]
90
91
92
93       Extend a pool metadata SubLV by a specified size.
94
95       lvextend --poolmetadatasize [+]Size[m|UNIT] LV1
96           [ -i|--stripes Number ]
97           [ -I|--stripesize Size[k|UNIT] ]
98           [ COMMON_OPTIONS ]
99           [ PV ... ]
100
101           LV1 types: linear thinpool
102
103
104
105       Extend an LV according to a predefined policy.
106
107       lvextend --usepolicies LV1
108           [ -r|--resizefs ]
109           [    --fs String ]
110           [    --fsmode String ]
111           [ COMMON_OPTIONS ]
112           [ PV ... ]
113
114           LV1 types: snapshot thinpool vdopool
115
116
117
118       Common options for command:
119           [ -A|--autobackup y|n ]
120           [ -f|--force ]
121           [ -m|--mirrors Number ]
122           [ -n|--nofsck ]
123           [    --alloc contiguous|cling|cling_by_tags|normal|anywhere|inherit
124           ]
125           [    --nosync ]
126           [    --noudevsync ]
127           [    --reportformat basic|json|json_std ]
128           [    --type linear|striped|snapshot|raid|mirror|thin|thin-pool|vdo|
129           vdo-pool|cache|cache-pool|writecache ]
130
131       Common options for lvm:
132           [ -d|--debug ]
133           [ -h|--help ]
134           [ -q|--quiet ]
135           [ -t|--test ]
136           [ -v|--verbose ]
137           [ -y|--yes ]
138           [    --commandprofile String ]
139           [    --config String ]
140           [    --devices PV ]
141           [    --devicesfile String ]
142           [    --driverloaded y|n ]
143           [    --journal String ]
144           [    --lockopt String ]
145           [    --longhelp ]
146           [    --nohints ]
147           [    --nolocking ]
148           [    --profile String ]
149           [    --version ]
150

OPTIONS

152       --alloc contiguous|cling|cling_by_tags|normal|anywhere|inherit
153              Determines  the  allocation policy when a command needs to allo‐
154              cate Physical Extents (PEs) from the VG. Each VG and LV  has  an
155              allocation  policy  which can be changed with vgchange/lvchange,
156              or overridden on the command line.  normal applies common  sense
157              rules  such as not placing parallel stripes on the same PV.  in‐
158              herit applies the VG policy to an LV.  contiguous  requires  new
159              PEs be placed adjacent to existing PEs.  cling places new PEs on
160              the same PV as existing PEs in the same stripe of  the  LV.   If
161              there  are sufficient PEs for an allocation, but normal does not
162              use them, anywhere will use them even if it reduces performance,
163              e.g. by placing two stripes on the same PV.  Optional positional
164              PV args on the command line can also be used to limit which  PVs
165              the command will use for allocation.  See lvm(8) for more infor‐
166              mation about allocation.
167
168       -A|--autobackup y|n
169              Specifies if metadata should be backed up automatically after  a
170              change.   Enabling  this is strongly advised! See vgcfgbackup(8)
171              for more information.
172
173       --commandprofile String
174              The command profile  to  use  for  command  configuration.   See
175              lvm.conf(5) for more information about profiles.
176
177       --config String
178              Config settings for the command. These override lvm.conf(5) set‐
179              tings.  The String arg uses the same format as  lvm.conf(5),  or
180              may use section/field syntax.  See lvm.conf(5) for more informa‐
181              tion about config.
182
183       -d|--debug ...
184              Set debug level. Repeat from 1 to 6 times to increase the detail
185              of messages sent to the log file and/or syslog (if configured).
186
187       --devices PV
188              Restricts  the  devices  that  are visible and accessible to the
189              command.  Devices not listed will appear to be missing. This op‐
190              tion  can  be repeated, or accepts a comma separated list of de‐
191              vices. This overrides the devices file.
192
193       --devicesfile String
194              A file listing devices that LVM should use.  The file must exist
195              in  /etc/lvm/devices/ and is managed with the lvmdevices(8) com‐
196              mand.  This overrides the  lvm.conf(5)  devices/devicesfile  and
197              devices/use_devicesfile settings.
198
199       --driverloaded y|n
200              If set to no, the command will not attempt to use device-mapper.
201              For testing and debugging.
202
203       -l|--extents [+]Number[PERCENT]
204              Specifies the new size of the LV in logical extents.  The --size
205              and  --extents options are alternate methods of specifying size.
206              The total number of physical extents used will be  greater  when
207              redundant  data  is needed for RAID levels.  An alternate syntax
208              allows the size to be determined indirectly as a  percentage  of
209              the  size of a related VG, LV, or set of PVs. The suffix %VG de‐
210              notes the total size of the VG, the suffix %FREE  the  remaining
211              free  space in the VG, and the suffix %PVS the free space in the
212              specified PVs.  For a snapshot, the size can be expressed  as  a
213              percentage  of  the  total size of the origin LV with the suffix
214              %ORIGIN (100%ORIGIN provides space for the whole origin).   When
215              expressed  as  a percentage, the size defines an upper limit for
216              the number of logical extents in the new LV. The precise  number
217              of  logical  extents  in  the new LV is not determined until the
218              command has completed.  When the plus + or  minus  -  prefix  is
219              used,  the  value  is  not an absolute size, but is relative and
220              added or subtracted from the current size.
221
222       -f|--force ...
223              Override various checks,  confirmations  and  protections.   Use
224              with extreme caution.
225
226       --fs String
227              Control  file  system  resizing when resizing an LV.  checksize:
228              Check the fs size and reduce the LV if the fs is not  using  the
229              reduced space (fs reduce is not needed.) If the reduced space is
230              used by the fs, then do not resize the fs or LV, and  return  an
231              error.   (checksize only applies when reducing, and does nothing
232              for extend.)  resize: Resize the fs by calling  the  fs-specific
233              resize  command.  This may also include mounting, unmounting, or
234              running fsck. See --fsmode to  control  mounting  behavior,  and
235              --nofsck  to  disable fsck.  resize_fsadm: Use the old method of
236              calling fsadm to handle the fs (deprecated.) Warning:  this  op‐
237              tion does not prevent lvreduce from destroying file systems that
238              are unmounted (or mounted if prompts are skipped.)  ignore:  Re‐
239              size  the  LV  without  checking  for or handling a file system.
240              Warning: using ignore when reducing the LV size may destroy  the
241              file system.
242
243       --fsmode String
244              Control  file  system  mounting behavior for fs resize.  manage:
245              Mount or unmount the fs as needed to resize the fs, and  attempt
246              to  restore  the  original mount state at the end.  nochange: Do
247              not mount or unmount the fs. If mounting or  unmounting  is  re‐
248              quired to resize the fs, then do not resize the fs or the LV and
249              fail the command.  offline: Unmount the fs if it is mounted, and
250              resize  the fs while it is unmounted. If mounting is required to
251              resize the fs, then do not resize the fs or the LV and fail  the
252              command.
253
254       -h|--help
255              Display help text.
256
257       --journal String
258              Record  information in the systemd journal.  This information is
259              in addition to information enabled by the  lvm.conf  log/journal
260              setting.   command:  record information about the command.  out‐
261              put: record the default command output.  debug: record full com‐
262              mand debugging.
263
264       --lockopt String
265              Used  to  pass  options for special cases to lvmlockd.  See lvm‐
266              lockd(8) for more information.
267
268       --longhelp
269              Display long help text.
270
271       -m|--mirrors Number
272              Not used.
273
274       -n|--nofsck
275              Do not perform fsck when resizing the  file  system  with  --re‐
276              sizefs.
277
278       --nohints
279              Do  not  use the hints file to locate devices for PVs. A command
280              may read more devices to find PVs when hints are not  used.  The
281              command will still perform standard hint file invalidation where
282              appropriate.
283
284       --nolocking
285              Disable locking. Use with caution, concurrent commands may  pro‐
286              duce incorrect results.
287
288       --nosync
289              Causes the creation of mirror, raid1, raid4, raid5 and raid10 to
290              skip the initial synchronization. In case of mirror,  raid1  and
291              raid10,  any  data  written afterwards will be mirrored, but the
292              original contents will not be  copied.  In  case  of  raid4  and
293              raid5, no parity blocks will be written, though any data written
294              afterwards will cause parity blocks to be stored.  This is  use‐
295              ful  for skipping a potentially long and resource intensive ini‐
296              tial sync of an empty mirror/raid1/raid4/raid5  and  raid10  LV.
297              This  option  is  not  valid  for raid6, because raid6 relies on
298              proper parity (P and Q Syndromes) being created  during  initial
299              synchronization in order to reconstruct proper user date in case
300              of device failures.  raid0 and raid0_meta do not provide any da‐
301              ta copies or parity support and thus do not support initial syn‐
302              chronization.
303
304       --noudevsync
305              Disables udev synchronization. The process will not wait for no‐
306              tification  from udev. It will continue irrespective of any pos‐
307              sible udev processing in the background. Only use this  if  udev
308              is not running or has rules that ignore the devices LVM creates.
309
310       --poolmetadatasize [+]Size[m|UNIT]
311              Specifies the new size of the pool metadata LV.  The plus prefix
312              + can be used, in which case the value is added to  the  current
313              size.
314
315       --profile String
316              An alias for --commandprofile or --metadataprofile, depending on
317              the command.
318
319       -q|--quiet ...
320              Suppress output and log messages. Overrides --debug  and  --ver‐
321              bose.   Repeat  once  to  also  suppress any prompts with answer
322              'no'.
323
324       --reportformat basic|json|json_std
325              Overrides current output format for  reports  which  is  defined
326              globally  by  the  report/output_format  setting in lvm.conf(5).
327              basic is the original format with columns and rows.  If there is
328              more  than  one report per command, each report is prefixed with
329              the report name for identification. json produces report  output
330              in  JSON  format. json_std produces report output in JSON format
331              which is more compliant with JSON  standard.   See  lvmreport(7)
332              for more information.
333
334       -r|--resizefs
335              Resize the fs using the fs-specific resize command.  May include
336              mounting, unmounting, or running fsck. See --fsmode  to  control
337              mounting  behavior,  and  --nofsck to disable fsck. See --fs for
338              more options (--resizefs is equivalent to --fs resize.)
339
340       -L|--size [+]Size[m|UNIT]
341              Specifies the new size of the LV.  The --size and --extents  op‐
342              tions  are alternate methods of specifying size.  The total num‐
343              ber of physical extents used will be greater when redundant data
344              is needed for RAID levels.  When the plus + or minus - prefix is
345              used, the value is not an absolute size,  but  is  relative  and
346              added or subtracted from the current size.
347
348       -i|--stripes Number
349              Specifies  the  number  of  stripes in a striped LV. This is the
350              number of PVs (devices) that a striped LV is spread across. Data
351              that  appears sequential in the LV is spread across multiple de‐
352              vices in units of the stripe size (see --stripesize). This  does
353              not  change  existing allocated space, but only applies to space
354              being allocated by the command.  When creating a RAID 4/5/6  LV,
355              this number does not include the extra devices that are required
356              for parity. The largest number depends on the RAID type  (raid0:
357              64,  raid10:  32, raid4/5: 63, raid6: 62), and when unspecified,
358              the default depends on the  RAID  type  (raid0:  2,  raid10:  2,
359              raid4/5:  3,  raid6: 5.)  To stripe a new raid LV across all PVs
360              by default, see lvm.conf(5) allocation/raid_stripe_all_devices.
361
362       -I|--stripesize Size[k|UNIT]
363              The amount of data that is written to one device  before  moving
364              to the next in a striped LV.
365
366       -t|--test
367              Run  in  test  mode. Commands will not update metadata.  This is
368              implemented by disabling all metadata writing  but  nevertheless
369              returning  success to the calling function. This may lead to un‐
370              usual error messages in multi-stage operations if a tool  relies
371              on reading back metadata it believes has changed but hasn't.
372
373       --type linear|striped|snapshot|raid|mirror|thin|thin-pool|vdo|vdo-pool|
374              cache|cache-pool|writecache
375              The LV type, also known as "segment type" or "segtype".  See us‐
376              age  descriptions for the specific ways to use these types.  For
377              more information about redundancy and performance (raid<N>, mir‐
378              ror,  striped,  linear)  see  lvmraid(7).  For thin provisioning
379              (thin,  thin-pool)  see  lvmthin(7).   For  performance  caching
380              (cache,  cache-pool)  see  lvmcache(7).  For copy-on-write snap‐
381              shots (snapshot) see usage definitions.  For VDO (vdo) see lvmv‐
382              do(7).   Several  commands  omit an explicit type option because
383              the type is inferred  from  other  options  or  shortcuts  (e.g.
384              --stripes,   --mirrors,   --snapshot,   --virtualsize,   --thin,
385              --cache, --vdo).  Use inferred types with care  because  it  can
386              lead to unexpected results.
387
388       --usepolicies
389              Perform  an  operation  according  to  the  policy configured in
390              lvm.conf(5) or a profile.
391
392       -v|--verbose ...
393              Set verbose level. Repeat from 1 to 4 times to increase the  de‐
394              tail of messages sent to stdout and stderr.
395
396       --version
397              Display version information.
398
399       -y|--yes
400              Do  not  prompt for confirmation interactively but always assume
401              the answer yes. Use with extreme caution.   (For  automatic  no,
402              see -qq.)
403

VARIABLES

405       LV     Logical  Volume  name.  See lvm(8) for valid names.  An LV posi‐
406              tional arg generally includes the VG  name  and  LV  name,  e.g.
407              VG/LV.   LV1  indicates  the LV must have a specific type, where
408              the accepted LV  types  are  listed.  (raid  represents  raid<N>
409              type).
410
411       PV     Physical  Volume  name,  a device path under /dev.  For commands
412              managing physical extents, a PV positional arg generally accepts
413              a suffix indicating a range (or multiple ranges) of physical ex‐
414              tents (PEs). When the first PE is omitted, it  defaults  to  the
415              start of the device, and when the last PE is omitted it defaults
416              to end.  Start and end range (inclusive):  PV[:PE-PE]...   Start
417              and length range (counting from 0): PV[:PE+PE]...
418
419       String See the option description for information about the string con‐
420              tent.
421
422       Size[UNIT]
423              Size is an input number that accepts an  optional  unit.   Input
424              units are always treated as base two values, regardless of capi‐
425              talization, e.g. 'k' and 'K' both refer to  1024.   The  default
426              input unit is specified by letter, followed by |UNIT.  UNIT rep‐
427              resents other possible input units: b|B is bytes, s|S is sectors
428              of  512  bytes,  k|K is KiB, m|M is MiB, g|G is GiB, t|T is TiB,
429              p|P is PiB, e|E is EiB.  (This should not be confused  with  the
430              output  control  --units, where capital letters mean multiple of
431              1000.)
432

ENVIRONMENT VARIABLES

434       See lvm(8) for information about environment  variables  used  by  lvm.
435       For example, LVM_VG_NAME can generally be substituted for a required VG
436       parameter.
437

EXAMPLES

439       Extend the size of an LV by 54MiB, using a specific PV.
440       lvextend -L +54 vg01/lvol10 /dev/sdk3
441
442       Extend the size of an LV by the amount of free space on  PV  /dev/sdk3.
443       This is equivalent to specifying "-l +100%PVS" on the command line.
444       lvextend vg01/lvol01 /dev/sdk3
445
446       Extend an LV by 16MiB using specific physical extents.
447       lvextend -L+16m vg01/lvol01 /dev/sda:8-9 /dev/sdb:8-9
448
449       Extend  an  LV  to use all remaining free space in volume group and all
450       resize its filesystem with fsadm(8).
451       lvextend -l+100%FREE -r vg01/lvol01
452

SEE ALSO

454       lvm(8), lvm.conf(5), lvmconfig(8), lvmdevices(8),
455
456       pvchange(8), pvck(8), pvcreate(8), pvdisplay(8), pvmove(8),
457       pvremove(8), pvresize(8), pvs(8), pvscan(8),
458
459       vgcfgbackup(8), vgcfgrestore(8), vgchange(8), vgck(8), vgcreate(8),
460       vgconvert(8), vgdisplay(8), vgexport(8), vgextend(8), vgimport(8),
461       vgimportclone(8), vgimportdevices(8), vgmerge(8), vgmknodes(8),
462       vgreduce(8), vgremove(8), vgrename(8), vgs(8), vgscan(8), vgsplit(8),
463
464       lvcreate(8), lvchange(8), lvconvert(8), lvdisplay(8), lvextend(8),
465       lvreduce(8), lvremove(8), lvrename(8), lvresize(8), lvs(8), lvscan(8),
466
467       lvm-fullreport(8), lvm-lvpoll(8), blkdeactivate(8), lvmdump(8),
468
469       dmeventd(8), lvmpolld(8), lvmlockd(8), lvmlockctl(8), cmirrord(8),
470       lvmdbusd(8), fsadm(8),
471
472       lvmsystemid(7), lvmreport(7), lvmcache(7), lvmraid(7), lvmthin(7),
473       lvmvdo(7), lvmautoactivation(7)
474
475
476
477
478Red Hat, Inc.          LVM TOOLS 2.03.22(2) (2023-08-02)           LVEXTEND(8)
Impressum