Show Table of Contents
6.2. 在失败的设备中显示信息。
可以使用
lvs 或者 vgs 命令的 -P 参数显示那些没有出现在输出结果中的失败卷的信息。该参数甚至允许一些内部元数据不完全统一时的操作。例如:如果组成卷组 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)
下面的例子显示在镜像逻辑卷的一个分支出错时,带
-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.