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 设​​​​​​​备​​​​​​​扫​​​​​​​描​​​​​​​”.