执行逻辑卷相关操作全部报错。

pvscan
WARNING: Couldn't find device with uuid WBFjfd-8F6K-MANj-dhJl-KdhH-TY9K-KRws20.
WARNING: Couldn't find device with uuid 4CT30Y-dHSU-EYW9-ZOb4-dVoU-vyCe-l8pDSF.
WARNING: Couldn't find device with uuid ukKpHr-SASY-c1cZ-1VVi-NR6y-VVs9-6JpILL.
WARNING: Couldn't find device with uuid dBmS8A-8cUy-45Gz-okIz-3fQr-FnPq-oIXtAG.
WARNING: VG rootvg is missing PV WBFjfd-8F6K-MANj-dhJl-KdhH-TY9K-KRws20 (last written to [unknown]).
WARNING: VG rootvg is missing PV 4CT30Y-dHSU-EYW9-ZOb4-dVoU-vyCe-l8pDSF (last written to [unknown]).
WARNING: VG rootvg is missing PV ukKpHr-SASY-c1cZ-1VVi-NR6y-VVs9-6JpILL (last written to [unknown]).
WARNING: VG rootvg is missing PV dBmS8A-8cUy-45Gz-okIz-3fQr-FnPq-oIXtAG (last written to [unknown]).
PV [unknown] VG rootvg lvm2 [<25.00 GiB <25.00 GiB free]
PV [unknown] VG rootvg lvm2 [<419.04 GiB / <419.04 GiB free]
PV [unknown] VG rootvg lvm2 [<2.00 TiB / <2.00 TiB free]
PV [unknown] VG rootvg lvm2 [<2.00 TiB / <2.00 TiB free]
PV /dev/mapper/mpathj VG rootvg lvm2 [<2.00 TiB / <2.00 TiB free]
PV /dev/mapper/mpathk VG rootvg lvm2 [<2.00 TiB / <2.00 TiB free]
PV /dev/mapper/mpathl VG rootvg lvm2 [<2.00 TiB / <2.00 TiB free]
PV /dev/sda3 VG rootvg lvm2 [<25.00 GiB / 0 free]
PV /dev/sda5 VG rootvg lvm2 [<419.04 GiB / <178.04 GiB free]
Total: 9 [<10.87 TiB] / in use: 9 [<10.87 TiB] / in no VG: 0 [0 ]
pvdisplay
--- Physical volume ---
PV Name [unknown]
VG Name rootvg
PV Size <25.00 GiB / not usable 2.00 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 6399
Free PE 6399
Allocated PE 0
PV UUID WBFjfd-8F6K-MANj-dhJl-KdhH-TY9K-KRws20
--- Physical volume ---
PV Name [unknown]
VG Name rootvg
PV Size 419.04 GiB / not usable 0
Allocatable yes
PE Size 4.00 MiB
Total PE 107274
Free PE 107274
Allocated PE 0
PV UUID 4CT30Y-dHSU-EYW9-ZOb4-dVoU-vyCe-l8pDSF
--- Physical volume ---
PV Name [unknown]
VG Name rootvg
PV Size 2.00 TiB / not usable 4.00 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 524287
Free PE 524287
Allocated PE 0
PV UUID ukKpHr-SASY-c1cZ-1VVi-NR6y-VVs9-6JpILL
--- Physical volume ---
PV Name [unknown]
VG Name rootvg
PV Size 2.00 TiB / not usable 4.00 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 524287
Free PE 524287
Allocated PE 0
PV UUID dBmS8A-8cUy-45Gz-okIz-3fQr-FnPq-oIXtAG
lvdisplay
WARNING: Couldn't find device with uuid WBFjfd-8F6K-MANj-dhJl-KdhH-TY9K-KRws20.
WARNING: Couldn't find device with uuid 4CT30Y-dHSU-EYW9-ZOb4-dVoU-vyCe-l8pDSF.
WARNING: Couldn't find device with uuid ukKpHr-SASY-c1cZ-1VVi-NR6y-VVs9-6JpILL.
WARNING: Couldn't find device with uuid dBmS8A-8cUy-45Gz-okIz-3fQr-FnPq-oIXtAG.
WARNING: VG rootvg is missing PV WBFjfd-8F6K-MANj-dhJl-KdhH-TY9K-KRws20 (last written to /dev/sda3).
WARNING: VG rootvg is missing PV 4CT30Y-dHSU-EYW9-ZOb4-dVoU-vyCe-l8pDSF (last written to /dev/sda5).
WARNING: VG rootvg is missing PV ukKpHr-SASY-c1cZ-1VVi-NR6y-VVs9-6JpILL (last written to /dev/mapper/mpatha).
WARNING: VG rootvg is missing PV dBmS8A-8cUy-45Gz-okIz-3fQr-FnPq-oIXtAG (last written to /dev/mapper/mpathm).
--- Logical volume ---
LV Path /dev/rootvg/root
LV Name root
VG Name rootvg
LV UUID UeRS9u-aM7N-kvYT-c7iv-Vk08-0ux6-VrMH3s
LV Write Access read/write
LV Creation host, time localhost, 2021-10-25 10:27:11 +0800
LV Status NOT available
LV Size <10.20 TiB
Current LE 2672640
Segments 7
Allocation inherit
Read ahead sectors auto
--- Logical volume ---
LV Path /dev/rootvg/home
LV Name home
VG Name rootvg
LV UUID ES8xsX-VdDO-UJGl-2P86-TxGd-oh8a-EWrMu9
LV Write Access read/write
LV Creation host, time localhost, 2021-10-25 10:27:11 +0800
LV Status NOT available
LV Size 20.00 GiB
Current LE 5120
Segments 2
Allocation inherit
Read ahead sectors auto
--- Logical volume ---
LV Path /dev/rootvg/var
LV Name var
VG Name rootvg
LV UUID zZaVNu-frNd-dtpK-vgWX-Nn7G-Vvqv-pmmL1I
LV Write Access read/write
LV Creation host, time localhost, 2021-10-25 10:27:12 +0800
LV Status NOT available
LV Size 20.00 GiB
Current LE 5120
Segments 2
Allocation inherit
Read ahead sectors auto
--- Logical volume ---
LV Path /dev/rootvg/opt
LV Name opt
VG Name rootvg
LV UUID 8P1x2m-o5YA-TrI1-tcS5-sjpt-oRHV-owhtMp
LV Write Access read/write
LV Creation host, time localhost, 2021-10-25 10:27:13 +0800
LV Status NOT available
LV Size 20.00 GiB
Current LE 5120
Segments 2
Allocation inherit
Read ahead sectors auto
--- Logical volume ---
LV Path /dev/rootvg/swap
LV Name swap
VG Name rootvg
LV UUID DU7Hft-1n9m-lllI-JXfB-Yodz-NcL5-zRIOAf
LV Write Access read/write
LV Creation host, time cmss, 2022-09-07 02:05:23 +0800
LV Status NOT available
LV Size 16.00 GiB
Current LE 4096
Segments 1
Allocation inherit
Read ahead sectors auto
通过vgdisplay、lvdisplay、pvdiskplay发现同名的vg中连系统划分的lv名称也一样,删除相关逻辑卷可能导致操作系统直接hang死。





lvremove -S lv_uuid=UeRS9u-aM7N-kvYT-c7iv-Vk08-0ux6-VrMH3s
lvremove -S lv_uuid=ES8xsX-VdDO-UJGl-2P86-TxGd-oh8a-EWrMu9
lvremove -S lv_uuid=zZaVNu-frNd-dtpK-vgWX-Nn7G-Vvqv-pmmL1I
lvremove -S lv_uuid=8P1x2m-o5YA-TrI1-tcS5-sjpt-oRHV-owhtMp
lvremove -S lv_uuid=DU7Hft-1n9m-lllI-JXfB-Yodz-NcL5-zRIOAf

[vgrename vg_uuid vg_new_name]

[vgreduce --removemissing rootvg]


本文作者:江梦豪(上海新炬中北团队)
本文来源:“IT那活儿”公众号





