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 「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 「LVM デバイススキャンをフィルターで制御」.