Menu Close

Red Hat Training

A Red Hat training course is available for Red Hat Enterprise Linux

4.4.8. 遞​​​​​​​增​​​​​​​邏​​​​​​​輯​​​​​​​卷​​​​​​​冊​​​​​​​

若​​​​​​​要​​​​​​​增​​​​​​​加​​​​​​​邏​​​​​​​輯​​​​​​​卷​​​​​​​冊​​​​​​​的​​​​​​​大​​​​​​​小​​​​​​​,請​​​​​​​使​​​​​​​用​​​​​​​ lvextend 指​​​​​​​令​​​​​​​。​​​​​​​
延​​​​​​​伸​​​​​​​了​​​​​​​邏​​​​​​​輯​​​​​​​卷​​​​​​​冊​​​​​​​之​​​​​​​後​​​​​​​,您​​​​​​​將​​​​​​​會​​​​​​​需​​​​​​​要​​​​​​​增​​​​​​​加​​​​​​​關​​​​​​​聯​​​​​​​檔​​​​​​​案​​​​​​​系​​​​​​​統​​​​​​​的​​​​​​​大​​​​​​​小​​​​​​​來​​​​​​​進​​​​​​​行​​​​​​​匹​​​​​​​配​​​​​​​。​​​​​​​
當​​​​​​​您​​​​​​​延​​​​​​​伸​​​​​​​邏​​​​​​​輯​​​​​​​卷​​​​​​​冊​​​​​​​時​​​​​​​,您​​​​​​​可​​​​​​​指​​​​​​​定​​​​​​​要​​​​​​​將​​​​​​​卷​​​​​​​冊​​​​​​​延​​​​​​​伸​​​​​​​多​​​​​​​少​​​​​​​或​​​​​​​是​​​​​​​當​​​​​​​您​​​​​​​將​​​​​​​它​​​​​​​延​​​​​​​伸​​​​​​​後​​​​​​​它​​​​​​​應​​​​​​​該​​​​​​​要​​​​​​​多​​​​​​​大​​​​​​​。​​​​​​​
下​​​​​​​列​​​​​​​指​​​​​​​令​​​​​​​會​​​​​​​將​​​​​​​邏​​​​​​​輯​​​​​​​卷​​​​​​​冊​​​​​​​ /dev/myvg/homevol 延​​​​​​​伸​​​​​​​為​​​​​​​ 12 GB。​​​​​​​
# lvextend -L12G /dev/myvg/homevol 
lvextend -- extending logical volume "/dev/myvg/homevol" to 12 GB
lvextend -- doing automatic backup of volume group "myvg"
lvextend -- logical volume "/dev/myvg/homevol" successfully extended
下​​​​​​​列​​​​​​​指​​​​​​​令​​​​​​​會​​​​​​​增​​​​​​​加​​​​​​​額​​​​​​​外​​​​​​​的​​​​​​​ 1GB 至​​​​​​​邏​​​​​​​輯​​​​​​​卷​​​​​​​冊​​​​​​​ /dev/myvg/homevol。​​​​​​​
# lvextend -L+1G /dev/myvg/homevol
lvextend -- extending logical volume "/dev/myvg/homevol" to 13 GB
lvextend -- doing automatic backup of volume group "myvg"
lvextend -- logical volume "/dev/myvg/homevol" successfully extended
就​​​​​​​和​​​​​​​ lvcreate 指​​​​​​​令​​​​​​​相​​​​​​​同​​​​​​​,您​​​​​​​可​​​​​​​使​​​​​​​用​​​​​​​ lvextend 指​​​​​​​令​​​​​​​的​​​​​​​ -l 引​​​​​​​數​​​​​​​來​​​​​​​指​​​​​​​定​​​​​​​扇​​​​​​​區​​​​​​​的​​​​​​​數​​​​​​​量​​​​​​​並​​​​​​​遞​​​​​​​增​​​​​​​邏​​​​​​​輯​​​​​​​卷​​​​​​​冊​​​​​​​的​​​​​​​大​​​​​​​小​​​​​​​。​​​​​​​您​​​​​​​亦​​​​​​​可​​​​​​​使​​​​​​​用​​​​​​​此​​​​​​​引​​​​​​​數​​​​​​​來​​​​​​​指​​​​​​​定​​​​​​​卷​​​​​​​冊​​​​​​​群​​​​​​​組​​​​​​​的​​​​​​​百​​​​​​​分​​​​​​​比​​​​​​​例​​​​​​​,或​​​​​​​是​​​​​​​卷​​​​​​​冊​​​​​​​群​​​​​​​組​​​​​​​剩​​​​​​​下​​​​​​​可​​​​​​​用​​​​​​​空​​​​​​​間​​​​​​​的​​​​​​​百​​​​​​​分​​​​​​​比​​​​​​​。​​​​​​​下​​​​​​​列​​​​​​​指​​​​​​​令​​​​​​​將​​​​​​​會​​​​​​​延​​​​​​​伸​​​​​​​一​​​​​​​個​​​​​​​名​​​​​​​為​​​​​​​ testlv 的​​​​​​​邏​​​​​​​輯​​​​​​​卷​​​​​​​冊​​​​​​​,以​​​​​​​填​​​​​​​滿​​​​​​​卷​​​​​​​冊​​​​​​​群​​​​​​​組​​​​​​​ myvg 中​​​​​​​所​​​​​​​有​​​​​​​未​​​​​​​分​​​​​​​配​​​​​​​的​​​​​​​空​​​​​​​間​​​​​​​。​​​​​​​
[root@tng3-1 ~]# lvextend -l +100%FREE /dev/myvg/testlv
  Extending logical volume testlv to 68.59 GB
  Logical volume testlv successfully resized
在​​​​​​​您​​​​​​​延​​​​​​​伸​​​​​​​了​​​​​​​邏​​​​​​​輯​​​​​​​卷​​​​​​​冊​​​​​​​後​​​​​​​,您​​​​​​​需​​​​​​​要​​​​​​​增​​​​​​​加​​​​​​​檔​​​​​​​案​​​​​​​系​​​​​​​統​​​​​​​大​​​​​​​小​​​​​​​來​​​​​​​進​​​​​​​行​​​​​​​匹​​​​​​​配​​​​​​​。​​​​​​​
就​​​​​​​預​​​​​​​設​​​​​​​值​​​​​​​來​​​​​​​講​​​​​​​,大​​​​​​​部​​​​​​​分​​​​​​​用​​​​​​​來​​​​​​​重​​​​​​​設​​​​​​​檔​​​​​​​案​​​​​​​系​​​​​​​統​​​​​​​大​​​​​​​小​​​​​​​的​​​​​​​工​​​​​​​具​​​​​​​都​​​​​​​會​​​​​​​將​​​​​​​檔​​​​​​​案​​​​​​​系​​​​​​​統​​​​​​​的​​​​​​​大​​​​​​​小​​​​​​​遞​​​​​​​增​​​​​​​為​​​​​​​基​​​​​​​本​​​​​​​邏​​​​​​​輯​​​​​​​卷​​​​​​​冊​​​​​​​的​​​​​​​大​​​​​​​小​​​​​​​,如​​​​​​​此​​​​​​​一​​​​​​​來​​​​​​​您​​​​​​​便​​​​​​​無​​​​​​​須​​​​​​​擔​​​​​​​心​​​​​​​得​​​​​​​為​​​​​​​這​​​​​​​兩​​​​​​​項​​​​​​​指​​​​​​​令​​​​​​​指​​​​​​​定​​​​​​​相​​​​​​​同​​​​​​​的​​​​​​​大​​​​​​​小​​​​​​​。​​​​​​​