Путеводитель по Руководству Linux

  User  |  Syst  |  Libr  |  Device  |  Files  |  Other  |  Admin  |  Head  |



   lvcreate    ( 8 )

создать логический том (Create a logical volume)

Имя (Name)

lvcreate — Create a logical volume


Синопсис (Synopsis)

lvcreate option_args position_args [ option_args ] [ position_args ]

-a|--activate y|n|ay --addtag Tag --alloc contiguous|cling|cling_by_tags|normal|anywhere| inherit -A|--autobackup y|n -H|--cache --cachedevice PV --cachemetadataformat auto|1|2 --cachemode writethrough|writeback|passthrough --cachepolicy String --cachepool LV --cachesettings String --cachesize Size[m|UNIT] --cachevol LV -c|--chunksize Size[k|UNIT] --commandprofile String --compression y|n --config String -C|--contiguous y|n -d|--debug --deduplication y|n --devices PV --devicesfile String --discards passdown|nopassdown|ignore --driverloaded y|n --errorwhenfull y|n -l|--extents Number[PERCENT] -h|--help -K|--ignoreactivationskip --ignoremonitoring --lockopt String --longhelp -j|--major Number --[raid]maxrecoveryrate Size[k|UNIT] --metadataprofile String --minor Number --[raid]minrecoveryrate Size[k|UNIT] --mirrorlog core|disk -m|--mirrors Number --monitor y|n -n|--name String --nolocking --nosync --noudevsync -p|--permission rw|r -M|--persistent y|n --poolmetadatasize Size[m|UNIT] --poolmetadataspare y|n --profile String -q|--quiet --raidintegrity y|n --raidintegrityblocksize Number --raidintegritymode String -r|--readahead auto|none|Number -R|--regionsize Size[m|UNIT] --reportformat basic|json -k|--setactivationskip y|n --setautoactivation y|n -L|--size Size[m|UNIT] -s|--snapshot -i|--stripes Number -I|--stripesize Size[k|UNIT] -t|--test -T|--thin --thinpool LV --type linear|striped|snapshot|raid|mirror|thin|thin-pool| vdo|vdo-pool|cache|cache-pool|writecache --vdo --vdopool LV -v|--verbose --version -V|--virtualsize Size[m|UNIT] -W|--wipesignatures y|n -y|--yes -Z|--zero y|n


Описание (Description)

lvcreate creates a new LV in a VG. For standard LVs, this requires allocating logical extents from the VG's free physical extents. If there is not enough free space, the VG can be extended with other PVs (vgextend(8)), or existing LVs can be reduced or removed (lvremove(8), lvreduce(8)).

To control which PVs a new LV will use, specify one or more PVs as position args at the end of the command line. lvcreate will allocate physical extents only from the specified PVs.

lvcreate can also create snapshots of existing LVs, e.g. for backup purposes. The data in a new snapshot LV represents the content of the original LV from the time the snapshot was created.

RAID LVs can be created by specifying an LV type when creating the LV (see lvmraid(7)). Different RAID levels require different numbers of unique PVs be available in the VG for allocation.

Thin pools (for thin provisioning) and cache pools (for caching) are represented by special LVs with types thin-pool and cache-pool (see lvmthin(7) and lvmcache(7)). The pool LVs are not usable as standard block devices, but the LV names act as references to the pools.

Thin LVs are thinly provisioned from a thin pool, and are created with a virtual size rather than a physical size. A cache LV is the combination of a standard LV with a cache pool, used to cache active portions of the LV to improve performance.

VDO LVs are also provisioned volumes from a VDO pool, and are created with a virtual size rather than a physical size (see lvmvdo(7)).

Usage notes In the usage section below, --size Size can be replaced with --extents Number. See descriptions in the options section.

In the usage section below, --name is omitted from the required options, even though it is typically used. When the name is not specified, a new LV name is generated with the "lvol" prefix and a unique numeric suffix.

In the usage section below, when creating a pool and the name is omitted the new LV pool name is generated with the "vpool" for vdo-pools for prefix and a unique numeric suffix.

Pool name can be specified together with VG name i.e.: vg00/mythinpool.