All rights reserved, please indicate the source when citing
lvcreate 建立 LV(Logical Volume)
lvcreate is a command in the context of LVM (Logical Volume Manager) and is used to divide a VG (Volume Group) into one or more LVs (Logical Volumes).
The syntax for the lvcreate command is: lvcreate [OPTIONS] VG_NAME [SIZE].
Some common options for thelvcreate command include:
-n:Specify the name of the logical volume.
-L:Specify the size of the logical volume in capacity units (e.g., MB, GB).
-l:Specify the size of the logical volume in terms of the number of physical extents (PE).
Examples:
# lvcreate -l 10%VG db_vg ←Create an LV by splitting 10% of the VG named 'db_vg'
logical volume "lvo10" created.
# lvcreate -l 100%FREE myVG -n myLV← Create an LV named 'myLV' by using 100% of the VG 'myVG'
logical volume "myLV" created.
For more examples and operations related to lvcreate and LVM, you can refer to the provided link.