Show Table of Contents
4.3.6. 由卷冊群組中移除實體卷冊
若要由卷冊群組中移除未使用的實體卷冊,請使用
vgreduce 指令。vgreduce 指令會藉由移除一個或更多個空的實體卷冊來縮減卷冊群組的容量。這會釋放出需要被使用於不同卷冊群組中或是由系統中移除的實體卷冊。
在由一個卷冊群組中移除實體卷冊之前,您可藉由使用
pvdisplay 指令來確認實體卷冊並未被任何邏輯卷冊使用中。
# pvdisplay /dev/hda1
-- Physical volume ---
PV Name /dev/hda1
VG Name myvg
PV Size 1.95 GB / NOT usable 4 MB [LVM: 122 KB]
PV# 1
PV Status available
Allocatable yes (but full)
Cur LV 1
PE Size (KByte) 4096
Total PE 499
Free PE 0
Allocated PE 499
PV UUID Sd44tK-9IRw-SrMC-MOkn-76iP-iftz-OVSen7
若實體卷冊依然使用中,您便必須透過使用
pvmove 指令來將資料遷移至另一個實體卷冊上。然後使用 vgreduce 指令來移除掉實體卷冊:
下列指令會將實體卷冊
/dev/hda1 由 my_volume_group 卷冊群組中移除。
# vgreduce my_volume_group /dev/hda1
Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.