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
87       allocating  logical  extents  from  the  VG's free physical extents. If
88       there is not enough free space, the VG can be extended with  other  PVs
89       (vgextend(8)),  or existing LVs can be reduced or removed (lvremove(8),
90       lvreduce(8).)
91
92       To control which PVs a new LV will use, specify  one  or  more  PVs  as
93       position  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
123       options,  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
435              option 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
439              information 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.
451              inherit 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
517              default 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.
538              Default 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,
568              device-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
581              denotes 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
688              notification from udev. It will continue irrespective of any
689              possible udev processing in the background. Only use this if
690              udev is not running or has rules that ignore the devices LVM
691              creates.
692
693       -p|--permission rw|r
694              Set access permission to read only r or read and write rw.
695
696       -M|--persistent y|n
697              When yes, makes the specified minor number persistent.
698
699       --poolmetadatasize Size[m|UNIT]
700              Specifies the size of the new pool metadata LV.
701
702       --poolmetadataspare y|n
703              Enable or disable the automatic creation and management of a
704              spare pool metadata LV in the VG. A spare metadata LV is
705              reserved space that can be used when repairing a pool.
706
707       --profile String
708              An alias for --commandprofile or --metadataprofile, depending on
709              the command.
710
711       -q|--quiet ...
712              Suppress output and log messages. Overrides --debug and --ver‐
713              bose.  Repeat once to also suppress any prompts with answer
714              'no'.
715
716       --raidintegrity y|n
717              Enable or disable data integrity checksums for raid images.
718
719       --raidintegrityblocksize Number
720              The block size to use for dm-integrity on raid images.  The
721              integrity block size should usually match the device logical
722              block size, or the file system block size.  It may be less than
723              the file system block size, but not less than the device logical
724              block size.  Possible values: 512, 1024, 2048, 4096.
725
726       --raidintegritymode String
727              Use a journal (default) or bitmap for keeping integrity check‐
728              sums consistent in case of a crash. The bitmap areas are recal‐
729              culated after a crash, so corruption in those areas would not be
730              detected. A journal does not have this problem.  The journal
731              mode doubles writes to storage, but can improve performance for
732              scattered writes packed into a single journal write.  bitmap
733              mode can in theory achieve full write throughput of the device,
734              but would not benefit from the potential scattered write opti‐
735              mization.
736
737       -r|--readahead auto|none|Number
738              Sets read ahead sector count of an LV.  auto is the default
739              which allows the kernel to choose a suitable value automati‐
740              cally.  none is equivalent to zero.
741
742       -R|--regionsize Size[m|UNIT]
743              Size of each raid or mirror synchronization region.  lvm.conf
744              activation/raid_region_size can be used to configure a default.
745
746       --reportformat basic|json
747              Overrides current output format for reports which is defined
748              globally by the report/output_format setting in lvm.conf.  basic
749              is the original format with columns and rows.  If there is more
750              than one report per command, each report is prefixed with the
751              report name for identification. json produces report output in
752              JSON format. See lvmreport(7) for more information.
753
754       -k|--setactivationskip y|n
755              Persistently sets (yes) or clears (no) the "activation skip"
756              flag on an LV.  An LV with this flag set is not activated unless
757              the --ignoreactivationskip option is used by the activation com‐
758              mand.  This flag is set by default on new thin snapshot LVs.
759              The flag is not applied to deactivation.  The current value of
760              the flag is indicated in the lvs lv_attr bits.
761
762       -L|--size Size[m|UNIT]
763              Specifies the size of the new LV.  The --size and --extents
764              options are alternate methods of specifying size.  The total
765              number of physical extents used will be greater when redundant
766              data is needed for RAID levels.
767
768       -s|--snapshot
769              Create a snapshot. Snapshots provide a "frozen image" of an ori‐
770              gin LV.  The snapshot LV can be used, e.g. for backups, while
771              the origin LV continues to be used.  This option can create a
772              COW (copy on write) snapshot, or a thin snapshot (in a thin
773              pool.)  Thin snapshots are created when the origin is a thin LV
774              and the size option is NOT specified. Thin snapshots share the
775              same blocks in the thin pool, and do not allocate new space from
776              the VG.  Thin snapshots are created with the "activation skip"
777              flag, see --setactivationskip.  A thin snapshot of a non-thin
778              "external origin" LV is created when a thin pool is specified.
779              Unprovisioned blocks in the thin snapshot LV are read from the
780              external origin LV. The external origin LV must be read-only.
781              See lvmthin(7) for more information about LVM thin provisioning.
782              COW snapshots are created when a size is specified. The size is
783              allocated from space in the VG, and is the amount of space that
784              can be used for saving COW blocks as writes occur to the origin
785              or snapshot.  The size chosen should depend upon the amount of
786              writes that are expected; often 20% of the origin LV is enough.
787              If COW space runs low, it can be extended with lvextend (shrink‐
788              ing is also allowed with lvreduce.)  A small amount of the COW
789              snapshot LV size is used to track COW block locations, so the
790              full size is not available for COW data blocks.  Use lvs to
791              check how much space is used, and see --monitor to to automati‐
792              cally extend the size to avoid running out of space.
793
794       -i|--stripes Number
795              Specifies the number of stripes in a striped LV. This is the
796              number of PVs (devices) that a striped LV is spread across. Data
797              that appears sequential in the LV is spread across multiple
798              devices in units of the stripe size (see --stripesize). This
799              does not change existing allocated space, but only applies to
800              space being allocated by the command.  When creating a RAID
801              4/5/6 LV, this number does not include the extra devices that
802              are required for parity. The largest number depends on the RAID
803              type (raid0: 64, raid10: 32, raid4/5: 63, raid6: 62), and when
804              unspecified, the default depends on the RAID type (raid0: 2,
805              raid10: 2, raid4/5: 3, raid6: 5.)  To stripe a new raid LV
806              across all PVs by default, see lvm.conf alloca‐
807              tion/raid_stripe_all_devices.
808
809       -I|--stripesize Size[k|UNIT]
810              The amount of data that is written to one device before moving
811              to the next in a striped LV.
812
813       -t|--test
814              Run in test mode. Commands will not update metadata.  This is
815              implemented by disabling all metadata writing but nevertheless
816              returning success to the calling function. This may lead to
817              unusual error messages in multi-stage operations if a tool
818              relies on reading back metadata it believes has changed but
819              hasn't.
820
821       -T|--thin
822              Specifies the command is handling a thin LV or thin pool.  See
823              --type thin, --type thin-pool, and --virtualsize.  See
824              lvmthin(7) for more information about LVM thin provisioning.
825
826       --thinpool LV
827              The name of a thin pool LV.
828
829       --type linear|striped|snapshot|mir‐
830              ror|raid|thin|cache|vdo|thin-pool|cache-pool|vdo-pool
831              The LV type, also known as "segment type" or "segtype".  See
832              usage descriptions for the specific ways to use these types.
833              For more information about redundancy and performance (raid<N>,
834              mirror, striped, linear) see lvmraid(7).  For thin provisioning
835              (thin, thin-pool) see lvmthin(7).  For performance caching
836              (cache, cache-pool) see lvmcache(7).  For copy-on-write snap‐
837              shots (snapshot) see usage definitions.  For VDO (vdo) see
838              lvmvdo(7).  Several commands omit an explicit type option
839              because the type is inferred from other options or shortcuts
840              (e.g. --stripes, --mirrors, --snapshot, --virtualsize, --thin,
841              --cache, --vdo).  Use inferred types with care because it can
842              lead to unexpected results.
843
844       --vdo
845              Specifies the command is handling VDO LV.  See --type vdo.  See
846              lvmvdo(7) for more information about VDO usage.
847
848       --vdopool LV
849              The name of a VDO pool LV.  See lvmvdo(7) for more information
850              about VDO usage.
851
852       -v|--verbose ...
853              Set verbose level. Repeat from 1 to 4 times to increase the
854              detail of messages sent to stdout and stderr.
855
856       --version
857              Display version information.
858
859       -V|--virtualsize Size[m|UNIT]
860              The virtual size of a new thin LV.  See lvmthin(7) for more
861              information about LVM thin provisioning.  Using virtual size
862              (-V) and actual size (-L) together creates a sparse LV.
863              lvm.conf global/sparse_segtype_default determines the default
864              segment type used to create a sparse LV.  Anything written to a
865              sparse LV will be returned when reading from it.  Reading from
866              other areas of the LV will return blocks of zeros.  When using a
867              snapshot to create a sparse LV, a hidden virtual device is cre‐
868              ated using the zero target, and the LV has the suffix _vorigin.
869              Snapshots are less efficient than thin provisioning when creat‐
870              ing large sparse LVs (GiB).
871
872       -W|--wipesignatures y|n
873              Controls detection and subsequent wiping of signatures on new
874              LVs.  There is a prompt for each signature detected to confirm
875              its wiping (unless --yes is used to override confirmations.)
876              When not specified, signatures are wiped whenever zeroing is
877              done (see --zero). This behaviour can be configured with
878              lvm.conf allocation/wipe_signatures_when_zeroing_new_lvs.  If
879              blkid wiping is used (lvm.conf allocation/use_blkid_wiping) and
880              LVM is compiled with blkid wiping support, then the blkid(8)
881              library is used to detect the signatures (use blkid -k to list
882              the signatures that are recognized).  Otherwise, native LVM code
883              is used to detect signatures (only MD RAID, swap and LUKS signa‐
884              tures are detected in this case.)  The LV is not wiped if the
885              read only flag is set.
886
887       -y|--yes
888              Do not prompt for confirmation interactively but always assume
889              the answer yes. Use with extreme caution.  (For automatic no,
890              see -qq.)
891
892       -Z|--zero y|n
893              Controls zeroing of the first 4KiB of data in the new LV.
894              Default is y.  Snapshot COW volumes are always zeroed.  For thin
895              pools, this controls zeroing of provisioned blocks.  LV is not
896              zeroed if the read only flag is set.  Warning: trying to mount
897              an unzeroed LV can cause the system to hang.
898

VARIABLES

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

ENVIRONMENT VARIABLES

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

ADVANCED USAGE

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

EXAMPLES

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

SEE ALSO

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