Menu Close

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]