LVCREATE(8) | LVCREATE(8) |
-c, --chunksize ChunkSize | Power of 2 chunk size for the snapshot logical volume between 4k and 512k. |
-C, --contiguous y|n | Sets or resets the contiguous allocation policy for logical volumes. Default is no contiguous allocation based on a next free principle. |
-i, --stripes Stripes | Gives the number of stripes. This is equal to the number of physical volumes to scatter the logical volume. |
-I, --stripesize StripeSize |
Gives the number of kilobytes for the granularity of the stripes. |
-l, --extents LogicalExtentsNumber[%{VG|PVS|FREE}] | Gives the number of logical extents to allocate for the new logical volume. This can also be expressed as a percentage of the total space in the Volume Group with the suffix %VG, of the remaining free space in the Volume Group with the suffix %FREE, or of the remaining free space for the specified PhysicalVolume(s) with the suffix %PVS, |
-L, --size LogicalVolumeSize[kKmMgGtTpPeE] |
Gives the size to allocate for the new logical volume. A size suffix of K for kilobytes, M for megabytes, G for gigabytes, T for terabytes, P for petabytes or E for exabytes is optional. |
--minor minor | Set the minor number. |
-M, --persistent y|n | Set to y to make the minor number specified persistent. |
-m, --mirrors Mirrors |
Creates a mirrored logical volume with Mirrors copies. For example, specifying "-m 1" would result in a mirror with two-sides; that is, a linear volume plus one copy. Specifying the optional argument --nosync will cause the creation of the mirror to skip the initial resynchronization. Any data written afterwards will be mirrored, but the original contents will not be copied. This is useful for skipping a potentially long and resource intensive initial sync of an empty device. The optional argument --mirrorlog specifies the type of log to be used. The default is disk, which is persistent and requires a small amount of storage space, usually on a separate device from the data being mirrored. Using core means the mirror is regenerated by copying the data from the first device again each time the device is activated, for example, after every reboot. The optional argument --corelog is equivalent to --mirrorlog core.
|
-n, --name LogicalVolumeName |
The name for the new logical volume. |
-p, --permission r|rw |
Set access permissions to read only or read and write. |
-r, --readahead ReadAheadSectors|auto|none | Set read ahead sector count of this logical volume. For volume groups with metadata in lvm1 format, this must be a value between 2 and 120. The default value is "auto" which allows the kernel to choose a suitable value automatically. "None" is equivalent to specifying zero. |
-R, --regionsize MirrorLogRegionSize | A mirror is divided into regions of this size (in MB), and the mirror log uses this granularity to track which regions are in sync. |
-s, --snapshot | Create a snapshot logical volume (or snapshot) for an existing, so called original logical volume (or origin). Snapshots provide a 'frozen image' of the contents of the origin while the origin can still be updated. They enable consistent backups and online recovery of removed/overwritten data/files. The snapshot does not need the same amount of storage the origin has. In a typical scenario, 15-20% might be enough. In case the snapshot runs out of storage, use lvextend(8) to grow it. Shrinking a snapshot is supported by lvreduce(8) as well. Run lvdisplay(8) on the snapshot in order to check how much data is allocated to it. |
-Z, --zero y|n |
Controls zeroing of the first KB of data in the new logical volume.
|
"lvcreate -m1 -L 500M vg00" tries to create a mirror logical volume with 2 sides with a useable size of 500 MiB. This operation would require 3 devices - two for the mirror devices and one for the disk log.
"lvcreate -m1 --mirrorlog core -L 500M vg00" tries to create a mirror logical volume with 2 sides with a useable size of 500 MiB. This operation would require 2 devices - the log is "in-memory".
"lvcreate --size 100m --snapshot --name snap /dev/vg00/lvol1"
LVM TOOLS 2.02.44-cvs (02-17-09) | Sistina Software UK |