Show Table of Contents
4.2.2. 顯示實體卷冊
您可使用三項指令來顯示 LVM 實體卷冊的內容:
pvs、pvdisplay 以及 pvscan。
pvs 指令會將實體卷冊資訊以可配置的格式顯示(一個實體卷冊一行)。pvs 指令提供了許多格式控制,並且對於進行 script 相當有幫助。如欲取得使用 pvs 指令來自訂化您的輸出的相關資訊,請參閱〈節 4.8, “LVM 的自訂化回報”〉。
pvdisplay 指令會為各個實體卷冊提供詳細的多行輸出。它會以一個固定的格式來顯示實體的內容(大小、扇區、卷冊群組等等)。
下列範例顯示了針對於單獨實體卷冊所執行的
pvdisplay 指令的輸出。
# pvdisplay
--- Physical volume ---
PV Name /dev/sdc1
VG Name new_vg
PV Size 17.14 GB / not usable 3.40 MB
Allocatable yes
PE Size (KByte) 4096
Total PE 4388
Free PE 4375
Allocated PE 13
PV UUID Joqlch-yWSj-kuEn-IdwM-01S9-XO8M-mcpsVe
pvscan 指令會掃描系統中所有受支援的 LVM 區塊裝置來作為實體卷冊。
下列指令顯示了所有發現的實體裝置:
# pvscan
PV /dev/sdb2 VG vg0 lvm2 [964.00 MB / 0 free]
PV /dev/sdc1 VG vg0 lvm2 [964.00 MB / 428.00 MB free]
PV /dev/sdc2 lvm2 [964.84 MB]
Total: 3 [2.83 GB] / in use: 2 [1.88 GB] / in no VG: 1 [964.84 MB]
您可在
lvm.conf 中定義一個過濾器,如此一來這項指令將會避免掃描特定的實體卷冊。欲取得如何使用過濾器來控制哪些裝置需被掃描的相關資訊,請查看〈節 4.5, “透過過濾器來控制 LVM 裝置掃描(LVM Device Scans)”〉。

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.