Red Hat Training
A Red Hat training course is available for Red Hat Enterprise Linux
4.2.2. 顯示實體卷冊
您可使用三項指令來顯示 LVM 實體卷冊的內容:
pvs
、pvdisplay
以及 pvscan
。
The
pvs
command provides physical volume information in a configurable form, displaying one line per physical volume. The pvs
command provides a great deal of format control, and is useful for scripting. For information on using the pvs
command to customize your output, see 節 4.9, “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]
You can define a filter in the
lvm.conf
so that this command will avoid scanning specific physical volumes. For information on using filters to control which devices are scanned, see 節 4.6, “透過過濾器來控制 LVM 裝置掃描(LVM Device Scans)”.