Show Table of Contents
6.2. 顯示錯誤裝置的相關資訊
您可使用
lvs 或 vgs 指令的 -P 引數來顯示原本不會出現在輸出中,有關於錯誤卷冊的相關資訊。此引數允許某些作業的進行,儘管內部的 metadata 並不完全地一致。比方說,若構成卷冊群組 vg 的其中一個裝置發生錯誤的話,vgs 指令可能會顯示下列輸出。
# vgs -o +devices
Volume group "vg" not found
若您指定了
vgs 指令的 -P 引數的話,卷冊群組還是無法使用,不過您可看見更多有關於錯誤裝置的相關資訊。
# vgs -P -o +devices
Partial mode. Incomplete volume groups will be activated read-only.
VG #PV #LV #SN Attr VSize VFree Devices
vg 9 2 0 rz-pn- 2.11T 2.07T unknown device(0)
vg 9 2 0 rz-pn- 2.11T 2.07T unknown device(5120),/dev/sda1(0)
在此範例中,錯誤的裝置會造成卷冊群組中的線性和等量邏輯卷冊發生錯誤。缺少了
-P 引數的 lvs 指令會顯示下列輸出。
# lvs -a -o +devices
Volume group "vg" not found
使用
-P 引數來顯示錯誤的邏輯卷冊。
# lvs -P -a -o +devices
Partial mode. Incomplete volume groups will be activated read-only.
LV VG Attr LSize Origin Snap% Move Log Copy% Devices
linear vg -wi-a- 20.00G unknown device(0)
stripe vg -wi-a- 20.00G unknown device(5120),/dev/sda1(0)
下列範例顯示了當某個鏡像邏輯卷冊的 leg 發生錯誤時而使用了
-P 引數的 pvs 和 lvs 指令的輸出。
# vgs -a -o +devices -P
Partial mode. Incomplete volume groups will be activated read-only.
VG #PV #LV #SN Attr VSize VFree Devices
corey 4 4 0 rz-pnc 1.58T 1.34T my_mirror_mimage_0(0),my_mirror_mimage_1(0)
corey 4 4 0 rz-pnc 1.58T 1.34T /dev/sdd1(0)
corey 4 4 0 rz-pnc 1.58T 1.34T unknown device(0)
corey 4 4 0 rz-pnc 1.58T 1.34T /dev/sdb1(0)
# lvs -a -o +devices -P
Partial mode. Incomplete volume groups will be activated read-only.
LV VG Attr LSize Origin Snap% Move Log Copy% Devices
my_mirror corey mwi-a- 120.00G my_mirror_mlog 1.95 my_mirror_mimage_0(0),my_mirror_mimage_1(0)
[my_mirror_mimage_0] corey iwi-ao 120.00G unknown device(0)
[my_mirror_mimage_1] corey iwi-ao 120.00G /dev/sdb1(0)
[my_mirror_mlog] corey lwi-ao 4.00M /dev/sdd1(0)

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.