创建1000M逻辑卷
# lvcreate -l 1000 -n lv0 vg1 Logical volume "lv0" created # ls /dev/vg1/lv0
使用-L参数
# lvcreate -L 100G -n lv3 vg1 Logical volume "lv3" created
# lvdisplay --- Logical volume --- LV Name /dev/vg1/lv0 VG Name vg1 LV UUID DyvPgz-VFjs-gu58-mxNX-ybCm-tcUP-kKk90y LV Write Access read/write LV Status available # open 0 LV Size 40.00 GiB Current LE 10239 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:0 --- Logical volume --- LV Name /dev/vg1/lv1 VG Name vg1 LV UUID 8Nbuio-w2CH-euVD-9LNB-3Dcd-frS0-Cm3EBD LV Write Access read/write LV Status available # open 0 LV Size 3.91 GiB Current LE 1000 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:1
# lvcreate -l 1000 -n lv1 vg1 Logical volume "lv1" created # lvdisplay --- Logical volume --- LV Name /dev/vg1/lv0 VG Name vg1 LV UUID DyvPgz-VFjs-gu58-mxNX-ybCm-tcUP-kKk90y LV Write Access read/write LV Status available # open 0 LV Size 40.00 GiB Current LE 10239 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:0 --- Logical volume --- LV Name /dev/vg1/lv1 VG Name vg1 LV UUID 8Nbuio-w2CH-euVD-9LNB-3Dcd-frS0-Cm3EBD LV Write Access read/write LV Status available # open 0 LV Size 3.91 GiB Current LE 1000 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:1 # lvremove /dev/vg1/lv1 Do you really want to remove active logical volume lv1? [y/n]: y Logical volume "lv1" successfully removed # lvdisplay --- Logical volume --- LV Name /dev/vg1/lv0 VG Name vg1 LV UUID DyvPgz-VFjs-gu58-mxNX-ybCm-tcUP-kKk90y LV Write Access read/write LV Status available # open 0 LV Size 40.00 GiB Current LE 10239 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:0
原文出处:Netkiller 系列 手札
本文作者:陈景峯
转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。