1LVCREATE(8) System Manager's Manual LVCREATE(8)
2
3
4
6 lvcreate — Create a logical volume
7
9 lvcreate option_args position_args
10 [ option_args ]
11 [ position_args ]
12
13 -a|--activate y|n|ay
14 --addtag Tag
15 --alloc contiguous|cling|cling_by_tags|normal|anywhere|inherit
16 -A|--autobackup y|n
17 -H|--cache
18 --cachedevice PV
19 --cachemetadataformat auto|1|2
20 --cachemode writethrough|writeback|passthrough
21 --cachepolicy String
22 --cachepool LV
23 --cachesettings String
24 --cachesize Size[m|UNIT]
25 --cachevol LV
26 -c|--chunksize Size[k|UNIT]
27 --commandprofile String
28 --compression y|n
29 --config String
30 -C|--contiguous y|n
31 -d|--debug
32 --deduplication y|n
33 --devices PV
34 --devicesfile String
35 --discards passdown|nopassdown|ignore
36 --driverloaded y|n
37 --errorwhenfull y|n
38 -l|--extents Number[PERCENT]
39 -h|--help
40 -K|--ignoreactivationskip
41 --ignoremonitoring
42 --journal String
43 --lockopt String
44 --longhelp
45 -j|--major Number
46 --[raid]maxrecoveryrate Size[k|UNIT]
47 --metadataprofile String
48 --minor Number
49 --[raid]minrecoveryrate Size[k|UNIT]
50 --mirrorlog core|disk
51 -m|--mirrors Number
52 --monitor y|n
53 -n|--name String
54 --nohints
55 --nolocking
56 --nosync
57 --noudevsync
58 -p|--permission rw|r
59 -M|--persistent y|n
60 --poolmetadatasize Size[m|UNIT]
61 --poolmetadataspare y|n
62 --profile String
63 -q|--quiet
64 --raidintegrity y|n
65 --raidintegrityblocksize Number
66 --raidintegritymode String
67 -r|--readahead auto|none|Number
68 -R|--regionsize Size[m|UNIT]
69 --reportformat basic|json|json_std
70 -k|--setactivationskip y|n
71 --setautoactivation y|n
72 -L|--size Size[m|UNIT]
73 -s|--snapshot
74 -i|--stripes Number
75 -I|--stripesize Size[k|UNIT]
76 -t|--test
77 -T|--thin
78 --thinpool LV
79 --type linear|striped|snapshot|raid|mirror|thin|thin-pool|vdo|
80 vdo-pool|cache|cache-pool|writecache
81 --vdo
82 --vdopool LV
83 --vdosettings String
84 -v|--verbose
85 --version
86 -V|--virtualsize Size[m|UNIT]
87 -W|--wipesignatures y|n
88 -y|--yes
89 -Z|--zero y|n
90
92 lvcreate creates a new LV in a VG. For standard LVs, this requires al‐
93 locating logical extents from the VG's free physical extents. If there
94 is not enough free space, the VG can be extended with other PVs (vgex‐
95 tend(8)), or existing LVs can be reduced or removed (lvremove(8), lvre‐
96 duce(8)).
97
98 To control which PVs a new LV will use, specify one or more PVs as po‐
99 sition args at the end of the command line. lvcreate will allocate
100 physical extents only from the specified PVs.
101
102 lvcreate can also create snapshots of existing LVs, e.g. for backup
103 purposes. The data in a new snapshot LV represents the content of the
104 original LV from the time the snapshot was created.
105
106 RAID LVs can be created by specifying an LV type when creating the LV
107 (see lvmraid(7)). Different RAID levels require different numbers of
108 unique PVs be available in the VG for allocation.
109
110 Thin pools (for thin provisioning) and cache pools (for caching) are
111 represented by special LVs with types thin-pool and cache-pool (see
112 lvmthin(7) and lvmcache(7)). The pool LVs are not usable as standard
113 block devices, but the LV names act as references to the pools.
114
115 Thin LVs are thinly provisioned from a thin pool, and are created with
116 a virtual size rather than a physical size. A cache LV is the combina‐
117 tion of a standard LV with a cache pool, used to cache active portions
118 of the LV to improve performance.
119
120 VDO LVs are also provisioned volumes from a VDO pool, and are created
121 with a virtual size rather than a physical size (see lvmvdo(7)).
122
123 Usage notes
124 In the usage section below, --size Size can be replaced with --extents
125 Number. See descriptions in the options section.
126
127 In the usage section below, --name is omitted from the required op‐
128 tions, even though it is typically used. When the name is not speci‐
129 fied, a new LV name is generated with the "lvol" prefix and a unique
130 numeric suffix.
131
132 In the usage section below, when creating a pool and the name is omit‐
133 ted the new LV pool name is generated with the "vpool" for vdo-pools
134 for prefix and a unique numeric suffix.
135
136 Pool name can be specified together with VG name i.e.: vg00/mythinpool.
137
139 Create a linear LV.
140
141 lvcreate -L|--size Size[m|UNIT] VG
142 [ --type linear ] (implied)
143 [ -l|--extents Number[PERCENT] ]
144 [ COMMON_OPTIONS ]
145 [ PV ... ]
146
147 —
148
149 Create a striped LV.
150
151 lvcreate -i|--stripes Number -L|--size Size[m|UNIT] VG
152 [ --type striped ] (implied)
153 [ -l|--extents Number[PERCENT] ]
154 [ -I|--stripesize Size[k|UNIT] ]
155 [ COMMON_OPTIONS ]
156 [ PV ... ]
157
158 —
159
160 Create a raid1 or mirror LV.
161
162 lvcreate -m|--mirrors Number -L|--size Size[m|UNIT] VG
163 [ --type raid1|mirror ] (implied)
164 [ -l|--extents Number[PERCENT] ]
165 [ -I|--stripesize Size[k|UNIT] ]
166 [ -R|--regionsize Size[m|UNIT] ]
167 [ --mirrorlog core|disk ]
168 [ --[raid]minrecoveryrate Size[k|UNIT] ]
169 [ --[raid]maxrecoveryrate Size[k|UNIT] ]
170 [ COMMON_OPTIONS ]
171 [ PV ... ]
172
173 —
174
175 Create a raid LV (a specific raid level must be used, e.g. raid1).
176
177 lvcreate --type raid -L|--size Size[m|UNIT] VG
178 [ -l|--extents Number[PERCENT] ]
179 [ -i|--stripes Number ]
180 [ -I|--stripesize Size[k|UNIT] ]
181 [ -m|--mirrors Number ]
182 [ -R|--regionsize Size[m|UNIT] ]
183 [ --[raid]minrecoveryrate Size[k|UNIT] ]
184 [ --[raid]maxrecoveryrate Size[k|UNIT] ]
185 [ --raidintegrity y|n ]
186 [ --raidintegritymode String ]
187 [ --raidintegrityblocksize Number ]
188 [ COMMON_OPTIONS ]
189 [ PV ... ]
190
191 —
192
193 Create a raid10 LV.
194
195 lvcreate -m|--mirrors Number -i|--stripes Number
196 -L|--size Size[m|UNIT] VG
197 [ --type raid10 ] (implied)
198 [ -l|--extents Number[PERCENT] ]
199 [ -I|--stripesize Size[k|UNIT] ]
200 [ -R|--regionsize Size[m|UNIT] ]
201 [ --[raid]minrecoveryrate Size[k|UNIT] ]
202 [ --[raid]maxrecoveryrate Size[k|UNIT] ]
203 [ COMMON_OPTIONS ]
204 [ PV ... ]
205
206 —
207
208 Create a COW snapshot LV of an origin LV.
209
210 lvcreate -s|--snapshot -L|--size Size[m|UNIT] LV
211 [ --type snapshot ] (implied)
212 [ -l|--extents Number[PERCENT] ]
213 [ -i|--stripes Number ]
214 [ -I|--stripesize Size[k|UNIT] ]
215 [ -c|--chunksize Size[k|UNIT] ]
216 [ COMMON_OPTIONS ]
217 [ PV ... ]
218
219 —
220
221 Create a thin pool.
222
223 lvcreate --type thin-pool -L|--size Size[m|UNIT] VG
224 [ -l|--extents Number[PERCENT] ]
225 [ -i|--stripes Number ]
226 [ -I|--stripesize Size[k|UNIT] ]
227 [ -T|--thin ]
228 [ -c|--chunksize Size[k|UNIT] ]
229 [ --thinpool LV_new ]
230 [ --discards passdown|nopassdown|ignore ]
231 [ --errorwhenfull y|n ]
232 [ --poolmetadatasize Size[m|UNIT] ]
233 [ --poolmetadataspare y|n ]
234 [ COMMON_OPTIONS ]
235 [ PV ... ]
236
237 —
238
239 Create a cache pool.
240
241 lvcreate --type cache-pool -L|--size Size[m|UNIT] VG
242 [ -l|--extents Number[PERCENT] ]
243 [ -i|--stripes Number ]
244 [ -I|--stripesize Size[k|UNIT] ]
245 [ -H|--cache ]
246 [ -c|--chunksize Size[k|UNIT] ]
247 [ --cachemode writethrough|writeback|passthrough ]
248 [ --cachepolicy String ]
249 [ --cachesettings String ]
250 [ --cachemetadataformat auto|1|2 ]
251 [ --poolmetadatasize Size[m|UNIT] ]
252 [ --poolmetadataspare y|n ]
253 [ COMMON_OPTIONS ]
254 [ PV ... ]
255
256 —
257
258 Create a thin LV in a thin pool.
259
260 lvcreate -V|--virtualsize Size[m|UNIT] --thinpool LV VG
261 [ --type thin ] (implied)
262 [ -T|--thin ]
263 [ COMMON_OPTIONS ]
264
265 —
266
267 Create a thin LV that is a snapshot of an existing thin LV.
268
269 lvcreate -s|--snapshot LV1
270 [ --type thin ] (implied)
271 [ COMMON_OPTIONS ]
272
273 LV1 types: thin
274
275 —
276
277 Create a thin LV that is a snapshot of an external origin LV.
278
279 lvcreate --type thin --thinpool LV LV
280 [ -T|--thin ]
281 [ COMMON_OPTIONS ]
282
283 —
284
285 Create a LV that returns VDO when used.
286
287 lvcreate --type vdo -L|--size Size[m|UNIT] VG
288 [ -l|--extents Number[PERCENT] ]
289 [ -i|--stripes Number ]
290 [ -I|--stripesize Size[k|UNIT] ]
291 [ -V|--virtualsize Size[m|UNIT] ]
292 [ --vdo ]
293 [ --vdopool LV_new ]
294 [ --compression y|n ]
295 [ --deduplication y|n ]
296 [ --vdosettings String ]
297 [ COMMON_OPTIONS ]
298 [ PV ... ]
299
300 —
301
302 Create a new LV, then attach the specified cachepool
303 which converts the new LV to type cache.
304
305 lvcreate --type cache -L|--size Size[m|UNIT]
306 --cachepool LV VG
307 [ -l|--extents Number[PERCENT] ]
308 [ -i|--stripes Number ]
309 [ -I|--stripesize Size[k|UNIT] ]
310 [ -H|--cache ]
311 [ -c|--chunksize Size[k|UNIT] ]
312 [ --cachemode writethrough|writeback|passthrough ]
313 [ --cachepolicy String ]
314 [ --cachesettings String ]
315 [ --cachemetadataformat auto|1|2 ]
316 [ --poolmetadatasize Size[m|UNIT] ]
317 [ --poolmetadataspare y|n ]
318 [ COMMON_OPTIONS ]
319 [ PV ... ]
320
321 —
322
323 Create a new LV, then attach the specified cachevol
324 which converts the new LV to type cache.
325
326 lvcreate --type cache -L|--size Size[m|UNIT]
327 --cachevol LV VG
328 [ -l|--extents Number[PERCENT] ]
329 [ -i|--stripes Number ]
330 [ -I|--stripesize Size[k|UNIT] ]
331 [ -c|--chunksize Size[k|UNIT] ]
332 [ --cachemode writethrough|writeback|passthrough ]
333 [ --cachepolicy String ]
334 [ --cachesettings String ]
335 [ --cachemetadataformat auto|1|2 ]
336 [ COMMON_OPTIONS ]
337 [ PV ... ]
338
339 —
340
341 Create a new LV, then attach a cachevol created from
342 the specified cache device, which converts the
343 new LV to type cache.
344
345 lvcreate --type cache -L|--size Size[m|UNIT]
346 --cachedevice PV VG
347 [ -l|--extents Number[PERCENT] ]
348 [ -i|--stripes Number ]
349 [ -I|--stripesize Size[k|UNIT] ]
350 [ -c|--chunksize Size[k|UNIT] ]
351 [ --cachesize Size[m|UNIT] ]
352 [ --cachemode writethrough|writeback|passthrough ]
353 [ --cachepolicy String ]
354 [ --cachesettings String ]
355 [ --cachemetadataformat auto|1|2 ]
356 [ COMMON_OPTIONS ]
357 [ PV ... ]
358
359 —
360
361 Create a new LV, then attach the specified cachevol
362 which converts the new LV to type writecache.
363
364 lvcreate --type writecache -L|--size Size[m|UNIT]
365 --cachevol LV VG
366 [ -l|--extents Number[PERCENT] ]
367 [ -i|--stripes Number ]
368 [ -I|--stripesize Size[k|UNIT] ]
369 [ --cachesettings String ]
370 [ COMMON_OPTIONS ]
371 [ PV ... ]
372
373 —
374
375 Create a new LV, then attach a cachevol created from
376 the specified cache device, which converts the
377 new LV to type writecache.
378
379 lvcreate --type writecache -L|--size Size[m|UNIT]
380 --cachedevice PV VG
381 [ -l|--extents Number[PERCENT] ]
382 [ -i|--stripes Number ]
383 [ -I|--stripesize Size[k|UNIT] ]
384 [ --cachesize Size[m|UNIT] ]
385 [ --cachesettings String ]
386 [ COMMON_OPTIONS ]
387 [ PV ... ]
388
389 —
390
391 Common options for command:
392 [ -a|--activate y|n|ay ]
393 [ -A|--autobackup y|n ]
394 [ -C|--contiguous y|n ]
395 [ -K|--ignoreactivationskip ]
396 [ -j|--major Number ]
397 [ -n|--name String ]
398 [ -p|--permission rw|r ]
399 [ -M|--persistent y|n ]
400 [ -r|--readahead auto|none|Number ]
401 [ -k|--setactivationskip y|n ]
402 [ -W|--wipesignatures y|n ]
403 [ -Z|--zero y|n ]
404 [ --addtag Tag ]
405 [ --alloc contiguous|cling|cling_by_tags|normal|anywhere|inherit
406 ]
407 [ --ignoremonitoring ]
408 [ --metadataprofile String ]
409 [ --minor Number ]
410 [ --monitor y|n ]
411 [ --nosync ]
412 [ --noudevsync ]
413 [ --reportformat basic|json|json_std ]
414 [ --setautoactivation y|n ]
415
416 Common options for lvm:
417 [ -d|--debug ]
418 [ -h|--help ]
419 [ -q|--quiet ]
420 [ -t|--test ]
421 [ -v|--verbose ]
422 [ -y|--yes ]
423 [ --commandprofile String ]
424 [ --config String ]
425 [ --devices PV ]
426 [ --devicesfile String ]
427 [ --driverloaded y|n ]
428 [ --journal String ]
429 [ --lockopt String ]
430 [ --longhelp ]
431 [ --nohints ]
432 [ --nolocking ]
433 [ --profile String ]
434 [ --version ]
435
437 -a|--activate y|n|ay
438 Controls the active state of the new LV. y makes the LV active,
439 or available. New LVs are made active by default. n makes the
440 LV inactive, or unavailable, only when possible. In some cases,
441 creating an LV requires it to be active. For example, COW snap‐
442 shots of an active origin LV can only be created in the active
443 state (this does not apply to thin snapshots). The --zero op‐
444 tion normally requires the LV to be active. If autoactivation
445 ay is used, the LV is only activated if it matches an item in
446 lvm.conf(5) activation/auto_activation_volume_list. ay implies
447 --zero n and --wipesignatures n. See lvmlockd(8) for more in‐
448 formation about activation options for shared VGs.
449
450 --addtag Tag
451 Adds a tag to a PV, VG or LV. This option can be repeated to add
452 multiple tags at once. See lvm(8) for information about tags.
453
454 --alloc contiguous|cling|cling_by_tags|normal|anywhere|inherit
455 Determines the allocation policy when a command needs to allo‐
456 cate Physical Extents (PEs) from the VG. Each VG and LV has an
457 allocation policy which can be changed with vgchange/lvchange,
458 or overridden on the command line. normal applies common sense
459 rules such as not placing parallel stripes on the same PV. in‐
460 herit applies the VG policy to an LV. contiguous requires new
461 PEs be placed adjacent to existing PEs. cling places new PEs on
462 the same PV as existing PEs in the same stripe of the LV. If
463 there are sufficient PEs for an allocation, but normal does not
464 use them, anywhere will use them even if it reduces performance,
465 e.g. by placing two stripes on the same PV. Optional positional
466 PV args on the command line can also be used to limit which PVs
467 the command will use for allocation. See lvm(8) for more infor‐
468 mation about allocation.
469
470 -A|--autobackup y|n
471 Specifies if metadata should be backed up automatically after a
472 change. Enabling this is strongly advised! See vgcfgbackup(8)
473 for more information.
474
475 -H|--cache
476 Specifies the command is handling a cache LV or cache pool. See
477 --type cache and --type cache-pool. See lvmcache(7) for more
478 information about LVM caching.
479
480 --cachedevice PV
481 The name of a device to use for a cache.
482
483 --cachemetadataformat auto|1|2
484 Specifies the cache metadata format used by cache target.
485
486 --cachemode writethrough|writeback|passthrough
487 Specifies when writes to a cache LV should be considered com‐
488 plete. writeback considers a write complete as soon as it is
489 stored in the cache pool. writethough considers a write com‐
490 plete only when it has been stored in both the cache pool and on
491 the origin LV. While writethrough may be slower for writes, it
492 is more resilient if something should happen to a device associ‐
493 ated with the cache pool LV. With passthrough, all reads are
494 served from the origin LV (all reads miss the cache) and all
495 writes are forwarded to the origin LV; additionally, write hits
496 cause cache block invalidates. See lvmcache(7) for more informa‐
497 tion.
498
499 --cachepolicy String
500 Specifies the cache policy for a cache LV. See lvmcache(7) for
501 more information.
502
503 --cachepool LV
504 The name of a cache pool.
505
506 --cachesettings String
507 Specifies tunable kernel options for dm-cache or dm-writecache
508 LVs. Use the form 'option=value' or 'option1=value option2=val‐
509 ue', or repeat --cachesettings for each option being set. These
510 settings override the default kernel behaviors which are usually
511 adequate. To remove cachesettings and revert to the default ker‐
512 nel behaviors, use --cachesettings 'default' for dm-cache or an
513 empty string --cachesettings '' for dm-writecache. See lvm‐
514 cache(7) for more information.
515
516 --cachesize Size[m|UNIT]
517 The size of cache to use.
518
519 --cachevol LV
520 The name of a cache volume.
521
522 -c|--chunksize Size[k|UNIT]
523 The size of chunks in a snapshot, cache pool or thin pool. For
524 snapshots, the value must be a power of 2 between 4 KiB and
525 512 KiB and the default value is 4. For a cache pool the value
526 must be between 32 KiB and 1 GiB and the default value is 64.
527 For a thin pool the value must be between 64 KiB and 1 GiB and
528 the default value starts with 64 and scales up to fit the pool
529 metadata size within 128 MiB, if the pool metadata size is not
530 specified. The value must be a multiple of 64 KiB. See
531 lvmthin(7) and lvmcache(7) for more information.
532
533 --commandprofile String
534 The command profile to use for command configuration. See
535 lvm.conf(5) for more information about profiles.
536
537 --compression y|n
538 Controls whether compression is enabled or disable for VDO vol‐
539 ume. See lvmvdo(7) for more information about VDO usage.
540
541 --config String
542 Config settings for the command. These override lvm.conf(5) set‐
543 tings. The String arg uses the same format as lvm.conf(5), or
544 may use section/field syntax. See lvm.conf(5) for more informa‐
545 tion about config.
546
547 -C|--contiguous y|n
548 Sets or resets the contiguous allocation policy for LVs. De‐
549 fault is no contiguous allocation based on a next free princi‐
550 ple. It is only possible to change a non-contiguous allocation
551 policy to contiguous if all of the allocated physical extents in
552 the LV are already contiguous.
553
554 -d|--debug ...
555 Set debug level. Repeat from 1 to 6 times to increase the detail
556 of messages sent to the log file and/or syslog (if configured).
557
558 --deduplication y|n
559 Controls whether deduplication is enabled or disable for VDO
560 volume. See lvmvdo(7) for more information about VDO usage.
561
562 --devices PV
563 Restricts the devices that are visible and accessible to the
564 command. Devices not listed will appear to be missing. This op‐
565 tion can be repeated, or accepts a comma separated list of de‐
566 vices. This overrides the devices file.
567
568 --devicesfile String
569 A file listing devices that LVM should use. The file must exist
570 in /etc/lvm/devices/ and is managed with the lvmdevices(8) com‐
571 mand. This overrides the lvm.conf(5) devices/devicesfile and
572 devices/use_devicesfile settings.
573
574 --discards passdown|nopassdown|ignore
575 Specifies how the device-mapper thin pool layer in the kernel
576 should handle discards. ignore causes the thin pool to ignore
577 discards. nopassdown causes the thin pool to process discards
578 itself to allow reuse of unneeded extents in the thin pool.
579 passdown causes the thin pool to process discards itself (like
580 nopassdown) and pass the discards to the underlying device. See
581 lvmthin(7) for more information.
582
583 --driverloaded y|n
584 If set to no, the command will not attempt to use device-mapper.
585 For testing and debugging.
586
587 --errorwhenfull y|n
588 Specifies thin pool behavior when data space is exhausted. When
589 yes, device-mapper will immediately return an error when a thin
590 pool is full and an I/O request requires space. When no, de‐
591 vice-mapper will queue these I/O requests for a period of time
592 to allow the thin pool to be extended. Errors are returned if
593 no space is available after the timeout. (Also see dm-thin-pool
594 kernel module option no_space_timeout.) See lvmthin(7) for more
595 information.
596
597 -l|--extents Number[PERCENT]
598 Specifies the size of the new LV in logical extents. The --size
599 and --extents options are alternate methods of specifying size.
600 The total number of physical extents used will be greater when
601 redundant data is needed for RAID levels. An alternate syntax
602 allows the size to be determined indirectly as a percentage of
603 the size of a related VG, LV, or set of PVs. The suffix %VG de‐
604 notes the total size of the VG, the suffix %FREE the remaining
605 free space in the VG, and the suffix %PVS the free space in the
606 specified PVs. For a snapshot, the size can be expressed as a
607 percentage of the total size of the origin LV with the suffix
608 %ORIGIN (100%ORIGIN provides space for the whole origin). When
609 expressed as a percentage, the size defines an upper limit for
610 the number of logical extents in the new LV. The precise number
611 of logical extents in the new LV is not determined until the
612 command has completed.
613
614 -h|--help
615 Display help text.
616
617 -K|--ignoreactivationskip
618 Ignore the "activation skip" LV flag during activation to allow
619 LVs with the flag set to be activated.
620
621 --ignoremonitoring
622 Do not interact with dmeventd unless --monitor is specified. Do
623 not use this if dmeventd is already monitoring a device.
624
625 --journal String
626 Record information in the systemd journal. This information is
627 in addition to information enabled by the lvm.conf log/journal
628 setting. command: record information about the command. out‐
629 put: record the default command output. debug: record full com‐
630 mand debugging.
631
632 --lockopt String
633 Used to pass options for special cases to lvmlockd. See lvm‐
634 lockd(8) for more information.
635
636 --longhelp
637 Display long help text.
638
639 -j|--major Number
640 Sets the major number of an LV block device.
641
642 --[raid]maxrecoveryrate Size[k|UNIT]
643 Sets the maximum recovery rate for a RAID LV. The rate value is
644 an amount of data per second for each device in the array. Set‐
645 ting the rate to 0 means it will be unbounded. See lvmraid(7)
646 for more information.
647
648 --metadataprofile String
649 The metadata profile to use for command configuration. See
650 lvm.conf(5) for more information about profiles.
651
652 --minor Number
653 Sets the minor number of an LV block device.
654
655 --[raid]minrecoveryrate Size[k|UNIT]
656 Sets the minimum recovery rate for a RAID LV. The rate value is
657 an amount of data per second for each device in the array. Set‐
658 ting the rate to 0 means it will be unbounded. See lvmraid(7)
659 for more information.
660
661 --mirrorlog core|disk
662 Specifies the type of mirror log for LVs with the "mirror" type
663 (does not apply to the "raid1" type.) disk is a persistent log
664 and requires a small amount of storage space, usually on a sepa‐
665 rate device from the data being mirrored. core is not persis‐
666 tent; the log is kept only in memory. In this case, the mirror
667 must be synchronized (by copying LV data from the first device
668 to others) each time the LV is activated, e.g. after reboot.
669 mirrored is a persistent log that is itself mirrored, but should
670 be avoided. Instead, use the raid1 type for log redundancy.
671
672 -m|--mirrors Number
673 Specifies the number of mirror images in addition to the origi‐
674 nal LV image, e.g. --mirrors 1 means there are two images of the
675 data, the original and one mirror image. Optional positional PV
676 args on the command line can specify the devices the images
677 should be placed on. There are two mirroring implementations:
678 "raid1" and "mirror". These are the names of the corresponding
679 LV types, or "segment types". Use the --type option to specify
680 which to use (raid1 is default, and mirror is legacy) Use
681 lvm.conf(5) global/mirror_segtype_default and global/raid10_seg‐
682 type_default to configure the default types. See the --nosync
683 option for avoiding initial image synchronization. See lvm‐
684 raid(7) for more information.
685
686 --monitor y|n
687 Start (yes) or stop (no) monitoring an LV with dmeventd.
688 dmeventd monitors kernel events for an LV, and performs automat‐
689 ed maintenance for the LV in reponse to specific events. See
690 dmeventd(8) for more information.
691
692 -n|--name String
693 Specifies the name of a new LV. When unspecified, a default
694 name of "lvol#" is generated, where # is a number generated by
695 LVM.
696
697 --nohints
698 Do not use the hints file to locate devices for PVs. A command
699 may read more devices to find PVs when hints are not used. The
700 command will still perform standard hint file invalidation where
701 appropriate.
702
703 --nolocking
704 Disable locking. Use with caution, concurrent commands may pro‐
705 duce incorrect results.
706
707 --nosync
708 Causes the creation of mirror, raid1, raid4, raid5 and raid10 to
709 skip the initial synchronization. In case of mirror, raid1 and
710 raid10, any data written afterwards will be mirrored, but the
711 original contents will not be copied. In case of raid4 and
712 raid5, no parity blocks will be written, though any data written
713 afterwards will cause parity blocks to be stored. This is use‐
714 ful for skipping a potentially long and resource intensive ini‐
715 tial sync of an empty mirror/raid1/raid4/raid5 and raid10 LV.
716 This option is not valid for raid6, because raid6 relies on
717 proper parity (P and Q Syndromes) being created during initial
718 synchronization in order to reconstruct proper user date in case
719 of device failures. raid0 and raid0_meta do not provide any da‐
720 ta copies or parity support and thus do not support initial syn‐
721 chronization.
722
723 --noudevsync
724 Disables udev synchronisation. The process will not wait for no‐
725 tification from udev. It will continue irrespective of any pos‐
726 sible udev processing in the background. Only use this if udev
727 is not running or has rules that ignore the devices LVM creates.
728
729 -p|--permission rw|r
730 Set access permission to read only r or read and write rw.
731
732 -M|--persistent y|n
733 When yes, makes the specified minor number persistent.
734
735 --poolmetadatasize Size[m|UNIT]
736 Specifies the size of the new pool metadata LV.
737
738 --poolmetadataspare y|n
739 Enable or disable the automatic creation and management of a
740 spare pool metadata LV in the VG. A spare metadata LV is re‐
741 served space that can be used when repairing a pool.
742
743 --profile String
744 An alias for --commandprofile or --metadataprofile, depending on
745 the command.
746
747 -q|--quiet ...
748 Suppress output and log messages. Overrides --debug and --ver‐
749 bose. Repeat once to also suppress any prompts with answer
750 'no'.
751
752 --raidintegrity y|n
753 Enable or disable data integrity checksums for raid images.
754
755 --raidintegrityblocksize Number
756 The block size to use for dm-integrity on raid images. The in‐
757 tegrity block size should usually match the device logical block
758 size, or the file system block size. It may be less than the
759 file system block size, but not less than the device logical
760 block size. Possible values: 512, 1024, 2048, 4096.
761
762 --raidintegritymode String
763 Use a journal (default) or bitmap for keeping integrity check‐
764 sums consistent in case of a crash. The bitmap areas are recal‐
765 culated after a crash, so corruption in those areas would not be
766 detected. A journal does not have this problem. The journal
767 mode doubles writes to storage, but can improve performance for
768 scattered writes packed into a single journal write. bitmap
769 mode can in theory achieve full write throughput of the device,
770 but would not benefit from the potential scattered write opti‐
771 mization.
772
773 -r|--readahead auto|none|Number
774 Sets read ahead sector count of an LV. auto is the default
775 which allows the kernel to choose a suitable value automatical‐
776 ly. none is equivalent to zero.
777
778 -R|--regionsize Size[m|UNIT]
779 Size of each raid or mirror synchronization region. lvm.conf(5)
780 activation/raid_region_size can be used to configure a default.
781
782 --reportformat basic|json|json_std
783 Overrides current output format for reports which is defined
784 globally by the report/output_format setting in lvm.conf(5).
785 basic is the original format with columns and rows. If there is
786 more than one report per command, each report is prefixed with
787 the report name for identification. json produces report output
788 in JSON format. json_std produces report output in JSON format
789 which is more compliant with JSON standard. See lvmreport(7)
790 for more information.
791
792 -k|--setactivationskip y|n
793 Persistently sets (yes) or clears (no) the "activation skip"
794 flag on an LV. An LV with this flag set is not activated unless
795 the --ignoreactivationskip option is used by the activation com‐
796 mand. This flag is set by default on new thin snapshot LVs.
797 The flag is not applied to deactivation. The current value of
798 the flag is indicated in the lvs lv_attr bits.
799
800 --setautoactivation y|n
801 Set the autoactivation property on a VG or LV. Display the
802 property with vgs or lvs "-o autoactivation". When the autoac‐
803 tivation property is disabled, the VG or LV will not be activat‐
804 ed by a command doing autoactivation (vgchange, lvchange, or
805 pvscan using -aay.) If autoactivation is disabled on a VG, no
806 LVs will be autoactivated in that VG, and the LV autoactivation
807 property has no effect. If autoactivation is enabled on a VG,
808 autoactivation can be disabled for individual LVs.
809
810 -L|--size Size[m|UNIT]
811 Specifies the size of the new LV. The --size and --extents op‐
812 tions are alternate methods of specifying size. The total num‐
813 ber of physical extents used will be greater when redundant data
814 is needed for RAID levels.
815
816 -s|--snapshot
817 Create a snapshot. Snapshots provide a "frozen image" of an ori‐
818 gin LV. The snapshot LV can be used, e.g. for backups, while
819 the origin LV continues to be used. This option can create a
820 COW (copy on write) snapshot, or a thin snapshot (in a thin
821 pool.) Thin snapshots are created when the origin is a thin LV
822 and the size option is NOT specified. Thin snapshots share the
823 same blocks in the thin pool, and do not allocate new space from
824 the VG. Thin snapshots are created with the "activation skip"
825 flag, see --setactivationskip. A thin snapshot of a non-thin
826 "external origin" LV is created when a thin pool is specified.
827 Unprovisioned blocks in the thin snapshot LV are read from the
828 external origin LV. The external origin LV must be read-only.
829 See lvmthin(7) for more information about LVM thin provisioning.
830 COW snapshots are created when a size is specified. The size is
831 allocated from space in the VG, and is the amount of space that
832 can be used for saving COW blocks as writes occur to the origin
833 or snapshot. The size chosen should depend upon the amount of
834 writes that are expected; often 20% of the origin LV is enough.
835 If COW space runs low, it can be extended with lvextend (shrink‐
836 ing is also allowed with lvreduce.) A small amount of the COW
837 snapshot LV size is used to track COW block locations, so the
838 full size is not available for COW data blocks. Use lvs to
839 check how much space is used, and see --monitor to to automati‐
840 cally extend the size to avoid running out of space.
841
842 -i|--stripes Number
843 Specifies the number of stripes in a striped LV. This is the
844 number of PVs (devices) that a striped LV is spread across. Data
845 that appears sequential in the LV is spread across multiple de‐
846 vices in units of the stripe size (see --stripesize). This does
847 not change existing allocated space, but only applies to space
848 being allocated by the command. When creating a RAID 4/5/6 LV,
849 this number does not include the extra devices that are required
850 for parity. The largest number depends on the RAID type (raid0:
851 64, raid10: 32, raid4/5: 63, raid6: 62), and when unspecified,
852 the default depends on the RAID type (raid0: 2, raid10: 2,
853 raid4/5: 3, raid6: 5.) To stripe a new raid LV across all PVs
854 by default, see lvm.conf(5) allocation/raid_stripe_all_devices.
855
856 -I|--stripesize Size[k|UNIT]
857 The amount of data that is written to one device before moving
858 to the next in a striped LV.
859
860 -t|--test
861 Run in test mode. Commands will not update metadata. This is
862 implemented by disabling all metadata writing but nevertheless
863 returning success to the calling function. This may lead to un‐
864 usual error messages in multi-stage operations if a tool relies
865 on reading back metadata it believes has changed but hasn't.
866
867 -T|--thin
868 Specifies the command is handling a thin LV or thin pool. See
869 --type thin, --type thin-pool, and --virtualsize. See
870 lvmthin(7) for more information about LVM thin provisioning.
871
872 --thinpool LV
873 The name of a thin pool LV.
874
875 --type linear|striped|snapshot|raid|mirror|thin|thin-pool|vdo|vdo-pool|
876 cache|cache-pool|writecache
877 The LV type, also known as "segment type" or "segtype". See us‐
878 age descriptions for the specific ways to use these types. For
879 more information about redundancy and performance (raid<N>, mir‐
880 ror, striped, linear) see lvmraid(7). For thin provisioning
881 (thin, thin-pool) see lvmthin(7). For performance caching
882 (cache, cache-pool) see lvmcache(7). For copy-on-write snap‐
883 shots (snapshot) see usage definitions. For VDO (vdo) see lvmv‐
884 do(7). Several commands omit an explicit type option because
885 the type is inferred from other options or shortcuts (e.g.
886 --stripes, --mirrors, --snapshot, --virtualsize, --thin,
887 --cache, --vdo). Use inferred types with care because it can
888 lead to unexpected results.
889
890 --vdo
891 Specifies the command is handling VDO LV. See --type vdo. See
892 lvmvdo(7) for more information about VDO usage.
893
894 --vdopool LV
895 The name of a VDO pool LV. See lvmvdo(7) for more information
896 about VDO usage.
897
898 --vdosettings String
899 Specifies tunable VDO options for VDO LVs. Use the form 'op‐
900 tion=value' or 'option1=value option2=value', or repeat
901 --vdosettings for each option being set. These settings over‐
902 ride the default VDO behaviors. To remove vdosettings and re‐
903 vert to the default VDO behaviors, use --vdosettings 'default'.
904 See lvmvdo(7) for more information.
905
906 -v|--verbose ...
907 Set verbose level. Repeat from 1 to 4 times to increase the de‐
908 tail of messages sent to stdout and stderr.
909
910 --version
911 Display version information.
912
913 -V|--virtualsize Size[m|UNIT]
914 The virtual size of a new thin LV. See lvmthin(7) for more in‐
915 formation about LVM thin provisioning. Using virtual size (-V)
916 and actual size (-L) together creates a sparse LV. lvm.conf(5)
917 global/sparse_segtype_default determines the default segment
918 type used to create a sparse LV. Anything written to a sparse
919 LV will be returned when reading from it. Reading from other
920 areas of the LV will return blocks of zeros. When using a snap‐
921 shot to create a sparse LV, a hidden virtual device is created
922 using the zero target, and the LV has the suffix _vorigin.
923 Snapshots are less efficient than thin provisioning when creat‐
924 ing large sparse LVs (GiB).
925
926 -W|--wipesignatures y|n
927 Controls detection and subsequent wiping of signatures on new
928 LVs. There is a prompt for each signature detected to confirm
929 its wiping (unless --yes is used to override confirmations.)
930 When not specified, signatures are wiped whenever zeroing is
931 done (see --zero). This behaviour can be configured with
932 lvm.conf(5) allocation/wipe_signatures_when_zeroing_new_lvs. If
933 blkid wiping is used (lvm.conf(5) allocation/use_blkid_wiping)
934 and LVM is compiled with blkid wiping support, then the blkid(8)
935 library is used to detect the signatures (use blkid -k to list
936 the signatures that are recognized). Otherwise, native LVM code
937 is used to detect signatures (only MD RAID, swap and LUKS signa‐
938 tures are detected in this case.) The LV is not wiped if the
939 read only flag is set.
940
941 -y|--yes
942 Do not prompt for confirmation interactively but always assume
943 the answer yes. Use with extreme caution. (For automatic no,
944 see -qq.)
945
946 -Z|--zero y|n
947 Controls zeroing of the first 4 KiB of data in the new LV. De‐
948 fault is y. Snapshot COW volumes are always zeroed. For thin
949 pools, this controls zeroing of provisioned blocks. LV is not
950 zeroed if the read only flag is set. Warning: trying to mount
951 an unzeroed LV can cause the system to hang.
952
954 VG Volume Group name. See lvm(8) for valid names. For lvcreate,
955 the required VG positional arg may be omitted when the VG name
956 is included in another option, e.g. --name VG/LV.
957
958 LV Logical Volume name. See lvm(8) for valid names. An LV posi‐
959 tional arg generally includes the VG name and LV name, e.g.
960 VG/LV. LV1 indicates the LV must have a specific type, where
961 the accepted LV types are listed. (raid represents raid<N>
962 type).
963
964 PV Physical Volume name, a device path under /dev. For commands
965 managing physical extents, a PV positional arg generally accepts
966 a suffix indicating a range (or multiple ranges) of physical ex‐
967 tents (PEs). When the first PE is omitted, it defaults to the
968 start of the device, and when the last PE is omitted it defaults
969 to end. Start and end range (inclusive): PV[:PE-PE]... Start
970 and length range (counting from 0): PV[:PE+PE]...
971
972 String See the option description for information about the string con‐
973 tent.
974
975 Size[UNIT]
976 Size is an input number that accepts an optional unit. Input
977 units are always treated as base two values, regardless of capi‐
978 talization, e.g. 'k' and 'K' both refer to 1024. The default
979 input unit is specified by letter, followed by |UNIT. UNIT rep‐
980 resents other possible input units: b|B is bytes, s|S is sectors
981 of 512 bytes, k|K is KiB, m|M is MiB, g|G is GiB, t|T is TiB,
982 p|P is PiB, e|E is EiB. (This should not be confused with the
983 output control --units, where capital letters mean multiple of
984 1000.)
985
987 See lvm(8) for information about environment variables used by lvm.
988 For example, LVM_VG_NAME can generally be substituted for a required VG
989 parameter.
990
992 Alternate command forms, advanced command usage, and listing of all
993 valid syntax for completeness.
994
995 Create an LV that returns errors when used.
996
997 lvcreate --type error -L|--size Size[m|UNIT] VG
998 [ -l|--extents Number[PERCENT] ]
999 [ COMMON_OPTIONS ]
1000
1001 —
1002
1003 Create an LV that returns zeros when read.
1004
1005 lvcreate --type zero -L|--size Size[m|UNIT] VG
1006 [ -l|--extents Number[PERCENT] ]
1007 [ COMMON_OPTIONS ]
1008
1009 —
1010
1011 Create a linear LV.
1012
1013 lvcreate --type linear -L|--size Size[m|UNIT] VG
1014 [ -l|--extents Number[PERCENT] ]
1015 [ COMMON_OPTIONS ]
1016 [ PV ... ]
1017
1018 —
1019
1020 Create a striped LV (also see lvcreate --stripes).
1021
1022 lvcreate --type striped -L|--size Size[m|UNIT] VG
1023 [ -l|--extents Number[PERCENT] ]
1024 [ -i|--stripes Number ]
1025 [ -I|--stripesize Size[k|UNIT] ]
1026 [ COMMON_OPTIONS ]
1027 [ PV ... ]
1028
1029 —
1030
1031 Create a mirror LV (also see --type raid1).
1032
1033 lvcreate --type mirror -L|--size Size[m|UNIT] VG
1034 [ -l|--extents Number[PERCENT] ]
1035 [ -i|--stripes Number ]
1036 [ -I|--stripesize Size[k|UNIT] ]
1037 [ -m|--mirrors Number ]
1038 [ -R|--regionsize Size[m|UNIT] ]
1039 [ --mirrorlog core|disk ]
1040 [ COMMON_OPTIONS ]
1041 [ PV ... ]
1042
1043 —
1044
1045 Create a COW snapshot LV of an origin LV
1046 (also see --snapshot).
1047
1048 lvcreate --type snapshot -L|--size Size[m|UNIT] LV
1049 [ -l|--extents Number[PERCENT] ]
1050 [ -s|--snapshot ]
1051 [ -i|--stripes Number ]
1052 [ -I|--stripesize Size[k|UNIT] ]
1053 [ -c|--chunksize Size[k|UNIT] ]
1054 [ COMMON_OPTIONS ]
1055 [ PV ... ]
1056
1057 —
1058
1059 Create a sparse COW snapshot LV of a virtual origin LV
1060 (also see --snapshot).
1061
1062 lvcreate --type snapshot -L|--size Size[m|UNIT]
1063 -V|--virtualsize Size[m|UNIT] VG
1064 [ -l|--extents Number[PERCENT] ]
1065 [ -s|--snapshot ]
1066 [ -c|--chunksize Size[k|UNIT] ]
1067 [ COMMON_OPTIONS ]
1068 [ PV ... ]
1069
1070 —
1071
1072 Create a thin pool.
1073
1074 lvcreate -T|--thin -L|--size Size[m|UNIT] VG
1075 [ --type thin-pool ] (implied)
1076 [ -l|--extents Number[PERCENT] ]
1077 [ -i|--stripes Number ]
1078 [ -I|--stripesize Size[k|UNIT] ]
1079 [ -c|--chunksize Size[k|UNIT] ]
1080 [ --discards passdown|nopassdown|ignore ]
1081 [ --errorwhenfull y|n ]
1082 [ --poolmetadatasize Size[m|UNIT] ]
1083 [ --poolmetadataspare y|n ]
1084 [ COMMON_OPTIONS ]
1085 [ PV ... ]
1086
1087 —
1088
1089 Create a thin pool named in --thinpool.
1090
1091 lvcreate -L|--size Size[m|UNIT] --thinpool LV_new VG
1092 [ --type thin-pool ] (implied)
1093 [ -l|--extents Number[PERCENT] ]
1094 [ -i|--stripes Number ]
1095 [ -I|--stripesize Size[k|UNIT] ]
1096 [ -T|--thin ]
1097 [ -c|--chunksize Size[k|UNIT] ]
1098 [ --discards passdown|nopassdown|ignore ]
1099 [ --errorwhenfull y|n ]
1100 [ --poolmetadatasize Size[m|UNIT] ]
1101 [ --poolmetadataspare y|n ]
1102 [ COMMON_OPTIONS ]
1103 [ PV ... ]
1104
1105 —
1106
1107 Create a cache pool named by the --cachepool arg
1108 (variant, uses --cachepool in place of --name).
1109
1110 lvcreate --type cache-pool -L|--size Size[m|UNIT]
1111 --cachepool LV_new VG
1112 [ -l|--extents Number[PERCENT] ]
1113 [ -i|--stripes Number ]
1114 [ -I|--stripesize Size[k|UNIT] ]
1115 [ -H|--cache ]
1116 [ -c|--chunksize Size[k|UNIT] ]
1117 [ --cachemode writethrough|writeback|passthrough ]
1118 [ --cachepolicy String ]
1119 [ --cachesettings String ]
1120 [ --cachemetadataformat auto|1|2 ]
1121 [ --poolmetadatasize Size[m|UNIT] ]
1122 [ --poolmetadataspare y|n ]
1123 [ COMMON_OPTIONS ]
1124 [ PV ... ]
1125
1126 —
1127
1128 Create a thin LV in a thin pool.
1129
1130 lvcreate --type thin -V|--virtualsize Size[m|UNIT]
1131 --thinpool LV VG
1132 [ -T|--thin ]
1133 [ COMMON_OPTIONS ]
1134
1135 —
1136
1137 Create a thin LV in a thin pool named in the first arg
1138 (variant, also see --thinpool for naming pool).
1139
1140 lvcreate --type thin -V|--virtualsize Size[m|UNIT] LV1
1141 [ -T|--thin ]
1142 [ COMMON_OPTIONS ]
1143
1144 LV1 types: thinpool
1145
1146 —
1147
1148 Create a thin LV in the thin pool named in the first arg
1149 (also see --thinpool for naming pool.)
1150
1151 lvcreate -V|--virtualsize Size[m|UNIT] LV1
1152 [ --type thin ] (implied)
1153 [ -T|--thin ]
1154 [ COMMON_OPTIONS ]
1155
1156 LV1 types: thinpool
1157
1158 —
1159
1160 Create a thin LV that is a snapshot of an existing thin LV.
1161
1162 lvcreate --type thin LV1
1163 [ -T|--thin ]
1164 [ COMMON_OPTIONS ]
1165
1166 LV1 types: thin
1167
1168 —
1169
1170 Create a thin LV that is a snapshot of an existing thin LV.
1171
1172 lvcreate -T|--thin LV1
1173 [ --type thin ] (implied)
1174 [ COMMON_OPTIONS ]
1175
1176 LV1 types: thin
1177
1178 —
1179
1180 Create a thin LV that is a snapshot of an external origin LV.
1181
1182 lvcreate -s|--snapshot --thinpool LV LV
1183 [ --type thin ] (implied)
1184 [ COMMON_OPTIONS ]
1185
1186 —
1187
1188 Create a VDO LV with VDO pool.
1189
1190 lvcreate --vdo -L|--size Size[m|UNIT] VG
1191 [ --type vdo ] (implied)
1192 [ -l|--extents Number[PERCENT] ]
1193 [ -i|--stripes Number ]
1194 [ -I|--stripesize Size[k|UNIT] ]
1195 [ -V|--virtualsize Size[m|UNIT] ]
1196 [ --vdopool LV_new ]
1197 [ --compression y|n ]
1198 [ --deduplication y|n ]
1199 [ --vdosettings String ]
1200 [ COMMON_OPTIONS ]
1201 [ PV ... ]
1202
1203 —
1204
1205 Create a VDO LV with VDO pool.
1206
1207 lvcreate --vdopool LV_new -L|--size Size[m|UNIT] VG
1208 [ --type vdo ] (implied)
1209 [ -l|--extents Number[PERCENT] ]
1210 [ -i|--stripes Number ]
1211 [ -I|--stripesize Size[k|UNIT] ]
1212 [ -V|--virtualsize Size[m|UNIT] ]
1213 [ --compression y|n ]
1214 [ --deduplication y|n ]
1215 [ --vdosettings String ]
1216 [ COMMON_OPTIONS ]
1217 [ PV ... ]
1218
1219 —
1220
1221 Create a thin LV, first creating a thin pool for it,
1222 where the new thin pool is named by the --thinpool arg.
1223
1224 lvcreate --type thin -V|--virtualsize Size[m|UNIT]
1225 -L|--size Size[m|UNIT] --thinpool LV_new VG
1226 [ -l|--extents Number[PERCENT] ]
1227 [ -i|--stripes Number ]
1228 [ -I|--stripesize Size[k|UNIT] ]
1229 [ -T|--thin ]
1230 [ -c|--chunksize Size[k|UNIT] ]
1231 [ --discards passdown|nopassdown|ignore ]
1232 [ --errorwhenfull y|n ]
1233 [ --poolmetadatasize Size[m|UNIT] ]
1234 [ --poolmetadataspare y|n ]
1235 [ COMMON_OPTIONS ]
1236 [ PV ... ]
1237
1238 —
1239
1240 Create a thin LV, first creating a thin pool for it,
1241 where the new thin pool is named by --thinpool.
1242
1243 lvcreate -V|--virtualsize Size[m|UNIT] -L|--size Size[m|UNIT]
1244 --thinpool LV_new VG
1245 [ --type thin ] (implied)
1246 [ -l|--extents Number[PERCENT] ]
1247 [ -i|--stripes Number ]
1248 [ -I|--stripesize Size[k|UNIT] ]
1249 [ -T|--thin ]
1250 [ -c|--chunksize Size[k|UNIT] ]
1251 [ --discards passdown|nopassdown|ignore ]
1252 [ --errorwhenfull y|n ]
1253 [ --poolmetadatasize Size[m|UNIT] ]
1254 [ --poolmetadataspare y|n ]
1255 [ COMMON_OPTIONS ]
1256 [ PV ... ]
1257
1258 —
1259
1260 Create a thin LV, first creating a thin pool for it,
1261 where the new thin pool is named in the first arg,
1262 or the new thin pool name is generated when the first
1263 arg is a VG name.
1264
1265 lvcreate --type thin -V|--virtualsize Size[m|UNIT]
1266 -L|--size Size[m|UNIT] VG|LV_new
1267 [ -l|--extents Number[PERCENT] ]
1268 [ -i|--stripes Number ]
1269 [ -I|--stripesize Size[k|UNIT] ]
1270 [ -T|--thin ]
1271 [ -c|--chunksize Size[k|UNIT] ]
1272 [ --discards passdown|nopassdown|ignore ]
1273 [ --errorwhenfull y|n ]
1274 [ --poolmetadatasize Size[m|UNIT] ]
1275 [ --poolmetadataspare y|n ]
1276 [ COMMON_OPTIONS ]
1277 [ PV ... ]
1278
1279 —
1280
1281 Create a thin LV, first creating a thin pool for it,
1282 where the new thin pool is named in the first arg,
1283 or the new thin pool name is generated when the first
1284 arg is a VG name.
1285
1286 lvcreate -T|--thin -V|--virtualsize Size[m|UNIT]
1287 -L|--size Size[m|UNIT] VG|LV_new
1288 [ --type thin ] (implied)
1289 [ -l|--extents Number[PERCENT] ]
1290 [ -i|--stripes Number ]
1291 [ -I|--stripesize Size[k|UNIT] ]
1292 [ -c|--chunksize Size[k|UNIT] ]
1293 [ --discards passdown|nopassdown|ignore ]
1294 [ --errorwhenfull y|n ]
1295 [ --poolmetadatasize Size[m|UNIT] ]
1296 [ --poolmetadataspare y|n ]
1297 [ COMMON_OPTIONS ]
1298 [ PV ... ]
1299
1300 —
1301
1302 Create a thin LV, first creating a thin pool for it.
1303 Create a sparse snapshot of a virtual origin LV
1304 Chooses type thin or snapshot according to
1305 config setting sparse_segtype_default.
1306
1307 lvcreate -L|--size Size[m|UNIT] -V|--virtualsize Size[m|UNIT] VG
1308 [ --type thin|snapshot ] (implied)
1309 [ -l|--extents Number[PERCENT] ]
1310 [ -i|--stripes Number ]
1311 [ -I|--stripesize Size[k|UNIT] ]
1312 [ -s|--snapshot ]
1313 [ -T|--thin ]
1314 [ -c|--chunksize Size[k|UNIT] ]
1315 [ --discards passdown|nopassdown|ignore ]
1316 [ --errorwhenfull y|n ]
1317 [ --poolmetadatasize Size[m|UNIT] ]
1318 [ --poolmetadataspare y|n ]
1319 [ COMMON_OPTIONS ]
1320 [ PV ... ]
1321
1322 —
1323
1324 Create a new LV, then attach the specified cachepool
1325 which converts the new LV to type cache.
1326
1327 lvcreate -L|--size Size[m|UNIT] --cachepool LV VG
1328 [ --type cache ] (implied)
1329 [ -l|--extents Number[PERCENT] ]
1330 [ -i|--stripes Number ]
1331 [ -I|--stripesize Size[k|UNIT] ]
1332 [ -H|--cache ]
1333 [ -c|--chunksize Size[k|UNIT] ]
1334 [ --cachemode writethrough|writeback|passthrough ]
1335 [ --cachepolicy String ]
1336 [ --cachesettings String ]
1337 [ --cachemetadataformat auto|1|2 ]
1338 [ COMMON_OPTIONS ]
1339 [ PV ... ]
1340
1341 —
1342
1343 Create a new LV, then attach the specified cachepool
1344 which converts the new LV to type cache.
1345 (variant, also use --cachepool).
1346
1347 lvcreate --type cache -L|--size Size[m|UNIT] LV1
1348 [ -l|--extents Number[PERCENT] ]
1349 [ -i|--stripes Number ]
1350 [ -I|--stripesize Size[k|UNIT] ]
1351 [ -H|--cache ]
1352 [ -c|--chunksize Size[k|UNIT] ]
1353 [ --cachemode writethrough|writeback|passthrough ]
1354 [ --cachepolicy String ]
1355 [ --cachesettings String ]
1356 [ --cachemetadataformat auto|1|2 ]
1357 [ --poolmetadatasize Size[m|UNIT] ]
1358 [ --poolmetadataspare y|n ]
1359 [ COMMON_OPTIONS ]
1360 [ PV ... ]
1361
1362 LV1 types: cachepool
1363
1364 —
1365
1366 When the LV arg is a cachepool, then create a new LV and
1367 attach the cachepool arg to it.
1368 (variant, use --type cache and --cachepool.)
1369 When the LV arg is not a cachepool, then create a new cachepool
1370 and attach it to the LV arg (alternative, use lvconvert.)
1371
1372 lvcreate -H|--cache -L|--size Size[m|UNIT] LV
1373 [ --type cache ] (implied)
1374 [ -l|--extents Number[PERCENT] ]
1375 [ -c|--chunksize Size[k|UNIT] ]
1376 [ -i|--stripes Number ]
1377 [ -I|--stripesize Size[k|UNIT] ]
1378 [ --cachemode writethrough|writeback|passthrough ]
1379 [ --cachepolicy String ]
1380 [ --cachesettings String ]
1381 [ --cachemetadataformat auto|1|2 ]
1382 [ --poolmetadatasize Size[m|UNIT] ]
1383 [ --poolmetadataspare y|n ]
1384 [ COMMON_OPTIONS ]
1385 [ PV ... ]
1386
1387 —
1388
1390 Create a striped LV with 3 stripes, a stripe size of 8 KiB and a size
1391 of 100 MiB. The LV name is chosen by lvcreate.
1392 lvcreate -i 3 -I 8 -L 100m vg00
1393
1394 Create a raid1 LV with two images, and a useable size of 500 MiB. This
1395 operation requires two devices, one for each mirror image. RAID metada‐
1396 ta (superblock and bitmap) is also included on the two devices.
1397 lvcreate --type raid1 -m1 -L 500m -n mylv vg00
1398
1399 Create a mirror LV with two images, and a useable size of 500 MiB.
1400 This operation requires three devices: two for mirror images and one
1401 for a disk log.
1402 lvcreate --type mirror -m1 -L 500m -n mylv vg00
1403
1404 Create a mirror LV with 2 images, and a useable size of 500 MiB. This
1405 operation requires 2 devices because the log is in memory.
1406 lvcreate --type mirror -m1 --mirrorlog core -L 500m -n mylv vg00
1407
1408 Create a copy-on-write snapshot of an LV:
1409 lvcreate --snapshot --size 100m --name mysnap vg00/mylv
1410
1411 Create a copy-on-write snapshot with a size sufficient for overwriting
1412 20% of the size of the original LV.
1413 lvcreate -s -l 20%ORIGIN -n mysnap vg00/mylv
1414
1415 Create a sparse LV with 1 TiB of virtual space, and actual space just
1416 under 100 MiB.
1417 lvcreate --snapshot --virtualsize 1t --size 100m --name mylv vg00
1418
1419 Create a linear LV with a usable size of 64 MiB on specific physical
1420 extents.
1421 lvcreate -L 64m -n mylv vg00 /dev/sda:0-7 /dev/sdb:0-7
1422
1423 Create a RAID5 LV with a usable size of 5 GiB, 3 stripes, a stripe size
1424 of 64 KiB, using a total of 4 devices (including one for parity).
1425 lvcreate --type raid5 -L 5G -i 3 -I 64 -n mylv vg00
1426
1427 Create a RAID5 LV using all of the free space in the VG and spanning
1428 all the PVs in the VG (note that the command will fail if there are
1429 more than 8 PVs in the VG, in which case -i 7 must be used to get to
1430 the current maximum of 8 devices including parity for RaidLVs).
1431 lvcreate --config allocation/raid_stripe_all_devices=1
1432 --type raid5 -l 100%FREE -n mylv vg00
1433
1434 Create RAID10 LV with a usable size of 5 GiB, using 2 stripes, each on
1435 a two-image mirror. (Note that the -i and -m arguments behave differ‐
1436 ently: -i specifies the total number of stripes, but -m specifies the
1437 number of images in addition to the first image).
1438 lvcreate --type raid10 -L 5G -i 2 -m 1 -n mylv vg00
1439
1440 Create a 1 TiB thin LV mythin, with 256 GiB thinpool tpool0 in vg00.
1441 lvcreate -T -V 1T --size 256G --name mythin vg00/tpool0
1442
1443 Create a 1 TiB thin LV, first creating a new thin pool for it, where
1444 the thin pool has 100 MiB of space, uses 2 stripes, has a 64 KiB stripe
1445 size, and 256 KiB chunk size.
1446 lvcreate --type thin --name mylv --thinpool mypool
1447 -V 1t -L 100m -i 2 -I 64 -c 256 vg00
1448
1449 Create a thin snapshot of a thin LV (the size option must not be used,
1450 otherwise a copy-on-write snapshot would be created).
1451 lvcreate --snapshot --name mysnap vg00/thinvol
1452
1453 Create a thin snapshot of the read-only inactive LV named "origin"
1454 which becomes an external origin for the thin snapshot LV.
1455 lvcreate --snapshot --name mysnap --thinpool mypool vg00/origin
1456
1457 Create a cache pool from a fast physical device. The cache pool can
1458 then be used to cache an LV.
1459 lvcreate --type cache-pool -L 1G -n my_cpool vg00 /dev/fast1
1460
1461 Create a cache LV, first creating a new origin LV on a slow physical
1462 device, then combining the new origin LV with an existing cache pool.
1463 lvcreate --type cache --cachepool my_cpool
1464 -L 100G -n mylv vg00 /dev/slow1
1465
1466 Create a VDO LV vdo0 with VDOPoolLV size of 10 GiB and name vpool1.
1467 lvcreate --vdo --size 10G --name vdo0 vg00/vpool1
1468
1470 lvm(8), lvm.conf(5), lvmconfig(8), lvmdevices(8),
1471
1472 pvchange(8), pvck(8), pvcreate(8), pvdisplay(8), pvmove(8),
1473 pvremove(8), pvresize(8), pvs(8), pvscan(8),
1474
1475 vgcfgbackup(8), vgcfgrestore(8), vgchange(8), vgck(8), vgcreate(8),
1476 vgconvert(8), vgdisplay(8), vgexport(8), vgextend(8), vgimport(8),
1477 vgimportclone(8), vgimportdevices(8), vgmerge(8), vgmknodes(8),
1478 vgreduce(8), vgremove(8), vgrename(8), vgs(8), vgscan(8), vgsplit(8),
1479
1480 lvcreate(8), lvchange(8), lvconvert(8), lvdisplay(8), lvextend(8),
1481 lvreduce(8), lvremove(8), lvrename(8), lvresize(8), lvs(8), lvscan(8),
1482
1483 lvm-fullreport(8), lvm-lvpoll(8), blkdeactivate(8), lvmdump(8),
1484
1485 dmeventd(8), lvmpolld(8), lvmlockd(8), lvmlockctl(8), cmirrord(8),
1486 lvmdbusd(8), fsadm(8),
1487
1488 lvmsystemid(7), lvmreport(7), lvmraid(7), lvmthin(7), lvmcache(7)
1489
1490
1491
1492Red Hat, Inc. LVM TOOLS 2.03.18(2)-git (2022-11-10) LVCREATE(8)