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

DESCRIPTION

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

USAGE

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

OPTIONS

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

VARIABLES

748       VG
749              Volume Group name.  See lvm(8) for valid names.   For  lvcreate,
750              the  required  VG positional arg may be omitted when the VG name
751              is included in another option, e.g. --name VG/LV.
752
753       LV
754              Logical Volume name.  See lvm(8) for valid names.  An  LV  posi‐
755              tional  arg  generally  includes  the  VG name and LV name, e.g.
756              VG/LV.  LV followed by _<type> indicates that an LV of the given
757              type is required. (raid represents raid<N> type)
758
759       PV
760              Physical  Volume  name,  a device path under /dev.  For commands
761              managing physical extents, a PV positional arg generally accepts
762              a  suffix  indicating  a  range (or multiple ranges) of physical
763              extents (PEs). When the first PE is omitted, it defaults to  the
764              start of the device, and when the last PE is omitted it defaults
765              to end.  Start and end range (inclusive):  PV[:PE-PE]...   Start
766              and length range (counting from 0): PV[:PE+PE]...
767
768       String
769              See the option description for information about the string con‐
770              tent.
771
772       Size[UNIT]
773              Size is an input number that accepts an  optional  unit.   Input
774              units are always treated as base two values, regardless of capi‐
775              talization, e.g. 'k' and 'K' both refer to  1024.   The  default
776              input unit is specified by letter, followed by |UNIT.  UNIT rep‐
777              resents other possible input units:  bBsSkKmMgGtTpPeE.   b|B  is
778              bytes,  s|S  is  sectors  of 512 bytes, k|K is kilobytes, m|M is
779              megabytes, g|G is gigabytes, t|T is terabytes, p|P is petabytes,
780              e|E  is  exabytes.  (This should not be confused with the output
781              control --units, where capital letters mean multiple of 1000.)
782

ENVIRONMENT VARIABLES

784       See lvm(8) for information about environment  variables  used  by  lvm.
785       For example, LVM_VG_NAME can generally be substituted for a required VG
786       parameter.
787

ADVANCED USAGE

789       Alternate command forms, advanced command usage,  and  listing  of  all
790       valid syntax for completeness.
791
792       Create an LV that returns errors when used.
793
794       lvcreate --type error -L|--size Size[m|UNIT] VG
795           [ -l|--extents Number[PERCENT] ]
796           [ COMMON_OPTIONS ]
797       -
798
799       Create an LV that returns zeros when read.
800
801       lvcreate --type zero -L|--size Size[m|UNIT] VG
802           [ -l|--extents Number[PERCENT] ]
803           [ COMMON_OPTIONS ]
804       -
805
806       Create a linear LV.
807
808       lvcreate --type linear -L|--size Size[m|UNIT] VG
809           [ -l|--extents Number[PERCENT] ]
810           [ COMMON_OPTIONS ]
811           [ PV ... ]
812       -
813
814       Create a striped LV (also see lvcreate --stripes).
815
816       lvcreate --type striped -L|--size Size[m|UNIT] VG
817           [ -l|--extents Number[PERCENT] ]
818           [ -i|--stripes Number ]
819           [ -I|--stripesize Size[k|UNIT] ]
820           [ COMMON_OPTIONS ]
821           [ PV ... ]
822       -
823
824       Create a mirror LV (also see --type raid1).
825
826       lvcreate --type mirror -L|--size Size[m|UNIT] VG
827           [ -l|--extents Number[PERCENT] ]
828           [ -m|--mirrors Number ]
829           [ -R|--regionsize Size[m|UNIT] ]
830           [ -i|--stripes Number ]
831           [ -I|--stripesize Size[k|UNIT] ]
832           [    --mirrorlog core|disk ]
833           [ COMMON_OPTIONS ]
834           [ PV ... ]
835       -
836
837       Create a COW snapshot LV of an origin LV
838       (also see --snapshot).
839
840       lvcreate --type snapshot -L|--size Size[m|UNIT] LV
841           [ -l|--extents Number[PERCENT] ]
842           [ -s|--snapshot ]
843           [ -i|--stripes Number ]
844           [ -I|--stripesize Size[k|UNIT] ]
845           [ -c|--chunksize Size[k|UNIT] ]
846           [ COMMON_OPTIONS ]
847           [ PV ... ]
848       -
849
850       Create a sparse COW snapshot LV of a virtual origin LV
851       (also see --snapshot).
852
853       lvcreate --type snapshot -L|--size Size[m|UNIT]
854             -V|--virtualsize Size[m|UNIT] VG
855           [ -l|--extents Number[PERCENT] ]
856           [ -s|--snapshot ]
857           [ -c|--chunksize Size[k|UNIT] ]
858           [ COMMON_OPTIONS ]
859           [ PV ... ]
860       -
861
862       Create a sparse COW snapshot LV of a virtual origin LV.
863
864       lvcreate -s|--snapshot -L|--size Size[m|UNIT]
865             -V|--virtualsize Size[m|UNIT] VG
866           [ -l|--extents Number[PERCENT] ]
867           [ -c|--chunksize Size[k|UNIT] ]
868           [    --type snapshot ]
869           [ COMMON_OPTIONS ]
870           [ PV ... ]
871       -
872
873       Create a thin pool (infers --type thin-pool).
874
875       lvcreate -T|--thin -L|--size Size[m|UNIT] VG
876           [ -l|--extents Number[PERCENT] ]
877           [ -c|--chunksize Size[k|UNIT] ]
878           [ -i|--stripes Number ]
879           [ -I|--stripesize Size[k|UNIT] ]
880           [    --type thin-pool ]
881           [    --poolmetadatasize Size[m|UNIT] ]
882           [    --poolmetadataspare y|n ]
883           [    --discards passdown|nopassdown|ignore ]
884           [    --errorwhenfull y|n ]
885           [ COMMON_OPTIONS ]
886           [ PV ... ]
887       -
888
889       Create a thin pool named by the --thinpool arg
890       (infers --type thin-pool).
891
892       lvcreate -L|--size Size[m|UNIT] --thinpool LV_new VG
893           [ -l|--extents Number[PERCENT] ]
894           [ -T|--thin ]
895           [ -c|--chunksize Size[k|UNIT] ]
896           [ -i|--stripes Number ]
897           [ -I|--stripesize Size[k|UNIT] ]
898           [    --type thin-pool ]
899           [    --poolmetadatasize Size[m|UNIT] ]
900           [    --poolmetadataspare y|n ]
901           [    --discards passdown|nopassdown|ignore ]
902           [    --errorwhenfull y|n ]
903           [ COMMON_OPTIONS ]
904           [ PV ... ]
905       -
906
907       Create a cache pool named by the --cachepool arg
908       (variant, uses --cachepool in place of --name).
909
910       lvcreate --type cache-pool -L|--size Size[m|UNIT]
911             --cachepool LV_new VG
912           [ -l|--extents Number[PERCENT] ]
913           [ -H|--cache ]
914           [ -c|--chunksize Size[k|UNIT] ]
915           [    --poolmetadatasize Size[m|UNIT] ]
916           [    --poolmetadataspare y|n ]
917           [    --cachemode writethrough|writeback|passthrough ]
918           [    --cachepolicy String ]
919           [    --cachesettings String ]
920           [    --cachemetadataformat auto|1|2 ]
921           [ COMMON_OPTIONS ]
922           [ PV ... ]
923       -
924
925       Create a thin LV in a thin pool.
926
927       lvcreate --type thin -V|--virtualsize Size[m|UNIT]
928             --thinpool LV_thinpool VG
929           [ -T|--thin ]
930           [ -c|--chunksize Size[k|UNIT] ]
931           [    --poolmetadatasize Size[m|UNIT] ]
932           [    --poolmetadataspare y|n ]
933           [    --discards passdown|nopassdown|ignore ]
934           [    --errorwhenfull y|n ]
935           [ COMMON_OPTIONS ]
936       -
937
938       Create a thin LV in a thin pool named in the first arg
939       (variant, also see --thinpool for naming pool).
940
941       lvcreate --type thin -V|--virtualsize Size[m|UNIT] LV_thinpool
942           [ -T|--thin ]
943           [    --discards passdown|nopassdown|ignore ]
944           [    --errorwhenfull y|n ]
945           [ COMMON_OPTIONS ]
946       -
947
948       Create a thin LV in the thin pool named in the first arg
949       (variant, infers --type thin, also see --thinpool for
950       naming pool.)
951
952       lvcreate -V|--virtualsize Size[m|UNIT] LV_thinpool
953           [ -T|--thin ]
954           [    --type thin ]
955           [    --discards passdown|nopassdown|ignore ]
956           [    --errorwhenfull y|n ]
957           [ COMMON_OPTIONS ]
958       -
959
960       Create a thin LV that is a snapshot of an existing thin LV.
961
962       lvcreate --type thin LV_thin
963           [ -T|--thin ]
964           [    --discards passdown|nopassdown|ignore ]
965           [    --errorwhenfull y|n ]
966           [ COMMON_OPTIONS ]
967       -
968
969       Create a thin LV that is a snapshot of an existing thin LV
970       (infers --type thin).
971
972       lvcreate -T|--thin LV_thin
973           [    --type thin ]
974           [    --discards passdown|nopassdown|ignore ]
975           [    --errorwhenfull y|n ]
976           [ COMMON_OPTIONS ]
977       -
978
979       Create a thin LV that is a snapshot of an external origin LV
980       (infers --type thin).
981
982       lvcreate -s|--snapshot --thinpool LV_thinpool LV
983           [    --type thin ]
984           [    --discards passdown|nopassdown|ignore ]
985           [    --errorwhenfull y|n ]
986           [ COMMON_OPTIONS ]
987       -
988
989       Create a thin LV, first creating a thin pool for it,
990       where the new thin pool is named by the --thinpool arg
991       (variant, infers --type thin).
992
993       lvcreate -V|--virtualsize Size[m|UNIT] -L|--size Size[m|UNIT]
994             --thinpool LV_new
995           [ -l|--extents Number[PERCENT] ]
996           [ -T|--thin ]
997           [ -c|--chunksize Size[k|UNIT] ]
998           [ -i|--stripes Number ]
999           [ -I|--stripesize Size[k|UNIT] ]
1000           [    --poolmetadatasize Size[m|UNIT] ]
1001           [    --poolmetadataspare y|n ]
1002           [    --discards passdown|nopassdown|ignore ]
1003           [    --errorwhenfull y|n ]
1004           [ COMMON_OPTIONS ]
1005           [ PV ... ]
1006       -
1007
1008       Create a thin LV, first creating a thin pool for it,
1009       where the new thin pool is named by the --thinpool arg
1010       (variant, infers --type thin).
1011
1012       lvcreate -V|--virtualsize Size[m|UNIT] -L|--size Size[m|UNIT]
1013             --thinpool LV_new VG
1014           [ -l|--extents Number[PERCENT] ]
1015           [ -T|--thin ]
1016           [ -c|--chunksize Size[k|UNIT] ]
1017           [ -i|--stripes Number ]
1018           [ -I|--stripesize Size[k|UNIT] ]
1019           [    --poolmetadatasize Size[m|UNIT] ]
1020           [    --poolmetadataspare y|n ]
1021           [    --discards passdown|nopassdown|ignore ]
1022           [    --errorwhenfull y|n ]
1023           [ COMMON_OPTIONS ]
1024           [ PV ... ]
1025       -
1026
1027       Create a thin LV, first creating a thin pool for it,
1028       where the new thin pool is named in the first arg,
1029       or the new thin pool name is generated when the first
1030       arg is a VG name.
1031
1032       lvcreate --type thin -V|--virtualsize Size[m|UNIT]
1033             -L|--size Size[m|UNIT] VG|LV_new
1034           [ -l|--extents Number[PERCENT] ]
1035           [ -T|--thin ]
1036           [ -c|--chunksize Size[k|UNIT] ]
1037           [ -i|--stripes Number ]
1038           [ -I|--stripesize Size[k|UNIT] ]
1039           [    --poolmetadatasize Size[m|UNIT] ]
1040           [    --poolmetadataspare y|n ]
1041           [    --discards passdown|nopassdown|ignore ]
1042           [    --errorwhenfull y|n ]
1043           [ COMMON_OPTIONS ]
1044           [ PV ... ]
1045       -
1046
1047       Create a thin LV, first creating a thin pool for it,
1048       where the new thin pool is named in the first arg,
1049       or the new thin pool name is generated when the first
1050       arg is a VG name (variant, infers --type thin).
1051
1052       lvcreate -T|--thin -V|--virtualsize Size[m|UNIT]
1053             -L|--size Size[m|UNIT] VG|LV_new
1054           [ -l|--extents Number[PERCENT] ]
1055           [ -c|--chunksize Size[k|UNIT] ]
1056           [ -i|--stripes Number ]
1057           [ -I|--stripesize Size[k|UNIT] ]
1058           [    --poolmetadatasize Size[m|UNIT] ]
1059           [    --poolmetadataspare y|n ]
1060           [    --discards passdown|nopassdown|ignore ]
1061           [    --errorwhenfull y|n ]
1062           [ COMMON_OPTIONS ]
1063           [ PV ... ]
1064       -
1065
1066       Create a thin LV, first creating a thin pool for it
1067       (infers --type thin).
1068       Create a sparse snapshot of a virtual origin LV
1069       (infers --type snapshot).
1070       Chooses --type thin or --type snapshot according to
1071       config setting sparse_segtype_default.
1072
1073       lvcreate -L|--size Size[m|UNIT] -V|--virtualsize Size[m|UNIT] VG
1074           [ -l|--extents Number[PERCENT] ]
1075           [ -s|--snapshot ]
1076           [ -c|--chunksize Size[k|UNIT] ]
1077           [ -i|--stripes Number ]
1078           [ -I|--stripesize Size[k|UNIT] ]
1079           [    --type snapshot ]
1080           [    --poolmetadatasize Size[m|UNIT] ]
1081           [    --poolmetadataspare y|n ]
1082           [    --discards passdown|nopassdown|ignore ]
1083           [    --errorwhenfull y|n ]
1084           [ COMMON_OPTIONS ]
1085           [ PV ... ]
1086       -
1087
1088       Create a cache LV, first creating a new origin LV,
1089       then combining it with the existing cache pool named
1090       by the --cachepool arg (variant, infers --type cache).
1091
1092       lvcreate -L|--size Size[m|UNIT] --cachepool LV_cachepool VG
1093           [ -l|--extents Number[PERCENT] ]
1094           [ -H|--cache ]
1095           [ -c|--chunksize Size[k|UNIT] ]
1096           [ -i|--stripes Number ]
1097           [ -I|--stripesize Size[k|UNIT] ]
1098           [    --type cache ]
1099           [    --cachemode writethrough|writeback|passthrough ]
1100           [    --cachepolicy String ]
1101           [    --cachesettings String ]
1102           [    --cachemetadataformat auto|1|2 ]
1103           [ COMMON_OPTIONS ]
1104           [ PV ... ]
1105       -
1106
1107       Create a cache LV, first creating a new origin LV,
1108       then combining it with the existing cache pool named
1109       in the first arg (variant, also use --cachepool).
1110
1111       lvcreate --type cache -L|--size Size[m|UNIT] LV_cachepool
1112           [ -l|--extents Number[PERCENT] ]
1113           [ -H|--cache ]
1114           [ -c|--chunksize Size[k|UNIT] ]
1115           [ -i|--stripes Number ]
1116           [ -I|--stripesize Size[k|UNIT] ]
1117           [    --poolmetadatasize Size[m|UNIT] ]
1118           [    --poolmetadataspare y|n ]
1119           [    --cachemode writethrough|writeback|passthrough ]
1120           [    --cachepolicy String ]
1121           [    --cachesettings String ]
1122           [    --cachemetadataformat auto|1|2 ]
1123           [ COMMON_OPTIONS ]
1124           [ PV ... ]
1125       -
1126
1127       When LV is a cache pool, create a cache LV,
1128       first creating a new origin LV, then combining it with
1129       the existing cache pool named in the first arg
1130       (variant, infers --type cache, also use --cachepool).
1131       When LV is not a cache pool, convert the specified LV
1132       to type cache after creating a new cache pool LV to use
1133       (use lvconvert).
1134
1135       lvcreate -H|--cache -L|--size Size[m|UNIT] LV
1136           [ -l|--extents Number[PERCENT] ]
1137           [ -c|--chunksize Size[k|UNIT] ]
1138           [ -i|--stripes Number ]
1139           [ -I|--stripesize Size[k|UNIT] ]
1140           [    --cachemode writethrough|writeback|passthrough ]
1141           [    --cachepolicy String ]
1142           [    --cachesettings String ]
1143           [    --cachemetadataformat auto|1|2 ]
1144           [    --poolmetadatasize Size[m|UNIT] ]
1145           [    --poolmetadataspare y|n ]
1146           [ COMMON_OPTIONS ]
1147           [ PV ... ]
1148       -
1149
1150

EXAMPLES

1152       Create a striped LV with 3 stripes, a stripe size of 8KiB and a size of
1153       100MiB.  The LV name is chosen by lvcreate.
1154       lvcreate -i 3 -I 8 -L 100m vg00
1155
1156       Create a raid1 LV with two images, and a useable size of 500 MiB.  This
1157       operation  requires  two devices, one for each mirror image. RAID meta‐
1158       data (superblock and bitmap) is also included on the two devices.
1159       lvcreate --type raid1 -m1 -L 500m -n mylv vg00
1160
1161       Create a mirror LV with two images, and a  useable  size  of  500  MiB.
1162       This  operation  requires  three devices: two for mirror images and one
1163       for a disk log.
1164       lvcreate --type mirror -m1 -L 500m -n mylv vg00
1165
1166       Create a mirror LV with 2 images, and a useable size of 500 MiB.   This
1167       operation requires 2 devices because the log is in memory.
1168       lvcreate --type mirror -m1 --mirrorlog core -L 500m -n mylv vg00
1169
1170       Create a copy-on-write snapshot of an LV:
1171       lvcreate --snapshot --size 100m --name mysnap vg00/mylv
1172
1173       Create  a copy-on-write snapshot with a size sufficient for overwriting
1174       20% of the size of the original LV.
1175       lvcreate -s -l 20%ORIGIN -n mysnap vg00/mylv
1176
1177       Create a sparse LV with 1TiB of virtual space, and  actual  space  just
1178       under 100MiB.
1179       lvcreate --snapshot --virtualsize 1t --size 100m --name mylv vg00
1180
1181       Create  a  linear  LV  with a usable size of 64MiB on specific physical
1182       extents.
1183       lvcreate -L 64m -n mylv vg00 /dev/sda:0-7 /dev/sdb:0-7
1184
1185       Create a RAID5 LV with a usable size of 5GiB, 3 stripes, a stripe  size
1186       of 64KiB, using a total of 4 devices (including one for parity).
1187       lvcreate --type raid5 -L 5G -i 3 -I 64 -n mylv vg00
1188
1189       Create  a  RAID5  LV using all of the free space in the VG and spanning
1190       all the PVs in the VG (note that the command will  fail  if  there  are
1191       more  than  8  PVs in the VG, in which case -i 7 must be used to get to
1192       the current maximum of 8 devices including parity for RaidLVs).
1193       lvcreate --config allocation/raid_stripe_all_devices=1
1194              --type raid5 -l 100%FREE -n mylv vg00
1195
1196       Create RAID10 LV with a usable size of 5GiB, using 2 stripes, each on a
1197       two-image  mirror.  (Note  that  the -i and -m arguments behave differ‐
1198       ently: -i specifies the total number of stripes, but -m  specifies  the
1199       number of images in addition to the first image).
1200       lvcreate --type raid10 -L 5G -i 2 -m 1 -n mylv vg00
1201
1202       Create a 1TiB thin LV, first creating a new thin pool for it, where the
1203       thin pool has 100MiB of space, uses 2 stripes, has a 64KiB stripe size,
1204       and 256KiB chunk size.
1205       lvcreate --type thin --name mylv --thinpool mypool
1206              -V 1t -L 100m -i 2 -I 64 -c 256 vg00
1207
1208       Create  a thin snapshot of a thin LV (the size option must not be used,
1209       otherwise a copy-on-write snapshot would be created).
1210       lvcreate --snapshot --name mysnap vg00/thinvol
1211
1212       Create a thin snapshot of the  read-only  inactive  LV  named  "origin"
1213       which becomes an external origin for the thin snapshot LV.
1214       lvcreate --snapshot --name mysnap --thinpool mypool vg00/origin
1215
1216       Create  a  cache  pool  from a fast physical device. The cache pool can
1217       then be used to cache an LV.
1218       lvcreate --type cache-pool -L 1G -n my_cpool vg00 /dev/fast1
1219
1220       Create a cache LV, first creating a new origin LV on  a  slow  physical
1221       device, then combining the new origin LV with an existing cache pool.
1222       lvcreate --type cache --cachepool my_cpool
1223              -L 100G -n mylv vg00 /dev/slow1
1224

SEE ALSO

1226       lvm(8) lvm.conf(5) lvmconfig(8)
1227
1228       pvchange(8)  pvck(8)  pvcreate(8)  pvdisplay(8)  pvmove(8)  pvremove(8)
1229       pvresize(8) pvs(8) pvscan(8)
1230
1231       vgcfgbackup(8) vgcfgrestore(8) vgchange(8) vgck(8)  vgcreate(8)  vgcon‐
1232       vert(8)  vgdisplay(8)  vgexport(8)  vgextend(8)  vgimport(8)  vgimport‐
1233       clone(8) vgmerge(8) vgmknodes(8)  vgreduce(8)  vgremove(8)  vgrename(8)
1234       vgs(8) vgscan(8) vgsplit(8)
1235
1236       lvcreate(8)  lvchange(8)  lvconvert(8)  lvdisplay(8)  lvextend(8) lvre‐
1237       duce(8) lvremove(8) lvrename(8) lvresize(8) lvs(8) lvscan(8)
1238
1239       lvm-fullreport(8) lvm-lvpoll(8) lvm2-activation-generator(8) blkdeacti‐
1240       vate(8) lvmdump(8)
1241
1242       dmeventd(8)  lvmetad(8)  lvmpolld(8) lvmlockd(8) lvmlockctl(8) clvmd(8)
1243       cmirrord(8) lvmdbusd(8)
1244
1245       lvmsystemid(7) lvmreport(7) lvmraid(7) lvmthin(7) lvmcache(7)
1246
1247
1248
1249Red Hat, Inc.         LVM TOOLS 2.02.183(2) (2018-12-07)           LVCREATE(8)
Impressum