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           --cachemetadataformat auto|1|2
19           --cachemode writethrough|writeback|passthrough
20           --cachepolicy String
21           --cachepool LV
22           --cachesettings String
23        -c|--chunksize Size[k|UNIT]
24           --commandprofile String
25           --compression y|n
26           --config String
27        -C|--contiguous y|n
28        -d|--debug
29           --deduplication y|n
30           --discards passdown|nopassdown|ignore
31           --driverloaded y|n
32           --errorwhenfull y|n
33        -l|--extents Number[PERCENT]
34        -h|--help
35        -K|--ignoreactivationskip
36           --ignoremonitoring
37           --lockopt String
38           --longhelp
39        -j|--major Number
40           --[raid]maxrecoveryrate Size[k|UNIT]
41           --metadataprofile String
42           --minor Number
43           --[raid]minrecoveryrate Size[k|UNIT]
44           --mirrorlog core|disk
45        -m|--mirrors Number
46           --monitor y|n
47        -n|--name String
48           --nolocking
49           --nosync
50           --noudevsync
51        -p|--permission rw|r
52        -M|--persistent y|n
53           --poolmetadatasize Size[m|UNIT]
54           --poolmetadataspare y|n
55           --profile String
56        -q|--quiet
57        -r|--readahead auto|none|Number
58        -R|--regionsize Size[m|UNIT]
59           --reportformat basic|json
60        -k|--setactivationskip y|n
61        -L|--size Size[m|UNIT]
62        -s|--snapshot
63        -i|--stripes Number
64        -I|--stripesize Size[k|UNIT]
65        -t|--test
66        -T|--thin
67           --thinpool LV
68           --type linear|striped|snapshot|mir‐
69       ror|raid|thin|cache|vdo|thin-pool|cache-pool|vdo-pool
70           --vdo
71           --vdopool LV
72        -v|--verbose
73           --version
74        -V|--virtualsize Size[m|UNIT]
75        -W|--wipesignatures y|n
76        -y|--yes
77        -Z|--zero y|n
78

DESCRIPTION

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

USAGE

128       Create a linear LV.
129
130       lvcreate -L|--size Size[m|UNIT] VG
131           [ -l|--extents Number[PERCENT] ]
132           [    --type linear ]
133           [ COMMON_OPTIONS ]
134           [ PV ... ]
135       -
136
137       Create a striped LV (infers --type striped).
138
139       lvcreate -i|--stripes Number -L|--size Size[m|UNIT] VG
140           [ -l|--extents Number[PERCENT] ]
141           [ -I|--stripesize Size[k|UNIT] ]
142           [ COMMON_OPTIONS ]
143           [ PV ... ]
144       -
145
146       Create a raid1 or mirror LV (infers --type raid1|mirror).
147
148       lvcreate -m|--mirrors Number -L|--size Size[m|UNIT] VG
149           [ -l|--extents Number[PERCENT] ]
150           [ -R|--regionsize Size[m|UNIT] ]
151           [    --mirrorlog core|disk ]
152           [    --[raid]minrecoveryrate Size[k|UNIT] ]
153           [    --[raid]maxrecoveryrate Size[k|UNIT] ]
154           [ COMMON_OPTIONS ]
155           [ PV ... ]
156       -
157
158       Create a raid LV (a specific raid level must be used, e.g. raid1).
159
160       lvcreate --type raid -L|--size Size[m|UNIT] VG
161           [ -l|--extents Number[PERCENT] ]
162           [ -m|--mirrors Number ]
163           [ -i|--stripes Number ]
164           [ -I|--stripesize Size[k|UNIT] ]
165           [ -R|--regionsize Size[m|UNIT] ]
166           [    --[raid]minrecoveryrate Size[k|UNIT] ]
167           [    --[raid]maxrecoveryrate Size[k|UNIT] ]
168           [ COMMON_OPTIONS ]
169           [ PV ... ]
170       -
171
172       Create a raid10 LV.
173
174       lvcreate -m|--mirrors Number -i|--stripes Number
175             -L|--size Size[m|UNIT] VG
176           [ -l|--extents Number[PERCENT] ]
177           [ -I|--stripesize Size[k|UNIT] ]
178           [ -R|--regionsize Size[m|UNIT] ]
179           [    --[raid]minrecoveryrate Size[k|UNIT] ]
180           [    --[raid]maxrecoveryrate Size[k|UNIT] ]
181           [ COMMON_OPTIONS ]
182           [ PV ... ]
183       -
184
185       Create a COW snapshot LV of an origin LV.
186
187       lvcreate -s|--snapshot -L|--size Size[m|UNIT] LV
188           [ -l|--extents Number[PERCENT] ]
189           [ -i|--stripes Number ]
190           [ -I|--stripesize Size[k|UNIT] ]
191           [ -c|--chunksize Size[k|UNIT] ]
192           [    --type snapshot ]
193           [ COMMON_OPTIONS ]
194           [ PV ... ]
195       -
196
197       Create a thin pool.
198
199       lvcreate --type thin-pool -L|--size Size[m|UNIT] VG
200           [ -l|--extents Number[PERCENT] ]
201           [ -c|--chunksize Size[k|UNIT] ]
202           [ -i|--stripes Number ]
203           [ -I|--stripesize Size[k|UNIT] ]
204           [    --thinpool LV_new ]
205           [    --poolmetadatasize Size[m|UNIT] ]
206           [    --poolmetadataspare y|n ]
207           [    --discards passdown|nopassdown|ignore ]
208           [    --errorwhenfull y|n ]
209           [ COMMON_OPTIONS ]
210           [ PV ... ]
211       -
212
213       Create a cache pool.
214
215       lvcreate --type cache-pool -L|--size Size[m|UNIT] VG
216           [ -l|--extents Number[PERCENT] ]
217           [ -H|--cache ]
218           [ -c|--chunksize Size[k|UNIT] ]
219           [    --poolmetadatasize Size[m|UNIT] ]
220           [    --poolmetadataspare y|n ]
221           [    --cachemode writethrough|writeback|passthrough ]
222           [    --cachepolicy String ]
223           [    --cachesettings String ]
224           [    --cachemetadataformat auto|1|2 ]
225           [ COMMON_OPTIONS ]
226           [ PV ... ]
227       -
228
229       Create a thin LV in a thin pool (infers --type thin).
230
231       lvcreate -V|--virtualsize Size[m|UNIT] --thinpool LV_thinpool VG
232           [ -T|--thin ]
233           [    --type thin ]
234           [    --discards passdown|nopassdown|ignore ]
235           [    --errorwhenfull y|n ]
236           [ COMMON_OPTIONS ]
237       -
238
239       Create a thin LV that is a snapshot of an existing thin LV
240       (infers --type thin).
241
242       lvcreate -s|--snapshot LV_thin
243           [    --type thin ]
244           [    --discards passdown|nopassdown|ignore ]
245           [    --errorwhenfull y|n ]
246           [ COMMON_OPTIONS ]
247       -
248
249       Create a thin LV that is a snapshot of an external origin LV.
250
251       lvcreate --type thin --thinpool LV_thinpool LV
252           [ -T|--thin ]
253           [ -c|--chunksize Size[k|UNIT] ]
254           [    --poolmetadatasize Size[m|UNIT] ]
255           [    --poolmetadataspare y|n ]
256           [    --discards passdown|nopassdown|ignore ]
257           [    --errorwhenfull y|n ]
258           [ COMMON_OPTIONS ]
259       -
260
261       Create a LV that returns VDO when used.
262
263       lvcreate --type vdo -L|--size Size[m|UNIT] VG
264           [ -l|--extents Number[PERCENT] ]
265           [ -V|--virtualsize Size[m|UNIT] ]
266           [ -i|--stripes Number ]
267           [ -I|--stripesize Size[k|UNIT] ]
268           [    --vdo ]
269           [    --vdopool LV_new ]
270           [    --compression y|n ]
271           [    --deduplication y|n ]
272           [ COMMON_OPTIONS ]
273           [ PV ... ]
274       -
275
276       Create a thin LV, first creating a thin pool for it,
277       where the new thin pool is named by the --thinpool arg.
278
279       lvcreate --type thin -V|--virtualsize Size[m|UNIT]
280             -L|--size Size[m|UNIT] --thinpool LV_new
281           [ -l|--extents Number[PERCENT] ]
282           [ -T|--thin ]
283           [ -c|--chunksize Size[k|UNIT] ]
284           [ -i|--stripes Number ]
285           [ -I|--stripesize Size[k|UNIT] ]
286           [    --poolmetadatasize Size[m|UNIT] ]
287           [    --poolmetadataspare y|n ]
288           [    --discards passdown|nopassdown|ignore ]
289           [    --errorwhenfull y|n ]
290           [ COMMON_OPTIONS ]
291           [ PV ... ]
292       -
293
294       Create a cache LV, first creating a new origin LV,
295       then combining it with the existing cache pool named
296       by the --cachepool arg.
297
298       lvcreate --type cache -L|--size Size[m|UNIT]
299             --cachepool LV_cachepool VG
300           [ -l|--extents Number[PERCENT] ]
301           [ -H|--cache ]
302           [ -c|--chunksize Size[k|UNIT] ]
303           [ -i|--stripes Number ]
304           [ -I|--stripesize Size[k|UNIT] ]
305           [    --poolmetadatasize Size[m|UNIT] ]
306           [    --poolmetadataspare y|n ]
307           [    --cachemode writethrough|writeback|passthrough ]
308           [    --cachepolicy String ]
309           [    --cachesettings String ]
310           [    --cachemetadataformat auto|1|2 ]
311           [ COMMON_OPTIONS ]
312           [ PV ... ]
313       -
314
315       Common options for command:
316           [ -a|--activate y|n|ay ]
317           [ -A|--autobackup y|n ]
318           [ -C|--contiguous y|n ]
319           [ -K|--ignoreactivationskip ]
320           [ -j|--major Number ]
321           [ -n|--name String ]
322           [ -p|--permission rw|r ]
323           [ -M|--persistent y|n ]
324           [ -r|--readahead auto|none|Number ]
325           [ -k|--setactivationskip y|n ]
326           [ -W|--wipesignatures y|n ]
327           [ -Z|--zero y|n ]
328           [    --addtag Tag ]
329           [    --alloc contiguous|cling|cling_by_tags|normal|anywhere|inherit
330           ]
331           [    --ignoremonitoring ]
332           [    --metadataprofile String ]
333           [    --minor Number ]
334           [    --monitor y|n ]
335           [    --nosync ]
336           [    --noudevsync ]
337           [    --reportformat basic|json ]
338
339       Common options for lvm:
340           [ -d|--debug ]
341           [ -h|--help ]
342           [ -q|--quiet ]
343           [ -t|--test ]
344           [ -v|--verbose ]
345           [ -y|--yes ]
346           [    --commandprofile String ]
347           [    --config String ]
348           [    --driverloaded y|n ]
349           [    --lockopt String ]
350           [    --longhelp ]
351           [    --nolocking ]
352           [    --profile String ]
353           [    --version ]
354

OPTIONS

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

VARIABLES

798       VG
799              Volume  Group  name.  See lvm(8) for valid names.  For lvcreate,
800              the required VG positional arg may be omitted when the  VG  name
801              is included in another option, e.g. --name VG/LV.
802
803       LV
804              Logical  Volume  name.  See lvm(8) for valid names.  An LV posi‐
805              tional arg generally includes the VG  name  and  LV  name,  e.g.
806              VG/LV.  LV followed by _<type> indicates that an LV of the given
807              type is required. (raid represents raid<N> type)
808
809       PV
810              Physical Volume name, a device path under  /dev.   For  commands
811              managing physical extents, a PV positional arg generally accepts
812              a suffix indicating a range (or  multiple  ranges)  of  physical
813              extents  (PEs). When the first PE is omitted, it defaults to the
814              start of the device, and when the last PE is omitted it defaults
815              to  end.   Start and end range (inclusive): PV[:PE-PE]...  Start
816              and length range (counting from 0): PV[:PE+PE]...
817
818       String
819              See the option description for information about the string con‐
820              tent.
821
822       Size[UNIT]
823              Size  is  an  input number that accepts an optional unit.  Input
824              units are always treated as base two values, regardless of capi‐
825              talization,  e.g.  'k'  and 'K' both refer to 1024.  The default
826              input unit is specified by letter, followed by |UNIT.  UNIT rep‐
827              resents  other  possible  input units: bBsSkKmMgGtTpPeE.  b|B is
828              bytes, s|S is sectors of 512 bytes, k|K  is  kilobytes,  m|M  is
829              megabytes, g|G is gigabytes, t|T is terabytes, p|P is petabytes,
830              e|E is exabytes.  (This should not be confused with  the  output
831              control --units, where capital letters mean multiple of 1000.)
832

ENVIRONMENT VARIABLES

834       See  lvm(8)  for  information  about environment variables used by lvm.
835       For example, LVM_VG_NAME can generally be substituted for a required VG
836       parameter.
837

ADVANCED USAGE

839       Alternate  command  forms,  advanced  command usage, and listing of all
840       valid syntax for completeness.
841
842       Create an LV that returns errors when used.
843
844       lvcreate --type error -L|--size Size[m|UNIT] VG
845           [ -l|--extents Number[PERCENT] ]
846           [ COMMON_OPTIONS ]
847       -
848
849       Create an LV that returns zeros when read.
850
851       lvcreate --type zero -L|--size Size[m|UNIT] VG
852           [ -l|--extents Number[PERCENT] ]
853           [ COMMON_OPTIONS ]
854       -
855
856       Create a linear LV.
857
858       lvcreate --type linear -L|--size Size[m|UNIT] VG
859           [ -l|--extents Number[PERCENT] ]
860           [ COMMON_OPTIONS ]
861           [ PV ... ]
862       -
863
864       Create a striped LV (also see lvcreate --stripes).
865
866       lvcreate --type striped -L|--size Size[m|UNIT] VG
867           [ -l|--extents Number[PERCENT] ]
868           [ -i|--stripes Number ]
869           [ -I|--stripesize Size[k|UNIT] ]
870           [ COMMON_OPTIONS ]
871           [ PV ... ]
872       -
873
874       Create a mirror LV (also see --type raid1).
875
876       lvcreate --type mirror -L|--size Size[m|UNIT] VG
877           [ -l|--extents Number[PERCENT] ]
878           [ -m|--mirrors Number ]
879           [ -R|--regionsize Size[m|UNIT] ]
880           [ -i|--stripes Number ]
881           [ -I|--stripesize Size[k|UNIT] ]
882           [    --mirrorlog core|disk ]
883           [ COMMON_OPTIONS ]
884           [ PV ... ]
885       -
886
887       Create a COW snapshot LV of an origin LV
888       (also see --snapshot).
889
890       lvcreate --type snapshot -L|--size Size[m|UNIT] LV
891           [ -l|--extents Number[PERCENT] ]
892           [ -s|--snapshot ]
893           [ -i|--stripes Number ]
894           [ -I|--stripesize Size[k|UNIT] ]
895           [ -c|--chunksize Size[k|UNIT] ]
896           [ COMMON_OPTIONS ]
897           [ PV ... ]
898       -
899
900       Create a sparse COW snapshot LV of a virtual origin LV
901       (also see --snapshot).
902
903       lvcreate --type snapshot -L|--size Size[m|UNIT]
904             -V|--virtualsize Size[m|UNIT] VG
905           [ -l|--extents Number[PERCENT] ]
906           [ -s|--snapshot ]
907           [ -c|--chunksize Size[k|UNIT] ]
908           [ COMMON_OPTIONS ]
909           [ PV ... ]
910       -
911
912       Create a sparse COW snapshot LV of a virtual origin LV.
913
914       lvcreate -s|--snapshot -L|--size Size[m|UNIT]
915             -V|--virtualsize Size[m|UNIT] VG
916           [ -l|--extents Number[PERCENT] ]
917           [ -c|--chunksize Size[k|UNIT] ]
918           [    --type snapshot ]
919           [ COMMON_OPTIONS ]
920           [ PV ... ]
921       -
922
923       Create a thin pool (infers --type thin-pool).
924
925       lvcreate -T|--thin -L|--size Size[m|UNIT] VG
926           [ -l|--extents Number[PERCENT] ]
927           [ -c|--chunksize Size[k|UNIT] ]
928           [ -i|--stripes Number ]
929           [ -I|--stripesize Size[k|UNIT] ]
930           [    --type thin-pool ]
931           [    --poolmetadatasize Size[m|UNIT] ]
932           [    --poolmetadataspare y|n ]
933           [    --discards passdown|nopassdown|ignore ]
934           [    --errorwhenfull y|n ]
935           [ COMMON_OPTIONS ]
936           [ PV ... ]
937       -
938
939       Create a thin pool named by the --thinpool arg
940       (infers --type thin-pool).
941
942       lvcreate -L|--size Size[m|UNIT] --thinpool LV_new VG
943           [ -l|--extents Number[PERCENT] ]
944           [ -T|--thin ]
945           [ -c|--chunksize Size[k|UNIT] ]
946           [ -i|--stripes Number ]
947           [ -I|--stripesize Size[k|UNIT] ]
948           [    --type thin-pool ]
949           [    --poolmetadatasize Size[m|UNIT] ]
950           [    --poolmetadataspare y|n ]
951           [    --discards passdown|nopassdown|ignore ]
952           [    --errorwhenfull y|n ]
953           [ COMMON_OPTIONS ]
954           [ PV ... ]
955       -
956
957       Create a cache pool named by the --cachepool arg
958       (variant, uses --cachepool in place of --name).
959
960       lvcreate --type cache-pool -L|--size Size[m|UNIT]
961             --cachepool LV_new VG
962           [ -l|--extents Number[PERCENT] ]
963           [ -H|--cache ]
964           [ -c|--chunksize Size[k|UNIT] ]
965           [    --poolmetadatasize Size[m|UNIT] ]
966           [    --poolmetadataspare y|n ]
967           [    --cachemode writethrough|writeback|passthrough ]
968           [    --cachepolicy String ]
969           [    --cachesettings String ]
970           [    --cachemetadataformat auto|1|2 ]
971           [ COMMON_OPTIONS ]
972           [ PV ... ]
973       -
974
975       Create a thin LV in a thin pool.
976
977       lvcreate --type thin -V|--virtualsize Size[m|UNIT]
978             --thinpool LV_thinpool VG
979           [ -T|--thin ]
980           [ -c|--chunksize Size[k|UNIT] ]
981           [    --poolmetadatasize Size[m|UNIT] ]
982           [    --poolmetadataspare y|n ]
983           [    --discards passdown|nopassdown|ignore ]
984           [    --errorwhenfull y|n ]
985           [ COMMON_OPTIONS ]
986       -
987
988       Create a thin LV in a thin pool named in the first arg
989       (variant, also see --thinpool for naming pool).
990
991       lvcreate --type thin -V|--virtualsize Size[m|UNIT] LV_thinpool
992           [ -T|--thin ]
993           [    --discards passdown|nopassdown|ignore ]
994           [    --errorwhenfull y|n ]
995           [ COMMON_OPTIONS ]
996       -
997
998       Create a thin LV in the thin pool named in the first arg
999       (variant, infers --type thin, also see --thinpool for
1000       naming pool.)
1001
1002       lvcreate -V|--virtualsize Size[m|UNIT] LV_thinpool
1003           [ -T|--thin ]
1004           [    --type thin ]
1005           [    --discards passdown|nopassdown|ignore ]
1006           [    --errorwhenfull y|n ]
1007           [ COMMON_OPTIONS ]
1008       -
1009
1010       Create a thin LV that is a snapshot of an existing thin LV.
1011
1012       lvcreate --type thin LV_thin
1013           [ -T|--thin ]
1014           [    --discards passdown|nopassdown|ignore ]
1015           [    --errorwhenfull y|n ]
1016           [ COMMON_OPTIONS ]
1017       -
1018
1019       Create a thin LV that is a snapshot of an existing thin LV
1020       (infers --type thin).
1021
1022       lvcreate -T|--thin LV_thin
1023           [    --type thin ]
1024           [    --discards passdown|nopassdown|ignore ]
1025           [    --errorwhenfull y|n ]
1026           [ COMMON_OPTIONS ]
1027       -
1028
1029       Create a thin LV that is a snapshot of an external origin LV
1030       (infers --type thin).
1031
1032       lvcreate -s|--snapshot --thinpool LV_thinpool LV
1033           [    --type thin ]
1034           [    --discards passdown|nopassdown|ignore ]
1035           [    --errorwhenfull y|n ]
1036           [ COMMON_OPTIONS ]
1037       -
1038
1039       Create a VDO LV with VDO pool.
1040
1041       lvcreate --vdo -L|--size Size[m|UNIT] VG
1042           [ -l|--extents Number[PERCENT] ]
1043           [ -V|--virtualsize Size[m|UNIT] ]
1044           [ -i|--stripes Number ]
1045           [ -I|--stripesize Size[k|UNIT] ]
1046           [    --vdopool LV_new ]
1047           [    --compression y|n ]
1048           [    --deduplication y|n ]
1049           [ COMMON_OPTIONS ]
1050           [ PV ... ]
1051       -
1052
1053       Create a VDO LV with VDO pool.
1054
1055       lvcreate --vdopool LV_new -L|--size Size[m|UNIT] VG
1056           [ -l|--extents Number[PERCENT] ]
1057           [ -V|--virtualsize Size[m|UNIT] ]
1058           [ -i|--stripes Number ]
1059           [ -I|--stripesize Size[k|UNIT] ]
1060           [    --vdo ]
1061           [    --type vdo ]
1062           [    --compression y|n ]
1063           [    --deduplication y|n ]
1064           [ COMMON_OPTIONS ]
1065           [ PV ... ]
1066       -
1067
1068       Create a thin LV, first creating a thin pool for it,
1069       where the new thin pool is named by the --thinpool arg
1070       (variant, infers --type thin).
1071
1072       lvcreate -V|--virtualsize Size[m|UNIT] -L|--size Size[m|UNIT]
1073             --thinpool LV_new
1074           [ -l|--extents Number[PERCENT] ]
1075           [ -T|--thin ]
1076           [ -c|--chunksize Size[k|UNIT] ]
1077           [ -i|--stripes Number ]
1078           [ -I|--stripesize Size[k|UNIT] ]
1079           [    --poolmetadatasize Size[m|UNIT] ]
1080           [    --poolmetadataspare y|n ]
1081           [    --discards passdown|nopassdown|ignore ]
1082           [    --errorwhenfull y|n ]
1083           [ COMMON_OPTIONS ]
1084           [ PV ... ]
1085       -
1086
1087       Create a thin LV, first creating a thin pool for it,
1088       where the new thin pool is named by the --thinpool arg
1089       (variant, infers --type thin).
1090
1091       lvcreate -V|--virtualsize Size[m|UNIT] -L|--size Size[m|UNIT]
1092             --thinpool LV_new VG
1093           [ -l|--extents Number[PERCENT] ]
1094           [ -T|--thin ]
1095           [ -c|--chunksize Size[k|UNIT] ]
1096           [ -i|--stripes Number ]
1097           [ -I|--stripesize Size[k|UNIT] ]
1098           [    --poolmetadatasize Size[m|UNIT] ]
1099           [    --poolmetadataspare y|n ]
1100           [    --discards passdown|nopassdown|ignore ]
1101           [    --errorwhenfull y|n ]
1102           [ COMMON_OPTIONS ]
1103           [ PV ... ]
1104       -
1105
1106       Create a thin LV, first creating a thin pool for it,
1107       where the new thin pool is named in the first arg,
1108       or the new thin pool name is generated when the first
1109       arg is a VG name.
1110
1111       lvcreate --type thin -V|--virtualsize Size[m|UNIT]
1112             -L|--size Size[m|UNIT] VG|LV_new
1113           [ -l|--extents Number[PERCENT] ]
1114           [ -T|--thin ]
1115           [ -c|--chunksize Size[k|UNIT] ]
1116           [ -i|--stripes Number ]
1117           [ -I|--stripesize Size[k|UNIT] ]
1118           [    --poolmetadatasize Size[m|UNIT] ]
1119           [    --poolmetadataspare y|n ]
1120           [    --discards passdown|nopassdown|ignore ]
1121           [    --errorwhenfull y|n ]
1122           [ COMMON_OPTIONS ]
1123           [ PV ... ]
1124       -
1125
1126       Create a thin LV, first creating a thin pool for it,
1127       where the new thin pool is named in the first arg,
1128       or the new thin pool name is generated when the first
1129       arg is a VG name (variant, infers --type thin).
1130
1131       lvcreate -T|--thin -V|--virtualsize Size[m|UNIT]
1132             -L|--size Size[m|UNIT] VG|LV_new
1133           [ -l|--extents Number[PERCENT] ]
1134           [ -c|--chunksize Size[k|UNIT] ]
1135           [ -i|--stripes Number ]
1136           [ -I|--stripesize Size[k|UNIT] ]
1137           [    --poolmetadatasize Size[m|UNIT] ]
1138           [    --poolmetadataspare y|n ]
1139           [    --discards passdown|nopassdown|ignore ]
1140           [    --errorwhenfull y|n ]
1141           [ COMMON_OPTIONS ]
1142           [ PV ... ]
1143       -
1144
1145       Create a thin LV, first creating a thin pool for it
1146       (infers --type thin).
1147       Create a sparse snapshot of a virtual origin LV
1148       (infers --type snapshot).
1149       Chooses --type thin or --type snapshot according to
1150       config setting sparse_segtype_default.
1151
1152       lvcreate -L|--size Size[m|UNIT] -V|--virtualsize Size[m|UNIT] VG
1153           [ -l|--extents Number[PERCENT] ]
1154           [ -s|--snapshot ]
1155           [ -c|--chunksize Size[k|UNIT] ]
1156           [ -i|--stripes Number ]
1157           [ -I|--stripesize Size[k|UNIT] ]
1158           [    --type snapshot ]
1159           [    --poolmetadatasize Size[m|UNIT] ]
1160           [    --poolmetadataspare y|n ]
1161           [    --discards passdown|nopassdown|ignore ]
1162           [    --errorwhenfull y|n ]
1163           [ COMMON_OPTIONS ]
1164           [ PV ... ]
1165       -
1166
1167       Create a cache LV, first creating a new origin LV,
1168       then combining it with the existing cache pool named
1169       by the --cachepool arg (variant, infers --type cache).
1170
1171       lvcreate -L|--size Size[m|UNIT] --cachepool LV_cachepool VG
1172           [ -l|--extents Number[PERCENT] ]
1173           [ -H|--cache ]
1174           [ -c|--chunksize Size[k|UNIT] ]
1175           [ -i|--stripes Number ]
1176           [ -I|--stripesize Size[k|UNIT] ]
1177           [    --type cache ]
1178           [    --cachemode writethrough|writeback|passthrough ]
1179           [    --cachepolicy String ]
1180           [    --cachesettings String ]
1181           [    --cachemetadataformat auto|1|2 ]
1182           [ COMMON_OPTIONS ]
1183           [ PV ... ]
1184       -
1185
1186       Create a cache LV, first creating a new origin LV,
1187       then combining it with the existing cache pool named
1188       in the first arg (variant, also use --cachepool).
1189
1190       lvcreate --type cache -L|--size Size[m|UNIT] LV_cachepool
1191           [ -l|--extents Number[PERCENT] ]
1192           [ -H|--cache ]
1193           [ -c|--chunksize Size[k|UNIT] ]
1194           [ -i|--stripes Number ]
1195           [ -I|--stripesize Size[k|UNIT] ]
1196           [    --poolmetadatasize Size[m|UNIT] ]
1197           [    --poolmetadataspare y|n ]
1198           [    --cachemode writethrough|writeback|passthrough ]
1199           [    --cachepolicy String ]
1200           [    --cachesettings String ]
1201           [    --cachemetadataformat auto|1|2 ]
1202           [ COMMON_OPTIONS ]
1203           [ PV ... ]
1204       -
1205
1206       When LV is a cache pool, create a cache LV,
1207       first creating a new origin LV, then combining it with
1208       the existing cache pool named in the first arg
1209       (variant, infers --type cache, also use --cachepool).
1210       When LV is not a cache pool, convert the specified LV
1211       to type cache after creating a new cache pool LV to use
1212       (use lvconvert).
1213
1214       lvcreate -H|--cache -L|--size Size[m|UNIT] LV
1215           [ -l|--extents Number[PERCENT] ]
1216           [ -c|--chunksize Size[k|UNIT] ]
1217           [ -i|--stripes Number ]
1218           [ -I|--stripesize Size[k|UNIT] ]
1219           [    --cachemode writethrough|writeback|passthrough ]
1220           [    --cachepolicy String ]
1221           [    --cachesettings String ]
1222           [    --cachemetadataformat auto|1|2 ]
1223           [    --poolmetadatasize Size[m|UNIT] ]
1224           [    --poolmetadataspare y|n ]
1225           [ COMMON_OPTIONS ]
1226           [ PV ... ]
1227       -
1228
1229

EXAMPLES

1231       Create a striped LV with 3 stripes, a stripe size of 8KiB and a size of
1232       100MiB.  The LV name is chosen by lvcreate.
1233       lvcreate -i 3 -I 8 -L 100m vg00
1234
1235       Create  a raid1 LV with two images, and a useable size of 500 MiB. This
1236       operation requires two devices, one for each mirror image.  RAID  meta‐
1237       data (superblock and bitmap) is also included on the two devices.
1238       lvcreate --type raid1 -m1 -L 500m -n mylv vg00
1239
1240       Create  a  mirror  LV  with  two images, and a useable size of 500 MiB.
1241       This operation requires three devices: two for mirror  images  and  one
1242       for a disk log.
1243       lvcreate --type mirror -m1 -L 500m -n mylv vg00
1244
1245       Create  a mirror LV with 2 images, and a useable size of 500 MiB.  This
1246       operation requires 2 devices because the log is in memory.
1247       lvcreate --type mirror -m1 --mirrorlog core -L 500m -n mylv vg00
1248
1249       Create a copy-on-write snapshot of an LV:
1250       lvcreate --snapshot --size 100m --name mysnap vg00/mylv
1251
1252       Create a copy-on-write snapshot with a size sufficient for  overwriting
1253       20% of the size of the original LV.
1254       lvcreate -s -l 20%ORIGIN -n mysnap vg00/mylv
1255
1256       Create  a  sparse  LV with 1TiB of virtual space, and actual space just
1257       under 100MiB.
1258       lvcreate --snapshot --virtualsize 1t --size 100m --name mylv vg00
1259
1260       Create a linear LV with a usable size of  64MiB  on  specific  physical
1261       extents.
1262       lvcreate -L 64m -n mylv vg00 /dev/sda:0-7 /dev/sdb:0-7
1263
1264       Create  a RAID5 LV with a usable size of 5GiB, 3 stripes, a stripe size
1265       of 64KiB, using a total of 4 devices (including one for parity).
1266       lvcreate --type raid5 -L 5G -i 3 -I 64 -n mylv vg00
1267
1268       Create a RAID5 LV using all of the free space in the  VG  and  spanning
1269       all  the  PVs  in  the VG (note that the command will fail if there are
1270       more than 8 PVs in the VG, in which case -i 7 must be used  to  get  to
1271       the current maximum of 8 devices including parity for RaidLVs).
1272       lvcreate --config allocation/raid_stripe_all_devices=1
1273              --type raid5 -l 100%FREE -n mylv vg00
1274
1275       Create RAID10 LV with a usable size of 5GiB, using 2 stripes, each on a
1276       two-image mirror. (Note that the -i and  -m  arguments  behave  differ‐
1277       ently:  -i  specifies the total number of stripes, but -m specifies the
1278       number of images in addition to the first image).
1279       lvcreate --type raid10 -L 5G -i 2 -m 1 -n mylv vg00
1280
1281       Create a 1TiB thin LV mythin, with 256GiB thinpool tpool0 in vg00.
1282       lvcreate --T --size 256G --name mythin vg00/tpool0
1283
1284       Create a 1TiB thin LV, first creating a new thin pool for it, where the
1285       thin pool has 100MiB of space, uses 2 stripes, has a 64KiB stripe size,
1286       and 256KiB chunk size.
1287       lvcreate --type thin --name mylv --thinpool mypool
1288              -V 1t -L 100m -i 2 -I 64 -c 256 vg00
1289
1290       Create a thin snapshot of a thin LV (the size option must not be  used,
1291       otherwise a copy-on-write snapshot would be created).
1292       lvcreate --snapshot --name mysnap vg00/thinvol
1293
1294       Create  a  thin  snapshot  of  the read-only inactive LV named "origin"
1295       which becomes an external origin for the thin snapshot LV.
1296       lvcreate --snapshot --name mysnap --thinpool mypool vg00/origin
1297
1298       Create a cache pool from a fast physical device.  The  cache  pool  can
1299       then be used to cache an LV.
1300       lvcreate --type cache-pool -L 1G -n my_cpool vg00 /dev/fast1
1301
1302       Create  a  cache  LV, first creating a new origin LV on a slow physical
1303       device, then combining the new origin LV with an existing cache pool.
1304       lvcreate --type cache --cachepool my_cpool
1305              -L 100G -n mylv vg00 /dev/slow1
1306
1307       Create a VDO LV vdo0 with VDOPoolLV size of 10GiB and name vpool1.
1308       lvcreate --vdo --size 10G --name vdo0 vg00/vpool1
1309

SEE ALSO

1311       lvm(8) lvm.conf(5) lvmconfig(8)
1312
1313       pvchange(8)  pvck(8)  pvcreate(8)  pvdisplay(8)  pvmove(8)  pvremove(8)
1314       pvresize(8) pvs(8) pvscan(8)
1315
1316       vgcfgbackup(8)  vgcfgrestore(8)  vgchange(8) vgck(8) vgcreate(8) vgcon‐
1317       vert(8)  vgdisplay(8)  vgexport(8)  vgextend(8)  vgimport(8)  vgimport‐
1318       clone(8)  vgmerge(8)  vgmknodes(8)  vgreduce(8) vgremove(8) vgrename(8)
1319       vgs(8) vgscan(8) vgsplit(8)
1320
1321       lvcreate(8) lvchange(8)  lvconvert(8)  lvdisplay(8)  lvextend(8)  lvre‐
1322       duce(8) lvremove(8) lvrename(8) lvresize(8) lvs(8) lvscan(8)
1323
1324       lvm-fullreport(8) lvm-lvpoll(8) lvm2-activation-generator(8) blkdeacti‐
1325       vate(8) lvmdump(8)
1326
1327       dmeventd(8) lvmpolld(8)  lvmlockd(8)  lvmlockctl(8)  cmirrord(8)  lvmd‐
1328       busd(8)
1329
1330       lvmsystemid(7) lvmreport(7) lvmraid(7) lvmthin(7) lvmcache(7)
1331
1332
1333
1334Red Hat, Inc.          LVM TOOLS 2.03.06(2) (2019-10-23)           LVCREATE(8)
Impressum