lvcreate

Logical volumes used to create LVM

Supplementary instructions

lvcreate command is used to create LVM logical volumes. Logical volumes are created on top of volume groups. The device file corresponding to the logical volume is stored in the volume group directory. For example, if a logical volume "lvol0" is created on the volume group "vg1000", the device file corresponding to the logical volume is "/dev/vg1000/lvol0".

grammar

lvcreate(options)(parameters)

Options

-L: Specify the size of the logical volume, the unit is "kKmMgGtT" bytes;
-l: Specify the size of the logical volume (number of LEs).

Parameters

Logical volume: Specify the name of the logical volume to be created.

Example

Use the lvcreate command to create a 200MB logical volume on volume group "vg1000". Enter the following command at the command line:

[root@localhost ~]# lvcreate -L 200M vg1000 #Create a logical volume with a size of 200M

The output information is as follows:

Logical volume "lvol0" created

Note: After successful creation, the new logical volume "lvol0" will be accessed through the device file /dev/vg1000/lvol0.