知乎專欄 | 多維度架構 | 微信號 netkiller-ebook | QQ群:128659835 請註明“讀者” |
創建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