Linux command
lvcreate 命令
安全
权限或系统影响较大,执行前请核对目标。
常用示例
Example
sudo lvcreate -L 10G vg1
Example
sudo lvcreate -L 1500M -n mylv vg1
Example
sudo lvcreate -l 60%VG -n mylv vg1
Example
sudo lvcreate -l 100%FREE -n mylv vg1
说明
lvcreate creates a logical volume in an existing volume group. Logical volumes are virtual block devices that can span multiple physical volumes and support features like snapshots, striping, and mirroring.
参数
- -L, --size _size_
- Specify size (e.g., 10G, 1500M)
- -l, --extents _extents_
- Specify size in extents or percentage (%VG, %FREE, %PVS)
- -n, --name _name_
- Name for the logical volume
- -s, --snapshot
- Create a snapshot volume
- -T, --thin
- Create a thin pool or thin volume
- --thinpool _pool_
- Specify thin pool for thin volume
- -m, --mirrors _count_
- Create a mirrored volume
- -i, --stripes _count_
- Number of stripes for striped volume
FAQ
What is the lvcreate command used for?
lvcreate creates a logical volume in an existing volume group. Logical volumes are virtual block devices that can span multiple physical volumes and support features like snapshots, striping, and mirroring.
How do I run a basic lvcreate example?
Run `sudo lvcreate -L 10G vg1` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -L, --size _size_ do in lvcreate?
Specify size (e.g., 10G, 1500M)