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           --discards passdown|nopassdown|ignore
34           --driverloaded y|n
35           --errorwhenfull y|n
36        -l|--extents Number[PERCENT]
37        -h|--help
38        -K|--ignoreactivationskip
39           --ignoremonitoring
40           --lockopt String
41           --longhelp
42        -j|--major Number
43           --[raid]maxrecoveryrate Size[k|UNIT]
44           --metadataprofile String
45           --minor Number
46           --[raid]minrecoveryrate Size[k|UNIT]
47           --mirrorlog core|disk
48        -m|--mirrors Number
49           --monitor y|n
50        -n|--name String
51           --nolocking
52           --nosync
53           --noudevsync
54        -p|--permission rw|r
55        -M|--persistent y|n
56           --poolmetadatasize Size[m|UNIT]
57           --poolmetadataspare y|n
58           --profile String
59        -q|--quiet
60           --raidintegrity y|n
61           --raidintegrityblocksize Number
62           --raidintegritymode String
63        -r|--readahead auto|none|Number
64        -R|--regionsize Size[m|UNIT]
65           --reportformat basic|json
66        -k|--setactivationskip y|n
67        -L|--size Size[m|UNIT]
68        -s|--snapshot
69        -i|--stripes Number
70        -I|--stripesize Size[k|UNIT]
71        -t|--test
72        -T|--thin
73           --thinpool LV
74           --type linear|striped|snapshot|mir‐
75       ror|raid|thin|cache|vdo|thin-pool|cache-pool|vdo-pool
76           --vdo
77           --vdopool LV
78        -v|--verbose
79           --version
80        -V|--virtualsize Size[m|UNIT]
81        -W|--wipesignatures y|n
82        -y|--yes
83        -Z|--zero y|n
84

DESCRIPTION

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

USAGE

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

OPTIONS

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

VARIABLES

897       VG
898              Volume Group name.  See lvm(8) for valid names.   For  lvcreate,
899              the  required  VG positional arg may be omitted when the VG name
900              is included in another option, e.g. --name VG/LV.
901
902       LV
903              Logical Volume name.  See lvm(8) for valid names.  An  LV  posi‐
904              tional  arg  generally  includes  the  VG name and LV name, e.g.
905              VG/LV.  LV followed by _<type> indicates that an LV of the given
906              type is required. (raid represents raid<N> type)
907
908       PV
909              Physical  Volume  name,  a device path under /dev.  For commands
910              managing physical extents, a PV positional arg generally accepts
911              a suffix indicating a range (or multiple ranges) of physical ex‐
912              tents (PEs). When the first PE is omitted, it  defaults  to  the
913              start of the device, and when the last PE is omitted it defaults
914              to end.  Start and end range (inclusive):  PV[:PE-PE]...   Start
915              and length range (counting from 0): PV[:PE+PE]...
916
917       String
918              See the option description for information about the string con‐
919              tent.
920
921       Size[UNIT]
922              Size is an input number that accepts an  optional  unit.   Input
923              units are always treated as base two values, regardless of capi‐
924              talization, e.g. 'k' and 'K' both refer to  1024.   The  default
925              input unit is specified by letter, followed by |UNIT.  UNIT rep‐
926              resents other possible input units:  bBsSkKmMgGtTpPeE.   b|B  is
927              bytes,  s|S is sectors of 512 bytes, k|K is KiB, m|M is MiB, g|G
928              is GiB, t|T is TiB, p|P is PiB, e|E is EiB.  (This should not be
929              confused  with the output control --units, where capital letters
930              mean multiple of 1000.)
931

ENVIRONMENT VARIABLES

933       See lvm(8) for information about environment  variables  used  by  lvm.
934       For example, LVM_VG_NAME can generally be substituted for a required VG
935       parameter.
936

ADVANCED USAGE

938       Alternate command forms, advanced command usage,  and  listing  of  all
939       valid syntax for completeness.
940
941       Create an LV that returns errors when used.
942
943       lvcreate --type error -L|--size Size[m|UNIT] VG
944           [ -l|--extents Number[PERCENT] ]
945           [ COMMON_OPTIONS ]
946       -
947
948       Create an LV that returns zeros when read.
949
950       lvcreate --type zero -L|--size Size[m|UNIT] VG
951           [ -l|--extents Number[PERCENT] ]
952           [ COMMON_OPTIONS ]
953       -
954
955       Create a linear LV.
956
957       lvcreate --type linear -L|--size Size[m|UNIT] VG
958           [ -l|--extents Number[PERCENT] ]
959           [ COMMON_OPTIONS ]
960           [ PV ... ]
961       -
962
963       Create a striped LV (also see lvcreate --stripes).
964
965       lvcreate --type striped -L|--size Size[m|UNIT] VG
966           [ -l|--extents Number[PERCENT] ]
967           [ -i|--stripes Number ]
968           [ -I|--stripesize Size[k|UNIT] ]
969           [ COMMON_OPTIONS ]
970           [ PV ... ]
971       -
972
973       Create a mirror LV (also see --type raid1).
974
975       lvcreate --type mirror -L|--size Size[m|UNIT] VG
976           [ -l|--extents Number[PERCENT] ]
977           [ -m|--mirrors Number ]
978           [ -R|--regionsize Size[m|UNIT] ]
979           [ -i|--stripes Number ]
980           [ -I|--stripesize Size[k|UNIT] ]
981           [    --mirrorlog core|disk ]
982           [ COMMON_OPTIONS ]
983           [ PV ... ]
984       -
985
986       Create a COW snapshot LV of an origin LV
987       (also see --snapshot).
988
989       lvcreate --type snapshot -L|--size Size[m|UNIT] LV
990           [ -l|--extents Number[PERCENT] ]
991           [ -s|--snapshot ]
992           [ -i|--stripes Number ]
993           [ -I|--stripesize Size[k|UNIT] ]
994           [ -c|--chunksize Size[k|UNIT] ]
995           [ COMMON_OPTIONS ]
996           [ PV ... ]
997       -
998
999       Create a sparse COW snapshot LV of a virtual origin LV
1000       (also see --snapshot).
1001
1002       lvcreate --type snapshot -L|--size Size[m|UNIT]
1003             -V|--virtualsize Size[m|UNIT] VG
1004           [ -l|--extents Number[PERCENT] ]
1005           [ -s|--snapshot ]
1006           [ -c|--chunksize Size[k|UNIT] ]
1007           [ COMMON_OPTIONS ]
1008           [ PV ... ]
1009       -
1010
1011       Create a sparse COW snapshot LV of a virtual origin LV.
1012
1013       lvcreate -s|--snapshot -L|--size Size[m|UNIT]
1014             -V|--virtualsize Size[m|UNIT] VG
1015           [ -l|--extents Number[PERCENT] ]
1016           [ -c|--chunksize Size[k|UNIT] ]
1017           [    --type snapshot ]
1018           [ COMMON_OPTIONS ]
1019           [ PV ... ]
1020       -
1021
1022       Create a thin pool (infers --type thin-pool).
1023
1024       lvcreate -T|--thin -L|--size Size[m|UNIT] VG
1025           [ -l|--extents Number[PERCENT] ]
1026           [ -c|--chunksize Size[k|UNIT] ]
1027           [ -i|--stripes Number ]
1028           [ -I|--stripesize Size[k|UNIT] ]
1029           [    --type thin-pool ]
1030           [    --poolmetadatasize Size[m|UNIT] ]
1031           [    --poolmetadataspare y|n ]
1032           [    --discards passdown|nopassdown|ignore ]
1033           [    --errorwhenfull y|n ]
1034           [ COMMON_OPTIONS ]
1035           [ PV ... ]
1036       -
1037
1038       Create a thin pool named by the --thinpool arg
1039       (infers --type thin-pool).
1040
1041       lvcreate -L|--size Size[m|UNIT] --thinpool LV_new VG
1042           [ -l|--extents Number[PERCENT] ]
1043           [ -T|--thin ]
1044           [ -c|--chunksize Size[k|UNIT] ]
1045           [ -i|--stripes Number ]
1046           [ -I|--stripesize Size[k|UNIT] ]
1047           [    --type thin-pool ]
1048           [    --poolmetadatasize Size[m|UNIT] ]
1049           [    --poolmetadataspare y|n ]
1050           [    --discards passdown|nopassdown|ignore ]
1051           [    --errorwhenfull y|n ]
1052           [ COMMON_OPTIONS ]
1053           [ PV ... ]
1054       -
1055
1056       Create a cache pool named by the --cachepool arg
1057       (variant, uses --cachepool in place of --name).
1058
1059       lvcreate --type cache-pool -L|--size Size[m|UNIT]
1060             --cachepool LV_new VG
1061           [ -l|--extents Number[PERCENT] ]
1062           [ -H|--cache ]
1063           [ -c|--chunksize Size[k|UNIT] ]
1064           [    --poolmetadatasize Size[m|UNIT] ]
1065           [    --poolmetadataspare y|n ]
1066           [    --cachemode writethrough|writeback|passthrough ]
1067           [    --cachepolicy String ]
1068           [    --cachesettings String ]
1069           [    --cachemetadataformat auto|1|2 ]
1070           [ COMMON_OPTIONS ]
1071           [ PV ... ]
1072       -
1073
1074       Create a thin LV in a thin pool.
1075
1076       lvcreate --type thin -V|--virtualsize Size[m|UNIT]
1077             --thinpool LV_thinpool VG
1078           [ -T|--thin ]
1079           [ -c|--chunksize Size[k|UNIT] ]
1080           [    --poolmetadatasize Size[m|UNIT] ]
1081           [    --poolmetadataspare y|n ]
1082           [    --discards passdown|nopassdown|ignore ]
1083           [    --errorwhenfull y|n ]
1084           [ COMMON_OPTIONS ]
1085       -
1086
1087       Create a thin LV in a thin pool named in the first arg
1088       (variant, also see --thinpool for naming pool).
1089
1090       lvcreate --type thin -V|--virtualsize Size[m|UNIT] LV_thinpool
1091           [ -T|--thin ]
1092           [    --discards passdown|nopassdown|ignore ]
1093           [    --errorwhenfull y|n ]
1094           [ COMMON_OPTIONS ]
1095       -
1096
1097       Create a thin LV in the thin pool named in the first arg
1098       (variant, infers --type thin, also see --thinpool for
1099       naming pool.)
1100
1101       lvcreate -V|--virtualsize Size[m|UNIT] LV_thinpool
1102           [ -T|--thin ]
1103           [    --type thin ]
1104           [    --discards passdown|nopassdown|ignore ]
1105           [    --errorwhenfull y|n ]
1106           [ COMMON_OPTIONS ]
1107       -
1108
1109       Create a thin LV that is a snapshot of an existing thin LV.
1110
1111       lvcreate --type thin LV_thin
1112           [ -T|--thin ]
1113           [    --discards passdown|nopassdown|ignore ]
1114           [    --errorwhenfull y|n ]
1115           [ COMMON_OPTIONS ]
1116       -
1117
1118       Create a thin LV that is a snapshot of an existing thin LV
1119       (infers --type thin).
1120
1121       lvcreate -T|--thin LV_thin
1122           [    --type thin ]
1123           [    --discards passdown|nopassdown|ignore ]
1124           [    --errorwhenfull y|n ]
1125           [ COMMON_OPTIONS ]
1126       -
1127
1128       Create a thin LV that is a snapshot of an external origin LV
1129       (infers --type thin).
1130
1131       lvcreate -s|--snapshot --thinpool LV_thinpool LV
1132           [    --type thin ]
1133           [    --discards passdown|nopassdown|ignore ]
1134           [    --errorwhenfull y|n ]
1135           [ COMMON_OPTIONS ]
1136       -
1137
1138       Create a VDO LV with VDO pool.
1139
1140       lvcreate --vdo -L|--size Size[m|UNIT] VG
1141           [ -l|--extents Number[PERCENT] ]
1142           [ -V|--virtualsize Size[m|UNIT] ]
1143           [ -i|--stripes Number ]
1144           [ -I|--stripesize Size[k|UNIT] ]
1145           [    --vdopool LV_new ]
1146           [    --compression y|n ]
1147           [    --deduplication y|n ]
1148           [ COMMON_OPTIONS ]
1149           [ PV ... ]
1150       -
1151
1152       Create a VDO LV with VDO pool.
1153
1154       lvcreate --vdopool LV_new -L|--size Size[m|UNIT] VG
1155           [ -l|--extents Number[PERCENT] ]
1156           [ -V|--virtualsize Size[m|UNIT] ]
1157           [ -i|--stripes Number ]
1158           [ -I|--stripesize Size[k|UNIT] ]
1159           [    --vdo ]
1160           [    --type vdo ]
1161           [    --compression y|n ]
1162           [    --deduplication y|n ]
1163           [ COMMON_OPTIONS ]
1164           [ PV ... ]
1165       -
1166
1167       Create a thin LV, first creating a thin pool for it,
1168       where the new thin pool is named by the --thinpool arg
1169       (variant, infers --type thin).
1170
1171       lvcreate -V|--virtualsize Size[m|UNIT] -L|--size Size[m|UNIT]
1172             --thinpool LV_new
1173           [ -l|--extents Number[PERCENT] ]
1174           [ -T|--thin ]
1175           [ -c|--chunksize Size[k|UNIT] ]
1176           [ -i|--stripes Number ]
1177           [ -I|--stripesize Size[k|UNIT] ]
1178           [    --poolmetadatasize Size[m|UNIT] ]
1179           [    --poolmetadataspare y|n ]
1180           [    --discards passdown|nopassdown|ignore ]
1181           [    --errorwhenfull y|n ]
1182           [ COMMON_OPTIONS ]
1183           [ PV ... ]
1184       -
1185
1186       Create a thin LV, first creating a thin pool for it,
1187       where the new thin pool is named by the --thinpool arg
1188       (variant, infers --type thin).
1189
1190       lvcreate -V|--virtualsize Size[m|UNIT] -L|--size Size[m|UNIT]
1191             --thinpool LV_new VG
1192           [ -l|--extents Number[PERCENT] ]
1193           [ -T|--thin ]
1194           [ -c|--chunksize Size[k|UNIT] ]
1195           [ -i|--stripes Number ]
1196           [ -I|--stripesize Size[k|UNIT] ]
1197           [    --poolmetadatasize Size[m|UNIT] ]
1198           [    --poolmetadataspare y|n ]
1199           [    --discards passdown|nopassdown|ignore ]
1200           [    --errorwhenfull y|n ]
1201           [ COMMON_OPTIONS ]
1202           [ PV ... ]
1203       -
1204
1205       Create a thin LV, first creating a thin pool for it,
1206       where the new thin pool is named in the first arg,
1207       or the new thin pool name is generated when the first
1208       arg is a VG name.
1209
1210       lvcreate --type thin -V|--virtualsize Size[m|UNIT]
1211             -L|--size Size[m|UNIT] VG|LV_new
1212           [ -l|--extents Number[PERCENT] ]
1213           [ -T|--thin ]
1214           [ -c|--chunksize Size[k|UNIT] ]
1215           [ -i|--stripes Number ]
1216           [ -I|--stripesize Size[k|UNIT] ]
1217           [    --poolmetadatasize Size[m|UNIT] ]
1218           [    --poolmetadataspare y|n ]
1219           [    --discards passdown|nopassdown|ignore ]
1220           [    --errorwhenfull y|n ]
1221           [ COMMON_OPTIONS ]
1222           [ PV ... ]
1223       -
1224
1225       Create a thin LV, first creating a thin pool for it,
1226       where the new thin pool is named in the first arg,
1227       or the new thin pool name is generated when the first
1228       arg is a VG name (variant, infers --type thin).
1229
1230       lvcreate -T|--thin -V|--virtualsize Size[m|UNIT]
1231             -L|--size Size[m|UNIT] VG|LV_new
1232           [ -l|--extents Number[PERCENT] ]
1233           [ -c|--chunksize Size[k|UNIT] ]
1234           [ -i|--stripes Number ]
1235           [ -I|--stripesize Size[k|UNIT] ]
1236           [    --poolmetadatasize Size[m|UNIT] ]
1237           [    --poolmetadataspare y|n ]
1238           [    --discards passdown|nopassdown|ignore ]
1239           [    --errorwhenfull y|n ]
1240           [ COMMON_OPTIONS ]
1241           [ PV ... ]
1242       -
1243
1244       Create a thin LV, first creating a thin pool for it
1245       (infers --type thin).
1246       Create a sparse snapshot of a virtual origin LV
1247       (infers --type snapshot).
1248       Chooses --type thin or --type snapshot according to
1249       config setting sparse_segtype_default.
1250
1251       lvcreate -L|--size Size[m|UNIT] -V|--virtualsize Size[m|UNIT] VG
1252           [ -l|--extents Number[PERCENT] ]
1253           [ -s|--snapshot ]
1254           [ -c|--chunksize Size[k|UNIT] ]
1255           [ -i|--stripes Number ]
1256           [ -I|--stripesize Size[k|UNIT] ]
1257           [    --type snapshot ]
1258           [    --poolmetadatasize Size[m|UNIT] ]
1259           [    --poolmetadataspare y|n ]
1260           [    --discards passdown|nopassdown|ignore ]
1261           [    --errorwhenfull y|n ]
1262           [ COMMON_OPTIONS ]
1263           [ PV ... ]
1264       -
1265
1266       Create a new LV, then attach the specified cachepool
1267       which converts the new LV to type cache
1268       (variant, infers --type cache.)
1269
1270       lvcreate -L|--size Size[m|UNIT] --cachepool LV_cachepool VG
1271           [ -l|--extents Number[PERCENT] ]
1272           [ -H|--cache ]
1273           [ -c|--chunksize Size[k|UNIT] ]
1274           [ -i|--stripes Number ]
1275           [ -I|--stripesize Size[k|UNIT] ]
1276           [    --type cache ]
1277           [    --cachemode writethrough|writeback|passthrough ]
1278           [    --cachepolicy String ]
1279           [    --cachesettings String ]
1280           [    --cachemetadataformat auto|1|2 ]
1281           [ COMMON_OPTIONS ]
1282           [ PV ... ]
1283       -
1284
1285       Create a new LV, then attach the specified cachepool
1286       which converts the new LV to type cache.
1287       (variant, also use --cachepool).
1288
1289       lvcreate --type cache -L|--size Size[m|UNIT] LV_cachepool
1290           [ -l|--extents Number[PERCENT] ]
1291           [ -H|--cache ]
1292           [ -c|--chunksize Size[k|UNIT] ]
1293           [ -i|--stripes Number ]
1294           [ -I|--stripesize Size[k|UNIT] ]
1295           [    --poolmetadatasize Size[m|UNIT] ]
1296           [    --poolmetadataspare y|n ]
1297           [    --cachemode writethrough|writeback|passthrough ]
1298           [    --cachepolicy String ]
1299           [    --cachesettings String ]
1300           [    --cachemetadataformat auto|1|2 ]
1301           [ COMMON_OPTIONS ]
1302           [ PV ... ]
1303       -
1304
1305       When the LV arg is a cachepool, then create a new LV and
1306       attach the cachepool arg to it.
1307       (variant, use --type cache and --cachepool.)
1308       When the LV arg is not a cachepool, then create a new cachepool
1309       and attach it to the LV arg (alternative, use lvconvert.)
1310
1311       lvcreate -H|--cache -L|--size Size[m|UNIT] LV
1312           [ -l|--extents Number[PERCENT] ]
1313           [ -c|--chunksize Size[k|UNIT] ]
1314           [ -i|--stripes Number ]
1315           [ -I|--stripesize Size[k|UNIT] ]
1316           [    --cachemode writethrough|writeback|passthrough ]
1317           [    --cachepolicy String ]
1318           [    --cachesettings String ]
1319           [    --cachemetadataformat auto|1|2 ]
1320           [    --poolmetadatasize Size[m|UNIT] ]
1321           [    --poolmetadataspare y|n ]
1322           [ COMMON_OPTIONS ]
1323           [ PV ... ]
1324       -
1325
1326

EXAMPLES

1328       Create a striped LV with 3 stripes, a stripe size of 8KiB and a size of
1329       100MiB.  The LV name is chosen by lvcreate.
1330       lvcreate -i 3 -I 8 -L 100m vg00
1331
1332       Create a raid1 LV with two images, and a useable size of 500 MiB.  This
1333       operation  requires  two devices, one for each mirror image. RAID meta‐
1334       data (superblock and bitmap) is also included on the two devices.
1335       lvcreate --type raid1 -m1 -L 500m -n mylv vg00
1336
1337       Create a mirror LV with two images, and a  useable  size  of  500  MiB.
1338       This  operation  requires  three devices: two for mirror images and one
1339       for a disk log.
1340       lvcreate --type mirror -m1 -L 500m -n mylv vg00
1341
1342       Create a mirror LV with 2 images, and a useable size of 500 MiB.   This
1343       operation requires 2 devices because the log is in memory.
1344       lvcreate --type mirror -m1 --mirrorlog core -L 500m -n mylv vg00
1345
1346       Create a copy-on-write snapshot of an LV:
1347       lvcreate --snapshot --size 100m --name mysnap vg00/mylv
1348
1349       Create  a copy-on-write snapshot with a size sufficient for overwriting
1350       20% of the size of the original LV.
1351       lvcreate -s -l 20%ORIGIN -n mysnap vg00/mylv
1352
1353       Create a sparse LV with 1TiB of virtual space, and  actual  space  just
1354       under 100MiB.
1355       lvcreate --snapshot --virtualsize 1t --size 100m --name mylv vg00
1356
1357       Create a linear LV with a usable size of 64MiB on specific physical ex‐
1358       tents.
1359       lvcreate -L 64m -n mylv vg00 /dev/sda:0-7 /dev/sdb:0-7
1360
1361       Create a RAID5 LV with a usable size of 5GiB, 3 stripes, a stripe  size
1362       of 64KiB, using a total of 4 devices (including one for parity).
1363       lvcreate --type raid5 -L 5G -i 3 -I 64 -n mylv vg00
1364
1365       Create  a  RAID5  LV using all of the free space in the VG and spanning
1366       all the PVs in the VG (note that the command will  fail  if  there  are
1367       more  than  8  PVs in the VG, in which case -i 7 must be used to get to
1368       the current maximum of 8 devices including parity for RaidLVs).
1369       lvcreate --config allocation/raid_stripe_all_devices=1
1370              --type raid5 -l 100%FREE -n mylv vg00
1371
1372       Create RAID10 LV with a usable size of 5GiB, using 2 stripes, each on a
1373       two-image  mirror.  (Note  that  the -i and -m arguments behave differ‐
1374       ently: -i specifies the total number of stripes, but -m  specifies  the
1375       number of images in addition to the first image).
1376       lvcreate --type raid10 -L 5G -i 2 -m 1 -n mylv vg00
1377
1378       Create a 1TiB thin LV mythin, with 256GiB thinpool tpool0 in vg00.
1379       lvcreate --T --size 256G --name mythin vg00/tpool0
1380
1381       Create a 1TiB thin LV, first creating a new thin pool for it, where the
1382       thin pool has 100MiB of space, uses 2 stripes, has a 64KiB stripe size,
1383       and 256KiB chunk size.
1384       lvcreate --type thin --name mylv --thinpool mypool
1385              -V 1t -L 100m -i 2 -I 64 -c 256 vg00
1386
1387       Create  a thin snapshot of a thin LV (the size option must not be used,
1388       otherwise a copy-on-write snapshot would be created).
1389       lvcreate --snapshot --name mysnap vg00/thinvol
1390
1391       Create a thin snapshot of the  read-only  inactive  LV  named  "origin"
1392       which becomes an external origin for the thin snapshot LV.
1393       lvcreate --snapshot --name mysnap --thinpool mypool vg00/origin
1394
1395       Create  a  cache  pool  from a fast physical device. The cache pool can
1396       then be used to cache an LV.
1397       lvcreate --type cache-pool -L 1G -n my_cpool vg00 /dev/fast1
1398
1399       Create a cache LV, first creating a new origin LV on  a  slow  physical
1400       device, then combining the new origin LV with an existing cache pool.
1401       lvcreate --type cache --cachepool my_cpool
1402              -L 100G -n mylv vg00 /dev/slow1
1403
1404       Create a VDO LV vdo0 with VDOPoolLV size of 10GiB and name vpool1.
1405       lvcreate --vdo --size 10G --name vdo0 vg00/vpool1
1406

SEE ALSO

1408       lvm(8) lvm.conf(5) lvmconfig(8)
1409
1410       pvchange(8)  pvck(8)  pvcreate(8)  pvdisplay(8)  pvmove(8)  pvremove(8)
1411       pvresize(8) pvs(8) pvscan(8)
1412
1413       vgcfgbackup(8) vgcfgrestore(8) vgchange(8) vgck(8)  vgcreate(8)  vgcon‐
1414       vert(8)  vgdisplay(8)  vgexport(8)  vgextend(8)  vgimport(8)  vgimport‐
1415       clone(8) vgmerge(8) vgmknodes(8)  vgreduce(8)  vgremove(8)  vgrename(8)
1416       vgs(8) vgscan(8) vgsplit(8)
1417
1418       lvcreate(8)  lvchange(8)  lvconvert(8)  lvdisplay(8)  lvextend(8) lvre‐
1419       duce(8) lvremove(8) lvrename(8) lvresize(8) lvs(8) lvscan(8)
1420
1421       lvm-fullreport(8) lvm-lvpoll(8) lvm2-activation-generator(8) blkdeacti‐
1422       vate(8) lvmdump(8)
1423
1424       dmeventd(8)  lvmpolld(8)  lvmlockd(8)  lvmlockctl(8)  cmirrord(8) lvmd‐
1425       busd(8)
1426
1427       lvmsystemid(7) lvmreport(7) lvmraid(7) lvmthin(7) lvmcache(7)
1428
1429
1430
1431Red Hat, Inc.          LVM TOOLS 2.03.11(2) (2021-01-08)           LVCREATE(8)
Impressum