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

NAME

6       lvcreate — Create a logical volume
7

SYNOPSIS

9       lvcreate option_args position_args
10           [ option_args ]
11           [ position_args ]
12
13        -a|--activate y|n|ay
14           --addtag Tag
15           --alloc contiguous|cling|cling_by_tags|normal|anywhere|inherit
16        -A|--autobackup y|n
17        -H|--cache
18           --cachedevice PV
19           --cachemetadataformat auto|1|2
20           --cachemode writethrough|writeback|passthrough
21           --cachepolicy String
22           --cachepool LV
23           --cachesettings String
24           --cachesize Size[m|UNIT]
25           --cachevol LV
26        -c|--chunksize Size[k|UNIT]
27           --commandprofile String
28           --compression y|n
29           --config String
30        -C|--contiguous y|n
31        -d|--debug
32           --deduplication y|n
33           --devices PV
34           --devicesfile String
35           --discards passdown|nopassdown|ignore
36           --driverloaded y|n
37           --errorwhenfull y|n
38        -l|--extents Number[PERCENT]
39        -h|--help
40        -K|--ignoreactivationskip
41           --ignoremonitoring
42           --journal String
43           --lockopt String
44           --longhelp
45        -j|--major Number
46           --[raid]maxrecoveryrate Size[k|UNIT]
47           --metadataprofile String
48           --minor Number
49           --[raid]minrecoveryrate Size[k|UNIT]
50           --mirrorlog core|disk
51        -m|--mirrors Number
52           --monitor y|n
53        -n|--name String
54           --nohints
55           --nolocking
56           --nosync
57           --noudevsync
58        -p|--permission rw|r
59        -M|--persistent y|n
60           --poolmetadatasize Size[m|UNIT]
61           --poolmetadataspare y|n
62           --profile String
63        -q|--quiet
64           --raidintegrity y|n
65           --raidintegrityblocksize Number
66           --raidintegritymode String
67        -r|--readahead auto|none|Number
68        -R|--regionsize Size[m|UNIT]
69           --reportformat basic|json|json_std
70        -k|--setactivationskip y|n
71           --setautoactivation y|n
72        -L|--size Size[m|UNIT]
73        -s|--snapshot
74        -i|--stripes Number
75        -I|--stripesize Size[k|UNIT]
76        -t|--test
77        -T|--thin
78           --thinpool LV
79           --type linear|striped|snapshot|raid|mirror|thin|thin-pool|vdo|
80       vdo-pool|cache|cache-pool|writecache
81           --vdo
82           --vdopool LV
83           --vdosettings String
84        -v|--verbose
85           --version
86        -V|--virtualsize Size[m|UNIT]
87        -W|--wipesignatures y|n
88        -y|--yes
89        -Z|--zero y|n
90

DESCRIPTION

92       lvcreate creates a new LV in a VG. For standard LVs, this requires  al‐
93       locating  logical extents from the VG's free physical extents. If there
94       is not enough free space, the VG can be extended with other PVs  (vgex‐
95       tend(8)), or existing LVs can be reduced or removed (lvremove(8), lvre‐
96       duce(8)).
97
98       To control which PVs a new LV will use, specify one or more PVs as  po‐
99       sition  args  at  the  end  of the command line. lvcreate will allocate
100       physical extents only from the specified PVs.
101
102       lvcreate can also create snapshots of existing  LVs,  e.g.  for  backup
103       purposes.  The  data in a new snapshot LV represents the content of the
104       original LV from the time the snapshot was created.
105
106       RAID LVs can be created by specifying an LV type when creating  the  LV
107       (see  lvmraid(7)).  Different  RAID levels require different numbers of
108       unique PVs be available in the VG for allocation.
109
110       Thin pools (for thin provisioning) and cache pools  (for  caching)  are
111       represented  by  special  LVs  with types thin-pool and cache-pool (see
112       lvmthin(7) and lvmcache(7)). The pool LVs are not  usable  as  standard
113       block devices, but the LV names act as references to the pools.
114
115       Thin  LVs are thinly provisioned from a thin pool, and are created with
116       a virtual size rather than a physical size. A cache LV is the  combina‐
117       tion  of a standard LV with a cache pool, used to cache active portions
118       of the LV to improve performance.
119
120       VDO LVs are also provisioned volumes from a VDO pool, and  are  created
121       with a virtual size rather than a physical size (see lvmvdo(7)).
122
123   Usage notes
124       In  the usage section below, --size Size can be replaced with --extents
125       Number. See descriptions in the options section.
126
127       In the usage section below, --name is omitted  from  the  required  op‐
128       tions,  even  though  it is typically used. When the name is not speci‐
129       fied, a new LV name is generated with the "lvol" prefix  and  a  unique
130       numeric suffix.
131
132       In  the usage section below, when creating a pool and the name is omit‐
133       ted the new LV pool name is generated with the  "vpool"  for  vdo-pools
134       for prefix and a unique numeric suffix.
135
136       Pool name can be specified together with VG name i.e.: vg00/mythinpool.
137

USAGE

139       Create a linear LV.
140
141       lvcreate -L|--size Size[m|UNIT] VG
142           [ --type linear ] (implied)
143           [ -l|--extents Number[PERCENT] ]
144           [ COMMON_OPTIONS ]
145           [ PV ... ]
146
147
148
149       Create a striped LV.
150
151       lvcreate -i|--stripes Number -L|--size Size[m|UNIT] VG
152           [ --type striped ] (implied)
153           [ -l|--extents Number[PERCENT] ]
154           [ -I|--stripesize Size[k|UNIT] ]
155           [ COMMON_OPTIONS ]
156           [ PV ... ]
157
158
159
160       Create a raid1 or mirror LV.
161
162       lvcreate -m|--mirrors Number -L|--size Size[m|UNIT] VG
163           [ --type raid1|mirror ] (implied)
164           [ -l|--extents Number[PERCENT] ]
165           [ -I|--stripesize Size[k|UNIT] ]
166           [ -R|--regionsize Size[m|UNIT] ]
167           [    --mirrorlog core|disk ]
168           [    --[raid]minrecoveryrate Size[k|UNIT] ]
169           [    --[raid]maxrecoveryrate Size[k|UNIT] ]
170           [ COMMON_OPTIONS ]
171           [ PV ... ]
172
173
174
175       Create a raid LV (a specific raid level must be used, e.g. raid1).
176
177       lvcreate --type raid -L|--size Size[m|UNIT] VG
178           [ -l|--extents Number[PERCENT] ]
179           [ -i|--stripes Number ]
180           [ -I|--stripesize Size[k|UNIT] ]
181           [ -m|--mirrors Number ]
182           [ -R|--regionsize Size[m|UNIT] ]
183           [    --[raid]minrecoveryrate Size[k|UNIT] ]
184           [    --[raid]maxrecoveryrate Size[k|UNIT] ]
185           [    --raidintegrity y|n ]
186           [    --raidintegritymode String ]
187           [    --raidintegrityblocksize Number ]
188           [ COMMON_OPTIONS ]
189           [ PV ... ]
190
191
192
193       Create a raid10 LV.
194
195       lvcreate -m|--mirrors Number -i|--stripes Number
196             -L|--size Size[m|UNIT] VG
197           [ --type raid10 ] (implied)
198           [ -l|--extents Number[PERCENT] ]
199           [ -I|--stripesize Size[k|UNIT] ]
200           [ -R|--regionsize Size[m|UNIT] ]
201           [    --[raid]minrecoveryrate Size[k|UNIT] ]
202           [    --[raid]maxrecoveryrate Size[k|UNIT] ]
203           [ COMMON_OPTIONS ]
204           [ PV ... ]
205
206
207
208       Create a COW snapshot LV of an origin LV.
209
210       lvcreate -s|--snapshot -L|--size Size[m|UNIT] LV
211           [ --type snapshot ] (implied)
212           [ -l|--extents Number[PERCENT] ]
213           [ -i|--stripes Number ]
214           [ -I|--stripesize Size[k|UNIT] ]
215           [ -c|--chunksize Size[k|UNIT] ]
216           [ COMMON_OPTIONS ]
217           [ PV ... ]
218
219
220
221       Create a thin pool.
222
223       lvcreate --type thin-pool -L|--size Size[m|UNIT] VG
224           [ -l|--extents Number[PERCENT] ]
225           [ -i|--stripes Number ]
226           [ -I|--stripesize Size[k|UNIT] ]
227           [ -T|--thin ]
228           [ -c|--chunksize Size[k|UNIT] ]
229           [    --thinpool LV_new ]
230           [    --discards passdown|nopassdown|ignore ]
231           [    --errorwhenfull y|n ]
232           [    --poolmetadatasize Size[m|UNIT] ]
233           [    --poolmetadataspare y|n ]
234           [ COMMON_OPTIONS ]
235           [ PV ... ]
236
237
238
239       Create a cache pool.
240
241       lvcreate --type cache-pool -L|--size Size[m|UNIT] VG
242           [ -l|--extents Number[PERCENT] ]
243           [ -i|--stripes Number ]
244           [ -I|--stripesize Size[k|UNIT] ]
245           [ -H|--cache ]
246           [ -c|--chunksize Size[k|UNIT] ]
247           [    --cachemode writethrough|writeback|passthrough ]
248           [    --cachepolicy String ]
249           [    --cachesettings String ]
250           [    --cachemetadataformat auto|1|2 ]
251           [    --poolmetadatasize Size[m|UNIT] ]
252           [    --poolmetadataspare y|n ]
253           [ COMMON_OPTIONS ]
254           [ PV ... ]
255
256
257
258       Create a thin LV in a thin pool.
259
260       lvcreate -V|--virtualsize Size[m|UNIT] --thinpool LV VG
261           [ --type thin ] (implied)
262           [ -T|--thin ]
263           [ COMMON_OPTIONS ]
264
265
266
267       Create a thin LV that is a snapshot of an existing thin LV.
268
269       lvcreate -s|--snapshot LV1
270           [ --type thin ] (implied)
271           [ -T|--thin ]
272           [ COMMON_OPTIONS ]
273
274           LV1 types: thin
275
276
277
278       Create a thin LV that is a snapshot of an external origin LV.
279
280       lvcreate --type thin --thinpool LV LV
281           [ -T|--thin ]
282           [ COMMON_OPTIONS ]
283
284
285
286       Create a LV that returns VDO when used.
287
288       lvcreate --type vdo -L|--size Size[m|UNIT] VG
289           [ -l|--extents Number[PERCENT] ]
290           [ -i|--stripes Number ]
291           [ -I|--stripesize Size[k|UNIT] ]
292           [ -V|--virtualsize Size[m|UNIT] ]
293           [    --vdo ]
294           [    --vdopool LV_new ]
295           [    --compression y|n ]
296           [    --deduplication y|n ]
297           [    --vdosettings String ]
298           [ COMMON_OPTIONS ]
299           [ PV ... ]
300
301
302
303       Create a new LV, then attach the specified cachepool
304       which converts the new LV to type cache.
305
306       lvcreate --type cache -L|--size Size[m|UNIT]
307             --cachepool LV VG
308           [ -l|--extents Number[PERCENT] ]
309           [ -i|--stripes Number ]
310           [ -I|--stripesize Size[k|UNIT] ]
311           [ -H|--cache ]
312           [ -c|--chunksize Size[k|UNIT] ]
313           [    --cachemode writethrough|writeback|passthrough ]
314           [    --cachepolicy String ]
315           [    --cachesettings String ]
316           [    --cachemetadataformat auto|1|2 ]
317           [    --poolmetadatasize Size[m|UNIT] ]
318           [    --poolmetadataspare y|n ]
319           [ COMMON_OPTIONS ]
320           [ PV ... ]
321
322
323
324       Create a new LV, then attach the specified cachevol
325       which converts the new LV to type cache.
326
327       lvcreate --type cache -L|--size Size[m|UNIT]
328             --cachevol LV VG
329           [ -l|--extents Number[PERCENT] ]
330           [ -i|--stripes Number ]
331           [ -I|--stripesize Size[k|UNIT] ]
332           [ -c|--chunksize Size[k|UNIT] ]
333           [    --cachemode writethrough|writeback|passthrough ]
334           [    --cachepolicy String ]
335           [    --cachesettings String ]
336           [    --cachemetadataformat auto|1|2 ]
337           [ COMMON_OPTIONS ]
338           [ PV ... ]
339
340
341
342       Create a new LV, then attach a cachevol created from
343       the specified cache device, which converts the
344       new LV to type cache.
345
346       lvcreate --type cache -L|--size Size[m|UNIT]
347             --cachedevice PV VG
348           [ -l|--extents Number[PERCENT] ]
349           [ -i|--stripes Number ]
350           [ -I|--stripesize Size[k|UNIT] ]
351           [ -c|--chunksize Size[k|UNIT] ]
352           [    --cachesize Size[m|UNIT] ]
353           [    --cachemode writethrough|writeback|passthrough ]
354           [    --cachepolicy String ]
355           [    --cachesettings String ]
356           [    --cachemetadataformat auto|1|2 ]
357           [ COMMON_OPTIONS ]
358           [ PV ... ]
359
360
361
362       Create a new LV, then attach the specified cachevol
363       which converts the new LV to type writecache.
364
365       lvcreate --type writecache -L|--size Size[m|UNIT]
366             --cachevol LV VG
367           [ -l|--extents Number[PERCENT] ]
368           [ -i|--stripes Number ]
369           [ -I|--stripesize Size[k|UNIT] ]
370           [    --cachesettings String ]
371           [ COMMON_OPTIONS ]
372           [ PV ... ]
373
374
375
376       Create a new LV, then attach a cachevol created from
377       the specified cache device, which converts the
378       new LV to type writecache.
379
380       lvcreate --type writecache -L|--size Size[m|UNIT]
381             --cachedevice PV VG
382           [ -l|--extents Number[PERCENT] ]
383           [ -i|--stripes Number ]
384           [ -I|--stripesize Size[k|UNIT] ]
385           [    --cachesize Size[m|UNIT] ]
386           [    --cachesettings String ]
387           [ COMMON_OPTIONS ]
388           [ PV ... ]
389
390
391
392       Common options for command:
393           [ -a|--activate y|n|ay ]
394           [ -A|--autobackup y|n ]
395           [ -C|--contiguous y|n ]
396           [ -K|--ignoreactivationskip ]
397           [ -j|--major Number ]
398           [ -n|--name String ]
399           [ -p|--permission rw|r ]
400           [ -M|--persistent y|n ]
401           [ -r|--readahead auto|none|Number ]
402           [ -k|--setactivationskip y|n ]
403           [ -W|--wipesignatures y|n ]
404           [ -Z|--zero y|n ]
405           [    --addtag Tag ]
406           [    --alloc contiguous|cling|cling_by_tags|normal|anywhere|inherit
407           ]
408           [    --ignoremonitoring ]
409           [    --metadataprofile String ]
410           [    --minor Number ]
411           [    --monitor y|n ]
412           [    --nosync ]
413           [    --noudevsync ]
414           [    --reportformat basic|json|json_std ]
415           [    --setautoactivation y|n ]
416
417       Common options for lvm:
418           [ -d|--debug ]
419           [ -h|--help ]
420           [ -q|--quiet ]
421           [ -t|--test ]
422           [ -v|--verbose ]
423           [ -y|--yes ]
424           [    --commandprofile String ]
425           [    --config String ]
426           [    --devices PV ]
427           [    --devicesfile String ]
428           [    --driverloaded y|n ]
429           [    --journal String ]
430           [    --lockopt String ]
431           [    --longhelp ]
432           [    --nohints ]
433           [    --nolocking ]
434           [    --profile String ]
435           [    --version ]
436

OPTIONS

438       -a|--activate y|n|ay
439              Controls the active state of the new LV.  y makes the LV active,
440              or  available.  New LVs are made active by default.  n makes the
441              LV inactive, or unavailable, only when possible.  In some cases,
442              creating an LV requires it to be active.  For example, COW snap‐
443              shots of an active origin LV can only be created in  the  active
444              state  (this  does not apply to thin snapshots).  The --zero op‐
445              tion normally requires the LV to be active.   If  autoactivation
446              ay  is  used,  the LV is only activated if it matches an item in
447              lvm.conf(5) activation/auto_activation_volume_list.  ay  implies
448              --zero  n  and --wipesignatures n.  See lvmlockd(8) for more in‐
449              formation about activation options for shared VGs.
450
451       --addtag Tag
452              Adds a tag to a PV, VG or LV. This option can be repeated to add
453              multiple tags at once. See lvm(8) for information about tags.
454
455       --alloc contiguous|cling|cling_by_tags|normal|anywhere|inherit
456              Determines  the  allocation policy when a command needs to allo‐
457              cate Physical Extents (PEs) from the VG. Each VG and LV  has  an
458              allocation  policy  which can be changed with vgchange/lvchange,
459              or overridden on the command line.  normal applies common  sense
460              rules  such as not placing parallel stripes on the same PV.  in‐
461              herit applies the VG policy to an LV.  contiguous  requires  new
462              PEs be placed adjacent to existing PEs.  cling places new PEs on
463              the same PV as existing PEs in the same stripe of  the  LV.   If
464              there  are sufficient PEs for an allocation, but normal does not
465              use them, anywhere will use them even if it reduces performance,
466              e.g. by placing two stripes on the same PV.  Optional positional
467              PV args on the command line can also be used to limit which  PVs
468              the command will use for allocation.  See lvm(8) for more infor‐
469              mation about allocation.
470
471       -A|--autobackup y|n
472              Specifies if metadata should be backed up automatically after  a
473              change.   Enabling  this is strongly advised! See vgcfgbackup(8)
474              for more information.
475
476       -H|--cache
477              Specifies the command is handling a cache LV or cache pool.  See
478              --type  cache  and  --type cache-pool.  See lvmcache(7) for more
479              information about LVM caching.
480
481       --cachedevice PV
482              The name of a device to use for a cache.
483
484       --cachemetadataformat auto|1|2
485              Specifies the cache metadata format used by cache target.
486
487       --cachemode writethrough|writeback|passthrough
488              Specifies when writes to a cache LV should  be  considered  com‐
489              plete.   writeback  considers  a write complete as soon as it is
490              stored in the cache pool.  writethough considers  a  write  com‐
491              plete only when it has been stored in both the cache pool and on
492              the origin LV.  While writethrough may be slower for writes,  it
493              is more resilient if something should happen to a device associ‐
494              ated with the cache pool LV. With  passthrough,  all  reads  are
495              served  from  the  origin  LV (all reads miss the cache) and all
496              writes are forwarded to the origin LV; additionally, write  hits
497              cause cache block invalidates. See lvmcache(7) for more informa‐
498              tion.
499
500       --cachepolicy String
501              Specifies the cache policy for a cache LV.  See lvmcache(7)  for
502              more information.
503
504       --cachepool LV
505              The name of a cache pool.
506
507       --cachesettings String
508              Specifies  tunable  kernel options for dm-cache or dm-writecache
509              LVs.  Use the form 'option=value' or 'option1=value option2=val‐
510              ue', or repeat --cachesettings for each option being set.  These
511              settings override the default kernel behaviors which are usually
512              adequate. To remove cachesettings and revert to the default ker‐
513              nel behaviors, use --cachesettings 'default' for dm-cache or  an
514              empty  string  --cachesettings  ''  for dm-writecache.  See lvm‐
515              cache(7) for more information.
516
517       --cachesize Size[m|UNIT]
518              The size of cache to use.
519
520       --cachevol LV
521              The name of a cache volume.
522
523       -c|--chunksize Size[k|UNIT]
524              The size of chunks in a snapshot, cache pool or thin pool.   For
525              snapshots,  the  value  must  be  a power of 2 between 4 KiB and
526              512 KiB and the default value is 4.  For a cache pool the  value
527              must  be  between  32 KiB and 1 GiB and the default value is 64.
528              For a thin pool the value must be between 64 KiB and  1 GiB  and
529              the  default  value starts with 64 and scales up to fit the pool
530              metadata size within 128 MiB, if the pool metadata size  is  not
531              specified.   The  value  must  be  a  multiple  of  64 KiB.  See
532              lvmthin(7) and lvmcache(7) for more information.
533
534       --commandprofile String
535              The command profile  to  use  for  command  configuration.   See
536              lvm.conf(5) for more information about profiles.
537
538       --compression y|n
539              Controls  whether compression is enabled or disable for VDO vol‐
540              ume.  See lvmvdo(7) for more information about VDO usage.
541
542       --config String
543              Config settings for the command. These override lvm.conf(5) set‐
544              tings.   The  String arg uses the same format as lvm.conf(5), or
545              may use section/field syntax.  See lvm.conf(5) for more informa‐
546              tion about config.
547
548       -C|--contiguous y|n
549              Sets  or  resets  the contiguous allocation policy for LVs.  De‐
550              fault is no contiguous allocation based on a next  free  princi‐
551              ple.   It is only possible to change a non-contiguous allocation
552              policy to contiguous if all of the allocated physical extents in
553              the LV are already contiguous.
554
555       -d|--debug ...
556              Set debug level. Repeat from 1 to 6 times to increase the detail
557              of messages sent to the log file and/or syslog (if configured).
558
559       --deduplication y|n
560              Controls whether deduplication is enabled  or  disable  for  VDO
561              volume.  See lvmvdo(7) for more information about VDO usage.
562
563       --devices PV
564              Restricts  the  devices  that  are visible and accessible to the
565              command.  Devices not listed will appear to be missing. This op‐
566              tion  can  be repeated, or accepts a comma separated list of de‐
567              vices. This overrides the devices file.
568
569       --devicesfile String
570              A file listing devices that LVM should use.  The file must exist
571              in  /etc/lvm/devices/ and is managed with the lvmdevices(8) com‐
572              mand.  This overrides the  lvm.conf(5)  devices/devicesfile  and
573              devices/use_devicesfile settings.
574
575       --discards passdown|nopassdown|ignore
576              Specifies  how  the  device-mapper thin pool layer in the kernel
577              should handle discards.  ignore causes the thin pool  to  ignore
578              discards.   nopassdown  causes the thin pool to process discards
579              itself to allow reuse of unneeded  extents  in  the  thin  pool.
580              passdown  causes  the thin pool to process discards itself (like
581              nopassdown) and pass the discards to the underlying device.  See
582              lvmthin(7) for more information.
583
584       --driverloaded y|n
585              If set to no, the command will not attempt to use device-mapper.
586              For testing and debugging.
587
588       --errorwhenfull y|n
589              Specifies thin pool behavior when data space is exhausted.  When
590              yes,  device-mapper will immediately return an error when a thin
591              pool is full and an I/O request requires space.   When  no,  de‐
592              vice-mapper  will  queue these I/O requests for a period of time
593              to allow the thin pool to be extended.  Errors are  returned  if
594              no space is available after the timeout.  (Also see dm-thin-pool
595              kernel module option no_space_timeout.)  See lvmthin(7) for more
596              information.
597
598       -l|--extents Number[PERCENT]
599              Specifies the size of the new LV in logical extents.  The --size
600              and --extents options are alternate methods of specifying  size.
601              The  total  number of physical extents used will be greater when
602              redundant data is needed for RAID levels.  An  alternate  syntax
603              allows  the  size to be determined indirectly as a percentage of
604              the size of a related VG, LV, or set of PVs. The suffix %VG  de‐
605              notes  the  total size of the VG, the suffix %FREE the remaining
606              free space in the VG, and the suffix %PVS the free space in  the
607              specified  PVs.   For a snapshot, the size can be expressed as a
608              percentage of the total size of the origin LV  with  the  suffix
609              %ORIGIN  (100%ORIGIN provides space for the whole origin).  When
610              expressed as a percentage, the size defines an upper  limit  for
611              the  number of logical extents in the new LV. The precise number
612              of logical extents in the new LV is  not  determined  until  the
613              command has completed.
614
615       -h|--help
616              Display help text.
617
618       -K|--ignoreactivationskip
619              Ignore  the "activation skip" LV flag during activation to allow
620              LVs with the flag set to be activated.
621
622       --ignoremonitoring
623              Do not interact with dmeventd unless --monitor is specified.  Do
624              not use this if dmeventd is already monitoring a device.
625
626       --journal String
627              Record  information in the systemd journal.  This information is
628              in addition to information enabled by the  lvm.conf  log/journal
629              setting.   command:  record information about the command.  out‐
630              put: record the default command output.  debug: record full com‐
631              mand debugging.
632
633       --lockopt String
634              Used  to  pass  options for special cases to lvmlockd.  See lvm‐
635              lockd(8) for more information.
636
637       --longhelp
638              Display long help text.
639
640       -j|--major Number
641              Sets the major number of an LV block device.
642
643       --[raid]maxrecoveryrate Size[k|UNIT]
644              Sets the maximum recovery rate for a RAID LV.  The rate value is
645              an amount of data per second for each device in the array.  Set‐
646              ting the rate to 0 means it will be unbounded.   See  lvmraid(7)
647              for more information.
648
649       --metadataprofile String
650              The  metadata  profile  to  use  for command configuration.  See
651              lvm.conf(5) for more information about profiles.
652
653       --minor Number
654              Sets the minor number of an LV block device.
655
656       --[raid]minrecoveryrate Size[k|UNIT]
657              Sets the minimum recovery rate for a RAID LV.  The rate value is
658              an amount of data per second for each device in the array.  Set‐
659              ting the rate to 0 means it will be unbounded.   See  lvmraid(7)
660              for more information.
661
662       --mirrorlog core|disk
663              Specifies  the type of mirror log for LVs with the "mirror" type
664              (does not apply to the "raid1" type.)  disk is a persistent  log
665              and requires a small amount of storage space, usually on a sepa‐
666              rate device from the data being mirrored.  core is  not  persis‐
667              tent;  the log is kept only in memory.  In this case, the mirror
668              must be synchronized (by copying LV data from the  first  device
669              to  others)  each  time  the LV is activated, e.g. after reboot.
670              mirrored is a persistent log that is itself mirrored, but should
671              be avoided. Instead, use the raid1 type for log redundancy.
672
673       -m|--mirrors Number
674              Specifies  the number of mirror images in addition to the origi‐
675              nal LV image, e.g. --mirrors 1 means there are two images of the
676              data, the original and one mirror image.  Optional positional PV
677              args on the command line can  specify  the  devices  the  images
678              should  be  placed on.  There are two mirroring implementations:
679              "raid1" and "mirror".  These are the names of the  corresponding
680              LV  types, or "segment types".  Use the --type option to specify
681              which to use (raid1  is  default,  and  mirror  is  legacy)  Use
682              lvm.conf(5) global/mirror_segtype_default and global/raid10_seg‐
683              type_default to configure the default types.  See  the  --nosync
684              option  for  avoiding  initial  image synchronization.  See lvm‐
685              raid(7) for more information.
686
687       --monitor y|n
688              Start (yes)  or  stop  (no)  monitoring  an  LV  with  dmeventd.
689              dmeventd monitors kernel events for an LV, and performs automat‐
690              ed maintenance for the LV in response to specific  events.   See
691              dmeventd(8) for more information.
692
693       -n|--name String
694              Specifies  the  name  of  a new LV.  When unspecified, a default
695              name of "lvol#" is generated, where # is a number  generated  by
696              LVM.
697
698       --nohints
699              Do  not  use the hints file to locate devices for PVs. A command
700              may read more devices to find PVs when hints are not  used.  The
701              command will still perform standard hint file invalidation where
702              appropriate.
703
704       --nolocking
705              Disable locking. Use with caution, concurrent commands may  pro‐
706              duce incorrect results.
707
708       --nosync
709              Causes the creation of mirror, raid1, raid4, raid5 and raid10 to
710              skip the initial synchronization. In case of mirror,  raid1  and
711              raid10,  any  data  written afterwards will be mirrored, but the
712              original contents will not be  copied.  In  case  of  raid4  and
713              raid5, no parity blocks will be written, though any data written
714              afterwards will cause parity blocks to be stored.  This is  use‐
715              ful  for skipping a potentially long and resource intensive ini‐
716              tial sync of an empty mirror/raid1/raid4/raid5  and  raid10  LV.
717              This  option  is  not  valid  for raid6, because raid6 relies on
718              proper parity (P and Q Syndromes) being created  during  initial
719              synchronization in order to reconstruct proper user date in case
720              of device failures.  raid0 and raid0_meta do not provide any da‐
721              ta copies or parity support and thus do not support initial syn‐
722              chronization.
723
724       --noudevsync
725              Disables udev synchronization. The process will not wait for no‐
726              tification  from udev. It will continue irrespective of any pos‐
727              sible udev processing in the background. Only use this  if  udev
728              is not running or has rules that ignore the devices LVM creates.
729
730       -p|--permission rw|r
731              Set access permission to read only r or read and write rw.
732
733       -M|--persistent y|n
734              When yes, makes the specified minor number persistent.
735
736       --poolmetadatasize Size[m|UNIT]
737              Specifies the size of the new pool metadata LV.
738
739       --poolmetadataspare y|n
740              Enable  or  disable  the  automatic creation and management of a
741              spare pool metadata LV in the VG. A spare  metadata  LV  is  re‐
742              served space that can be used when repairing a pool.
743
744       --profile String
745              An alias for --commandprofile or --metadataprofile, depending on
746              the command.
747
748       -q|--quiet ...
749              Suppress output and log messages. Overrides --debug  and  --ver‐
750              bose.   Repeat  once  to  also  suppress any prompts with answer
751              'no'.
752
753       --raidintegrity y|n
754              Enable or disable data integrity checksums for raid images.
755
756       --raidintegrityblocksize Number
757              The block size to use for dm-integrity on raid images.  The  in‐
758              tegrity block size should usually match the device logical block
759              size, or the file system block size.  It may be  less  than  the
760              file  system  block  size,  but not less than the device logical
761              block size.  Possible values: 512, 1024, 2048, 4096.
762
763       --raidintegritymode String
764              Use a journal (default) or bitmap for keeping  integrity  check‐
765              sums  consistent in case of a crash. The bitmap areas are recal‐
766              culated after a crash, so corruption in those areas would not be
767              detected.  A  journal  does  not have this problem.  The journal
768              mode doubles writes to storage, but can improve performance  for
769              scattered  writes  packed  into  a single journal write.  bitmap
770              mode can in theory achieve full write throughput of the  device,
771              but  would  not benefit from the potential scattered write opti‐
772              mization.
773
774       -r|--readahead auto|none|Number
775              Sets read ahead sector count of an  LV.   auto  is  the  default
776              which  allows the kernel to choose a suitable value automatical‐
777              ly.  none is equivalent to zero.
778
779       -R|--regionsize Size[m|UNIT]
780              Size of each raid or mirror synchronization region.  lvm.conf(5)
781              activation/raid_region_size can be used to configure a default.
782
783       --reportformat basic|json|json_std
784              Overrides  current  output  format  for reports which is defined
785              globally by the  report/output_format  setting  in  lvm.conf(5).
786              basic is the original format with columns and rows.  If there is
787              more than one report per command, each report is  prefixed  with
788              the  report name for identification. json produces report output
789              in JSON format. json_std produces report output in  JSON  format
790              which  is  more  compliant with JSON standard.  See lvmreport(7)
791              for more information.
792
793       -k|--setactivationskip y|n
794              Persistently sets (yes) or clears  (no)  the  "activation  skip"
795              flag on an LV.  An LV with this flag set is not activated unless
796              the --ignoreactivationskip option is used by the activation com‐
797              mand.   This  flag  is  set by default on new thin snapshot LVs.
798              The flag is not applied to deactivation.  The current  value  of
799              the flag is indicated in the lvs lv_attr bits.
800
801       --setautoactivation y|n
802              Set  the  autoactivation  property  on  a VG or LV.  Display the
803              property with vgs or lvs "-o autoactivation".  When the  autoac‐
804              tivation property is disabled, the VG or LV will not be activat‐
805              ed by a command doing  autoactivation  (vgchange,  lvchange,  or
806              pvscan  using  -aay.)  If autoactivation is disabled on a VG, no
807              LVs will be autoactivated in that VG, and the LV  autoactivation
808              property  has  no effect.  If autoactivation is enabled on a VG,
809              autoactivation can be disabled for individual LVs.
810
811       -L|--size Size[m|UNIT]
812              Specifies the size of the new LV.  The --size and --extents  op‐
813              tions  are alternate methods of specifying size.  The total num‐
814              ber of physical extents used will be greater when redundant data
815              is needed for RAID levels.
816
817       -s|--snapshot
818              Create a snapshot. Snapshots provide a "frozen image" of an ori‐
819              gin LV.  The snapshot LV can be used, e.g.  for  backups,  while
820              the  origin  LV  continues to be used.  This option can create a
821              COW (copy on write) snapshot, or a  thin  snapshot  (in  a  thin
822              pool.)   Thin snapshots are created when the origin is a thin LV
823              and the size option is NOT specified. Thin snapshots  share  the
824              same blocks in the thin pool, and do not allocate new space from
825              the VG.  Thin snapshots are created with the  "activation  skip"
826              flag,  see  --setactivationskip.   A thin snapshot of a non-thin
827              "external origin" LV is created when a thin pool  is  specified.
828              Unprovisioned  blocks  in the thin snapshot LV are read from the
829              external origin LV. The external origin LV  must  be  read-only.
830              See lvmthin(7) for more information about LVM thin provisioning.
831              COW snapshots are created when a size is specified. The size  is
832              allocated  from space in the VG, and is the amount of space that
833              can be used for saving COW blocks as writes occur to the  origin
834              or  snapshot.   The size chosen should depend upon the amount of
835              writes that are expected; often 20% of the origin LV is  enough.
836              If COW space runs low, it can be extended with lvextend (shrink‐
837              ing is also allowed with lvreduce.)  A small amount of  the  COW
838              snapshot  LV  size  is used to track COW block locations, so the
839              full size is not available for COW  data  blocks.   Use  lvs  to
840              check  how much space is used, and see --monitor to to automati‐
841              cally extend the size to avoid running out of space.
842
843       -i|--stripes Number
844              Specifies the number of stripes in a striped  LV.  This  is  the
845              number of PVs (devices) that a striped LV is spread across. Data
846              that appears sequential in the LV is spread across multiple  de‐
847              vices  in units of the stripe size (see --stripesize). This does
848              not change existing allocated space, but only applies  to  space
849              being  allocated by the command.  When creating a RAID 4/5/6 LV,
850              this number does not include the extra devices that are required
851              for  parity. The largest number depends on the RAID type (raid0:
852              64, raid10: 32, raid4/5: 63, raid6: 62), and  when  unspecified,
853              the  default  depends  on  the  RAID  type (raid0: 2, raid10: 2,
854              raid4/5: 3, raid6: 5.)  To stripe a new raid LV across  all  PVs
855              by default, see lvm.conf(5) allocation/raid_stripe_all_devices.
856
857       -I|--stripesize Size[k|UNIT]
858              The  amount  of data that is written to one device before moving
859              to the next in a striped LV.
860
861       -t|--test
862              Run in test mode. Commands will not update  metadata.   This  is
863              implemented  by  disabling all metadata writing but nevertheless
864              returning success to the calling function. This may lead to  un‐
865              usual  error messages in multi-stage operations if a tool relies
866              on reading back metadata it believes has changed but hasn't.
867
868       -T|--thin
869              Specifies the command is handling a thin LV or thin  pool.   See
870              --type   thin,   --type   thin-pool,   and  --virtualsize.   See
871              lvmthin(7) for more information about LVM thin provisioning.
872
873       --thinpool LV
874              The name of a thin pool LV.
875
876       --type linear|striped|snapshot|raid|mirror|thin|thin-pool|vdo|vdo-pool|
877              cache|cache-pool|writecache
878              The LV type, also known as "segment type" or "segtype".  See us‐
879              age descriptions for the specific ways to use these types.   For
880              more information about redundancy and performance (raid<N>, mir‐
881              ror, striped, linear) see  lvmraid(7).   For  thin  provisioning
882              (thin,  thin-pool)  see  lvmthin(7).   For  performance  caching
883              (cache, cache-pool) see lvmcache(7).   For  copy-on-write  snap‐
884              shots (snapshot) see usage definitions.  For VDO (vdo) see lvmv‐
885              do(7).  Several commands omit an explicit  type  option  because
886              the  type  is  inferred  from  other  options or shortcuts (e.g.
887              --stripes,   --mirrors,   --snapshot,   --virtualsize,   --thin,
888              --cache,  --vdo).   Use  inferred types with care because it can
889              lead to unexpected results.
890
891       --vdo
892              Specifies the command is handling VDO LV.  See --type vdo.   See
893              lvmvdo(7) for more information about VDO usage.
894
895       --vdopool LV
896              The  name  of a VDO pool LV.  See lvmvdo(7) for more information
897              about VDO usage.
898
899       --vdosettings String
900              Specifies tunable VDO options for VDO LVs.  Use  the  form  'op‐
901              tion=value'   or   'option1=value   option2=value',   or  repeat
902              --vdosettings for each option being set.  These  settings  over‐
903              ride  the  default VDO behaviors.  To remove vdosettings and re‐
904              vert to the default VDO behaviors, use --vdosettings  'default'.
905              See lvmvdo(7) for more information.
906
907       -v|--verbose ...
908              Set  verbose level. Repeat from 1 to 4 times to increase the de‐
909              tail of messages sent to stdout and stderr.
910
911       --version
912              Display version information.
913
914       -V|--virtualsize Size[m|UNIT]
915              The virtual size of a new thin LV.  See lvmthin(7) for more  in‐
916              formation  about LVM thin provisioning.  Using virtual size (-V)
917              and actual size (-L) together creates a sparse LV.   lvm.conf(5)
918              global/sparse_segtype_default  determines  the  default  segment
919              type used to create a sparse LV.  Anything written to  a  sparse
920              LV  will  be  returned when reading from it.  Reading from other
921              areas of the LV will return blocks of zeros.  When using a snap‐
922              shot  to  create a sparse LV, a hidden virtual device is created
923              using the zero target, and  the  LV  has  the  suffix  _vorigin.
924              Snapshots  are less efficient than thin provisioning when creat‐
925              ing large sparse LVs (GiB).
926
927       -W|--wipesignatures y|n
928              Controls detection and subsequent wiping of  signatures  on  new
929              LVs.   There  is a prompt for each signature detected to confirm
930              its wiping (unless --yes is  used  to  override  confirmations.)
931              When  not  specified,  signatures  are wiped whenever zeroing is
932              done  (see  --zero).  This  behaviour  can  be  configured  with
933              lvm.conf(5) allocation/wipe_signatures_when_zeroing_new_lvs.  If
934              blkid wiping is used  (lvm.conf(5)  allocation/use_blkid_wiping)
935              and LVM is compiled with blkid wiping support, then the blkid(8)
936              library is used to detect the signatures (use blkid -k  to  list
937              the signatures that are recognized).  Otherwise, native LVM code
938              is used to detect signatures (only MD RAID, swap and LUKS signa‐
939              tures  are  detected  in this case.)  The LV is not wiped if the
940              read only flag is set.
941
942       -y|--yes
943              Do not prompt for confirmation interactively but  always  assume
944              the  answer  yes.  Use with extreme caution.  (For automatic no,
945              see -qq.)
946
947       -Z|--zero y|n
948              Controls zeroing of the first 4 KiB of data in the new LV.   De‐
949              fault  is  y.  Snapshot COW volumes are always zeroed.  For thin
950              pools, this controls zeroing of provisioned blocks.  LV  is  not
951              zeroed  if  the read only flag is set.  Warning: trying to mount
952              an unzeroed LV can cause the system to hang.
953

VARIABLES

955       VG     Volume Group name.  See lvm(8) for valid names.   For  lvcreate,
956              the  required  VG positional arg may be omitted when the VG name
957              is included in another option, e.g. --name VG/LV.
958
959       LV     Logical Volume name.  See lvm(8) for valid names.  An  LV  posi‐
960              tional  arg  generally  includes  the  VG name and LV name, e.g.
961              VG/LV.  LV1 indicates the LV must have a  specific  type,  where
962              the  accepted  LV  types  are  listed.  (raid represents raid<N>
963              type).
964
965       PV     Physical Volume name, a device path under  /dev.   For  commands
966              managing physical extents, a PV positional arg generally accepts
967              a suffix indicating a range (or multiple ranges) of physical ex‐
968              tents  (PEs).  When  the first PE is omitted, it defaults to the
969              start of the device, and when the last PE is omitted it defaults
970              to  end.   Start and end range (inclusive): PV[:PE-PE]...  Start
971              and length range (counting from 0): PV[:PE+PE]...
972
973       String See the option description for information about the string con‐
974              tent.
975
976       Size[UNIT]
977              Size  is  an  input number that accepts an optional unit.  Input
978              units are always treated as base two values, regardless of capi‐
979              talization,  e.g.  'k'  and 'K' both refer to 1024.  The default
980              input unit is specified by letter, followed by |UNIT.  UNIT rep‐
981              resents other possible input units: b|B is bytes, s|S is sectors
982              of 512 bytes, k|K is KiB, m|M is MiB, g|G is GiB,  t|T  is  TiB,
983              p|P  is  PiB, e|E is EiB.  (This should not be confused with the
984              output control --units, where capital letters mean  multiple  of
985              1000.)
986

ENVIRONMENT VARIABLES

988       See  lvm(8)  for  information  about environment variables used by lvm.
989       For example, LVM_VG_NAME can generally be substituted for a required VG
990       parameter.
991

ADVANCED USAGE

993       Alternate  command  forms,  advanced  command usage, and listing of all
994       valid syntax for completeness.
995
996       Create an LV that returns errors when used.
997
998       lvcreate --type error -L|--size Size[m|UNIT] VG
999           [ -l|--extents Number[PERCENT] ]
1000           [ COMMON_OPTIONS ]
1001
1002
1003
1004       Create an LV that returns zeros when read.
1005
1006       lvcreate --type zero -L|--size Size[m|UNIT] VG
1007           [ -l|--extents Number[PERCENT] ]
1008           [ COMMON_OPTIONS ]
1009
1010
1011
1012       Create a linear LV.
1013
1014       lvcreate --type linear -L|--size Size[m|UNIT] VG
1015           [ -l|--extents Number[PERCENT] ]
1016           [ COMMON_OPTIONS ]
1017           [ PV ... ]
1018
1019
1020
1021       Create a striped LV (also see lvcreate --stripes).
1022
1023       lvcreate --type striped -L|--size Size[m|UNIT] VG
1024           [ -l|--extents Number[PERCENT] ]
1025           [ -i|--stripes Number ]
1026           [ -I|--stripesize Size[k|UNIT] ]
1027           [ COMMON_OPTIONS ]
1028           [ PV ... ]
1029
1030
1031
1032       Create a mirror LV (also see --type raid1).
1033
1034       lvcreate --type mirror -L|--size Size[m|UNIT] VG
1035           [ -l|--extents Number[PERCENT] ]
1036           [ -i|--stripes Number ]
1037           [ -I|--stripesize Size[k|UNIT] ]
1038           [ -m|--mirrors Number ]
1039           [ -R|--regionsize Size[m|UNIT] ]
1040           [    --mirrorlog core|disk ]
1041           [ COMMON_OPTIONS ]
1042           [ PV ... ]
1043
1044
1045
1046       Create a COW snapshot LV of an origin LV
1047       (also see --snapshot).
1048
1049       lvcreate --type snapshot -L|--size Size[m|UNIT] LV
1050           [ -l|--extents Number[PERCENT] ]
1051           [ -s|--snapshot ]
1052           [ -i|--stripes Number ]
1053           [ -I|--stripesize Size[k|UNIT] ]
1054           [ -c|--chunksize Size[k|UNIT] ]
1055           [ COMMON_OPTIONS ]
1056           [ PV ... ]
1057
1058
1059
1060       Create a sparse COW snapshot LV of a virtual origin LV
1061       (also see --snapshot).
1062
1063       lvcreate --type snapshot -L|--size Size[m|UNIT]
1064             -V|--virtualsize Size[m|UNIT] VG
1065           [ -l|--extents Number[PERCENT] ]
1066           [ -s|--snapshot ]
1067           [ -c|--chunksize Size[k|UNIT] ]
1068           [ COMMON_OPTIONS ]
1069           [ PV ... ]
1070
1071
1072
1073       Create a thin pool.
1074
1075       lvcreate -T|--thin -L|--size Size[m|UNIT] VG
1076           [ --type thin-pool ] (implied)
1077           [ -l|--extents Number[PERCENT] ]
1078           [ -i|--stripes Number ]
1079           [ -I|--stripesize Size[k|UNIT] ]
1080           [ -c|--chunksize Size[k|UNIT] ]
1081           [    --discards passdown|nopassdown|ignore ]
1082           [    --errorwhenfull y|n ]
1083           [    --poolmetadatasize Size[m|UNIT] ]
1084           [    --poolmetadataspare y|n ]
1085           [ COMMON_OPTIONS ]
1086           [ PV ... ]
1087
1088
1089
1090       Create a thin pool named in --thinpool.
1091
1092       lvcreate -L|--size Size[m|UNIT] --thinpool LV_new VG
1093           [ --type thin-pool ] (implied)
1094           [ -l|--extents Number[PERCENT] ]
1095           [ -i|--stripes Number ]
1096           [ -I|--stripesize Size[k|UNIT] ]
1097           [ -T|--thin ]
1098           [ -c|--chunksize Size[k|UNIT] ]
1099           [    --discards passdown|nopassdown|ignore ]
1100           [    --errorwhenfull y|n ]
1101           [    --poolmetadatasize Size[m|UNIT] ]
1102           [    --poolmetadataspare y|n ]
1103           [ COMMON_OPTIONS ]
1104           [ PV ... ]
1105
1106
1107
1108       Create a cache pool named by the --cachepool arg
1109       (variant, uses --cachepool in place of --name).
1110
1111       lvcreate --type cache-pool -L|--size Size[m|UNIT]
1112             --cachepool LV_new VG
1113           [ -l|--extents Number[PERCENT] ]
1114           [ -i|--stripes Number ]
1115           [ -I|--stripesize Size[k|UNIT] ]
1116           [ -H|--cache ]
1117           [ -c|--chunksize Size[k|UNIT] ]
1118           [    --cachemode writethrough|writeback|passthrough ]
1119           [    --cachepolicy String ]
1120           [    --cachesettings String ]
1121           [    --cachemetadataformat auto|1|2 ]
1122           [    --poolmetadatasize Size[m|UNIT] ]
1123           [    --poolmetadataspare y|n ]
1124           [ COMMON_OPTIONS ]
1125           [ PV ... ]
1126
1127
1128
1129       Create a thin LV in a thin pool.
1130
1131       lvcreate --type thin -V|--virtualsize Size[m|UNIT]
1132             --thinpool LV VG
1133           [ -T|--thin ]
1134           [ COMMON_OPTIONS ]
1135
1136
1137
1138       Create a thin LV in a thin pool named in the first arg
1139       (variant, also see --thinpool for naming pool).
1140
1141       lvcreate --type thin -V|--virtualsize Size[m|UNIT] LV1
1142           [ -T|--thin ]
1143           [ COMMON_OPTIONS ]
1144
1145           LV1 types: thinpool
1146
1147
1148
1149       Create a thin LV in the thin pool named in the first arg
1150       (also see --thinpool for naming pool.)
1151
1152       lvcreate -V|--virtualsize Size[m|UNIT] LV1
1153           [ --type thin ] (implied)
1154           [ -T|--thin ]
1155           [ COMMON_OPTIONS ]
1156
1157           LV1 types: thinpool
1158
1159
1160
1161       Create a thin LV that is a snapshot of an existing thin LV.
1162
1163       lvcreate --type thin LV1
1164           [ -T|--thin ]
1165           [ -s|--snapshot ]
1166           [ COMMON_OPTIONS ]
1167
1168           LV1 types: thin
1169
1170
1171
1172       Create a thin LV that is a snapshot of an existing thin LV.
1173
1174       lvcreate -T|--thin LV1
1175           [ --type thin ] (implied)
1176           [ -s|--snapshot ]
1177           [ COMMON_OPTIONS ]
1178
1179           LV1 types: thin
1180
1181
1182
1183       Create a thin LV that is a snapshot of an external origin LV.
1184
1185       lvcreate -s|--snapshot --thinpool LV LV
1186           [ --type thin ] (implied)
1187           [ COMMON_OPTIONS ]
1188
1189
1190
1191       Create a VDO LV with VDO pool.
1192
1193       lvcreate --vdo -L|--size Size[m|UNIT] VG
1194           [ --type vdo ] (implied)
1195           [ -l|--extents Number[PERCENT] ]
1196           [ -i|--stripes Number ]
1197           [ -I|--stripesize Size[k|UNIT] ]
1198           [ -V|--virtualsize Size[m|UNIT] ]
1199           [    --vdopool LV_new ]
1200           [    --compression y|n ]
1201           [    --deduplication y|n ]
1202           [    --vdosettings String ]
1203           [ COMMON_OPTIONS ]
1204           [ PV ... ]
1205
1206
1207
1208       Create a VDO LV with VDO pool.
1209
1210       lvcreate --vdopool LV_new -L|--size Size[m|UNIT] VG
1211           [ --type vdo ] (implied)
1212           [ -l|--extents Number[PERCENT] ]
1213           [ -i|--stripes Number ]
1214           [ -I|--stripesize Size[k|UNIT] ]
1215           [ -V|--virtualsize Size[m|UNIT] ]
1216           [    --compression y|n ]
1217           [    --deduplication y|n ]
1218           [    --vdosettings String ]
1219           [ COMMON_OPTIONS ]
1220           [ PV ... ]
1221
1222
1223
1224       Create a thin LV, first creating a thin pool for it,
1225       where the new thin pool is named by the --thinpool arg.
1226
1227       lvcreate --type thin -V|--virtualsize Size[m|UNIT]
1228             -L|--size Size[m|UNIT] --thinpool LV_new VG
1229           [ -l|--extents Number[PERCENT] ]
1230           [ -i|--stripes Number ]
1231           [ -I|--stripesize Size[k|UNIT] ]
1232           [ -T|--thin ]
1233           [ -c|--chunksize Size[k|UNIT] ]
1234           [    --discards passdown|nopassdown|ignore ]
1235           [    --errorwhenfull y|n ]
1236           [    --poolmetadatasize Size[m|UNIT] ]
1237           [    --poolmetadataspare y|n ]
1238           [ COMMON_OPTIONS ]
1239           [ PV ... ]
1240
1241
1242
1243       Create a thin LV, first creating a thin pool for it,
1244       where the new thin pool is named by --thinpool.
1245
1246       lvcreate -V|--virtualsize Size[m|UNIT] -L|--size Size[m|UNIT]
1247             --thinpool LV_new VG
1248           [ --type thin ] (implied)
1249           [ -l|--extents Number[PERCENT] ]
1250           [ -i|--stripes Number ]
1251           [ -I|--stripesize Size[k|UNIT] ]
1252           [ -T|--thin ]
1253           [ -c|--chunksize Size[k|UNIT] ]
1254           [    --discards passdown|nopassdown|ignore ]
1255           [    --errorwhenfull y|n ]
1256           [    --poolmetadatasize Size[m|UNIT] ]
1257           [    --poolmetadataspare y|n ]
1258           [ COMMON_OPTIONS ]
1259           [ PV ... ]
1260
1261
1262
1263       Create a thin LV, first creating a thin pool for it,
1264       where the new thin pool is named in the first arg,
1265       or the new thin pool name is generated when the first
1266       arg is a VG name.
1267
1268       lvcreate --type thin -V|--virtualsize Size[m|UNIT]
1269             -L|--size Size[m|UNIT] VG|LV_new
1270           [ -l|--extents Number[PERCENT] ]
1271           [ -i|--stripes Number ]
1272           [ -I|--stripesize Size[k|UNIT] ]
1273           [ -T|--thin ]
1274           [ -c|--chunksize Size[k|UNIT] ]
1275           [    --discards passdown|nopassdown|ignore ]
1276           [    --errorwhenfull y|n ]
1277           [    --poolmetadatasize Size[m|UNIT] ]
1278           [    --poolmetadataspare y|n ]
1279           [ COMMON_OPTIONS ]
1280           [ PV ... ]
1281
1282
1283
1284       Create a thin LV, first creating a thin pool for it,
1285       where the new thin pool is named in the first arg,
1286       or the new thin pool name is generated when the first
1287       arg is a VG name.
1288
1289       lvcreate -T|--thin -V|--virtualsize Size[m|UNIT]
1290             -L|--size Size[m|UNIT] VG|LV_new
1291           [ --type thin ] (implied)
1292           [ -l|--extents Number[PERCENT] ]
1293           [ -i|--stripes Number ]
1294           [ -I|--stripesize Size[k|UNIT] ]
1295           [ -c|--chunksize Size[k|UNIT] ]
1296           [    --discards passdown|nopassdown|ignore ]
1297           [    --errorwhenfull y|n ]
1298           [    --poolmetadatasize Size[m|UNIT] ]
1299           [    --poolmetadataspare y|n ]
1300           [ COMMON_OPTIONS ]
1301           [ PV ... ]
1302
1303
1304
1305       Create a thin LV, first creating a thin pool for it.
1306       Create a sparse snapshot of a virtual origin LV
1307       Chooses type thin or snapshot according to
1308       config setting sparse_segtype_default.
1309
1310       lvcreate -L|--size Size[m|UNIT] -V|--virtualsize Size[m|UNIT] VG
1311           [ --type thin|snapshot ] (implied)
1312           [ -l|--extents Number[PERCENT] ]
1313           [ -i|--stripes Number ]
1314           [ -I|--stripesize Size[k|UNIT] ]
1315           [ -s|--snapshot ]
1316           [ -T|--thin ]
1317           [ -c|--chunksize Size[k|UNIT] ]
1318           [    --discards passdown|nopassdown|ignore ]
1319           [    --errorwhenfull y|n ]
1320           [    --poolmetadatasize Size[m|UNIT] ]
1321           [    --poolmetadataspare y|n ]
1322           [ COMMON_OPTIONS ]
1323           [ PV ... ]
1324
1325
1326
1327       Create a new LV, then attach the specified cachepool
1328       which converts the new LV to type cache.
1329
1330       lvcreate -L|--size Size[m|UNIT] --cachepool LV VG
1331           [ --type cache ] (implied)
1332           [ -l|--extents Number[PERCENT] ]
1333           [ -i|--stripes Number ]
1334           [ -I|--stripesize Size[k|UNIT] ]
1335           [ -H|--cache ]
1336           [ -c|--chunksize Size[k|UNIT] ]
1337           [    --cachemode writethrough|writeback|passthrough ]
1338           [    --cachepolicy String ]
1339           [    --cachesettings String ]
1340           [    --cachemetadataformat auto|1|2 ]
1341           [ COMMON_OPTIONS ]
1342           [ PV ... ]
1343
1344
1345
1346       Create a new LV, then attach the specified cachepool
1347       which converts the new LV to type cache.
1348       (variant, also use --cachepool).
1349
1350       lvcreate --type cache -L|--size Size[m|UNIT] LV1
1351           [ -l|--extents Number[PERCENT] ]
1352           [ -i|--stripes Number ]
1353           [ -I|--stripesize Size[k|UNIT] ]
1354           [ -H|--cache ]
1355           [ -c|--chunksize Size[k|UNIT] ]
1356           [    --cachemode writethrough|writeback|passthrough ]
1357           [    --cachepolicy String ]
1358           [    --cachesettings String ]
1359           [    --cachemetadataformat auto|1|2 ]
1360           [    --poolmetadatasize Size[m|UNIT] ]
1361           [    --poolmetadataspare y|n ]
1362           [ COMMON_OPTIONS ]
1363           [ PV ... ]
1364
1365           LV1 types: cachepool
1366
1367
1368
1369       When the LV arg is a cachepool, then create a new LV and
1370       attach the cachepool arg to it.
1371       (variant, use --type cache and --cachepool.)
1372       When the LV arg is not a cachepool, then create a new cachepool
1373       and attach it to the LV arg (alternative, use lvconvert.)
1374
1375       lvcreate -H|--cache -L|--size Size[m|UNIT] LV
1376           [ --type cache ] (implied)
1377           [ -l|--extents Number[PERCENT] ]
1378           [ -c|--chunksize Size[k|UNIT] ]
1379           [ -i|--stripes Number ]
1380           [ -I|--stripesize Size[k|UNIT] ]
1381           [    --cachemode writethrough|writeback|passthrough ]
1382           [    --cachepolicy String ]
1383           [    --cachesettings String ]
1384           [    --cachemetadataformat auto|1|2 ]
1385           [    --poolmetadatasize Size[m|UNIT] ]
1386           [    --poolmetadataspare y|n ]
1387           [ COMMON_OPTIONS ]
1388           [ PV ... ]
1389
1390
1391

EXAMPLES

1393       Create a striped LV with 3 stripes, a stripe size of 8 KiB and  a  size
1394       of 100 MiB.  The LV name is chosen by lvcreate.
1395       lvcreate -i 3 -I 8 -L 100m vg00
1396
1397       Create  a  raid1 LV with two images, and a usable size of 500 MiB. This
1398       operation requires two devices, one for each mirror image. RAID metada‐
1399       ta (superblock and bitmap) is also included on the two devices.
1400       lvcreate --type raid1 -m1 -L 500m -n mylv vg00
1401
1402       Create a mirror LV with two images, and a usable size of 500 MiB.  This
1403       operation requires three devices: two for mirror images and one  for  a
1404       disk log.
1405       lvcreate --type mirror -m1 -L 500m -n mylv vg00
1406
1407       Create  a  mirror LV with 2 images, and a usable size of 500 MiB.  This
1408       operation requires 2 devices because the log is in memory.
1409       lvcreate --type mirror -m1 --mirrorlog core -L 500m -n mylv vg00
1410
1411       Create a copy-on-write snapshot of an LV:
1412       lvcreate --snapshot --size 100m --name mysnap vg00/mylv
1413
1414       Create a copy-on-write snapshot with a size sufficient for  overwriting
1415       20% of the size of the original LV.
1416       lvcreate -s -l 20%ORIGIN -n mysnap vg00/mylv
1417
1418       Create  a  sparse LV with 1 TiB of virtual space, and actual space just
1419       under 100 MiB.
1420       lvcreate --snapshot --virtualsize 1t --size 100m --name mylv vg00
1421
1422       Create a linear LV with a usable size of 64 MiB  on  specific  physical
1423       extents.
1424       lvcreate -L 64m -n mylv vg00 /dev/sda:0-7 /dev/sdb:0-7
1425
1426       Create a RAID5 LV with a usable size of 5 GiB, 3 stripes, a stripe size
1427       of 64 KiB, using a total of 4 devices (including one for parity).
1428       lvcreate --type raid5 -L 5G -i 3 -I 64 -n mylv vg00
1429
1430       Create a RAID5 LV using all of the free space in the  VG  and  spanning
1431       all  the  PVs  in  the VG (note that the command will fail if there are
1432       more than 8 PVs in the VG, in which case -i 7 must be used  to  get  to
1433       the current maximum of 8 devices including parity for RaidLVs).
1434       lvcreate --config allocation/raid_stripe_all_devices=1
1435              --type raid5 -l 100%FREE -n mylv vg00
1436
1437       Create  RAID10 LV with a usable size of 5 GiB, using 2 stripes, each on
1438       a two-image mirror. (Note that the -i and -m arguments  behave  differ‐
1439       ently:  -i  specifies the total number of stripes, but -m specifies the
1440       number of images in addition to the first image).
1441       lvcreate --type raid10 -L 5G -i 2 -m 1 -n mylv vg00
1442
1443       Create a 1 TiB thin LV mythin, with 256 GiB thinpool tpool0 in vg00.
1444       lvcreate -T -V 1T --size 256G --name mythin vg00/tpool0
1445
1446       Create a 1 TiB thin LV, first creating a new thin pool  for  it,  where
1447       the thin pool has 100 MiB of space, uses 2 stripes, has a 64 KiB stripe
1448       size, and 256 KiB chunk size.
1449       lvcreate --type thin --name mylv --thinpool mypool
1450              -V 1t -L 100m -i 2 -I 64 -c 256 vg00
1451
1452       Create a thin snapshot of a thin LV (the size option must not be  used,
1453       otherwise a copy-on-write snapshot would be created).
1454       lvcreate --snapshot --name mysnap vg00/thinvol
1455
1456       Create  a  thin  snapshot  of  the read-only inactive LV named "origin"
1457       which becomes an external origin for the thin snapshot LV.
1458       lvcreate --snapshot --name mysnap --thinpool mypool vg00/origin
1459
1460       Create a cache pool from a fast physical device.  The  cache  pool  can
1461       then be used to cache an LV.
1462       lvcreate --type cache-pool -L 1G -n my_cpool vg00 /dev/fast1
1463
1464       Create  a  cache  LV, first creating a new origin LV on a slow physical
1465       device, then combining the new origin LV with an existing cache pool.
1466       lvcreate --type cache --cachepool my_cpool
1467              -L 100G -n mylv vg00 /dev/slow1
1468
1469       Create a VDO LV vdo0 with VDOPoolLV size of 10 GiB and name vpool1.
1470       lvcreate --vdo --size 10G --name vdo0 vg00/vpool1
1471

SEE ALSO

1473       lvm(8), lvm.conf(5), lvmconfig(8), lvmdevices(8),
1474
1475       pvchange(8), pvck(8), pvcreate(8), pvdisplay(8), pvmove(8),
1476       pvremove(8), pvresize(8), pvs(8), pvscan(8),
1477
1478       vgcfgbackup(8), vgcfgrestore(8), vgchange(8), vgck(8), vgcreate(8),
1479       vgconvert(8), vgdisplay(8), vgexport(8), vgextend(8), vgimport(8),
1480       vgimportclone(8), vgimportdevices(8), vgmerge(8), vgmknodes(8),
1481       vgreduce(8), vgremove(8), vgrename(8), vgs(8), vgscan(8), vgsplit(8),
1482
1483       lvcreate(8), lvchange(8), lvconvert(8), lvdisplay(8), lvextend(8),
1484       lvreduce(8), lvremove(8), lvrename(8), lvresize(8), lvs(8), lvscan(8),
1485
1486       lvm-fullreport(8), lvm-lvpoll(8), blkdeactivate(8), lvmdump(8),
1487
1488       dmeventd(8), lvmpolld(8), lvmlockd(8), lvmlockctl(8), cmirrord(8),
1489       lvmdbusd(8), fsadm(8),
1490
1491       lvmsystemid(7), lvmreport(7), lvmcache(7), lvmraid(7), lvmthin(7),
1492       lvmvdo(7), lvmautoactivation(7)
1493
1494
1495
1496
1497Red Hat, Inc.          LVM TOOLS 2.03.22(2) (2023-08-02)           LVCREATE(8)
Impressum