系統(tǒng)之家 - 系統(tǒng)光盤下載網(wǎng)站!

當(dāng)前位置:系統(tǒng)之家 > 系統(tǒng)教程 > Linux創(chuàng)建使用LVM

Linux如何創(chuàng)建使用LVM(2)

時間:2015-02-12 17:35:12 作者:qipeng 來源:系統(tǒng)之家 1. 掃描二維碼隨時看資訊 2. 請使用手機瀏覽器訪問: https://m.xitongzhijia.net/xtjc/20150212/38335.html 手機查看 評論

 。踨oot@station106 ~]# vgs

  VG #PV #LV #SN Attr VSize VFree

  myvg 3 0 0 wz--n- 30.00g 30.00g

  5)創(chuàng)建邏輯卷,lvcreate。

 。踨oot@station106 ~]# lvcreate -L 10G -n test myvg

  Logical volume “test” created

  -L:空間大小。

  -n:邏輯卷名稱。

 。踨oot@station106 ~]# lvdisplay /dev/myvg/test

  --- Logical volume ---

  LV Path /dev/myvg/test

  LV Name test

  VG Name myvg

  LV UUID wY1YUF-f0o6-jzu1-mtTL-64p0-qvfC-3QfF8y

  LV Write Access read/write

  LV Creation host, time station106.magelinux.com, 2014-02-10 11:18:43 +0800

  LV Status available

  # open 0

  LV Size 10.00 GiB

  Current LE 2560

  Segments 1

  Allocation inherit

  Read ahead sectors auto

  - currently set to 256

  Block device 253:4

  6)掛載使用創(chuàng)建好的邏輯卷。

  mke2fs -t ext4 /dev/myvg/test 格式化。

  mount /dev/myvg/test /mnt/掛載使用。

  7)假如有一天邏輯卷不夠用了。怎么從卷組擴展呢?如下分析。

  邏輯卷擴展的大致步驟:

  1,先確定擴展的大小,并確保所屬的卷組有足夠的剩余空間。

  我現(xiàn)在要擴展5G,本身是10G的大小。命令如下:

 。踨oot@station106 ~]# lvextend -L +5G /dev/myvg/test

  Extending logical volume test to 15.00 GiB

  Logical volume test successfully resized

  2,擴展物理邊界。物理邊界指的是本身的物理邊緣大小。

 。踨oot@station106 ~]# lvdisplay /dev/myvg/test

  --- Logical volume ---

  LV Path /dev/myvg/test

  LV Name test

  VG Name myvg

  LV UUID wY1YUF-f0o6-jzu1-mtTL-64p0-qvfC-3QfF8y

  LV Write Access read/write

  LV Creation host, time station106.magelinux.com, 2014-02-10 11:18:43 +0800

  LV Status available

  # open 1

  LV Size 15.00 GiB

  Current LE 3840

  Segments 2

  Allocation inherit

  Read ahead sectors auto

  - currently set to 256

  Block device 253:4

標(biāo)簽 LVM

發(fā)表評論

0

沒有更多評論了

評論就這些咯,讓大家也知道你的獨特見解

立即評論

以上留言僅代表用戶個人觀點,不代表系統(tǒng)之家立場

其他版本軟件

熱門教程

人氣教程排行

Linux系統(tǒng)推薦

掃碼關(guān)注
掃碼關(guān)注

掃碼關(guān)注 官方交流群 軟件收錄