要创建一个名为“testlv”的 1500MB 线性 LV 以及它的块设备特殊文件 '/dev/testvg/testlv'
# lvcreate -L1500 -ntestlv testvg |
要创建一个拥有 2 个条带,条带大小为 4 KB 的 100 LE 大小的逻辑卷。
# lvcreate -i2 -I4 -l100 -nanothertestlv testvg |
如果要创建一个使用整个 VG 的 LV,请使用 vgdisplay 查找"Total PE" 的大小,然后在运行 lvcreate 时使用它。
# vgdisplay testvg | grep "Total PE" Total PE 10230 # lvcreate -l 10230 testvg -n mylv |
如果希望从卷组中的特定物理卷分配逻辑卷,请在 lvcreate 命令行末尾指定 PV 或 PV。
# lvcreate -L 1500 -ntestlv testvg /dev/sdg |