Linux下删除unknown PV

1.vgdisplay 得到vg Name 为centos

[root@Linux122 guchenfei]# vgdisplay
  --- Volume group ---
  VG Name               centos
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  5
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                2
  Open LV               2
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               <19.00 GiB
  PE Size               4.00 MiB
  Total PE              4863
  Alloc PE / Size       4863 / <19.00 GiB
  Free  PE / Size       0 / 0   
  VG UUID               09i72y-vh64-9DvZ-m85B-MAU8-laD4-HvseBW

2.pvdisplay 查看pv 发现有一个unknown pv

[root@Linux122 guchenfei]# pvdisplay
  WARNING: Device for PV 83QZB3-ZX9A-0BmB-oDqW-Gh7y-QrO8-riPQV0 not found or rejected by a filter.
  Couldn't find device with uuid 83QZB3-ZX9A-0BmB-oDqW-Gh7y-QrO8-riPQV0.
  --- Physical volume ---
  PV Name               /dev/sda2
  VG Name               centos
  PV Size               <19.00 GiB / not usable 3.00 MiB
  Allocatable           yes (but full)
  PE Size               4.00 MiB
  Total PE              4863
  Free PE               0
  Allocated PE          4863
  PV UUID               0Zh72k-0gT0-cREa-k8eY-Ylq9-OpGY-knkfAa
   
  --- Physical volume ---
  PV Name               [unknown]
  VG Name               centos
  PV Size               10.00 GiB / not usable 4.00 MiB
  Allocatable           yes 
  PE Size               4.00 MiB
  Total PE              2559
  Free PE               2559
  Allocated PE          0
  PV UUID               83QZB3-ZX9A-0BmB-oDqW-Gh7y-QrO8-riPQV0
   
  "/dev/sda5" is a new physical volume of "<8.00 GiB"
  --- NEW Physical volume ---
  PV Name               /dev/sda5
  VG Name               
  PV Size               <8.00 GiB
  Allocatable           NO
  PE Size               0   
  Total PE              0
  Free PE               0
  Allocated PE          0
  PV UUID               AtdtdP-MB9r-gUP2-R7o8-SaZw-VWfe-M7wvfo
   
  "/dev/sda3" is a new physical volume of "10.00 GiB"
  --- NEW Physical volume ---
  PV Name               /dev/sda3
  VG Name               
  PV Size               10.00 GiB
  Allocatable           NO
  PE Size               0   
  Total PE              0
  Free PE               0
  Allocated PE          0
  PV UUID               M1gmYR-9Bk9-Z48D-aeFK-N2sT-cd8L-qJr3Lh

3.pvscan

[root@Linux122 guchenfei]# pvscan
  WARNING: Device for PV 83QZB3-ZX9A-0BmB-oDqW-Gh7y-QrO8-riPQV0 not found or rejected by a filter.
  Couldn't find device with uuid 83QZB3-ZX9A-0BmB-oDqW-Gh7y-QrO8-riPQV0.
  PV /dev/sda2   VG centos          lvm2 [<19.00 GiB / 0    free]
  PV [unknown]   VG centos          lvm2 [<10.00 GiB / <10.00 GiB free]
  PV /dev/sda5                      lvm2 [<8.00 GiB]
  PV /dev/sda3                      lvm2 [10.00 GiB]
  Total: 4 [46.99 GiB] / in use: 2 [28.99 GiB] / in no VG: 2 [<18.00 GiB]

4.去除未知或已丢失的VG

vgreduce --removemissing /dev/centos 

5.pvdisplay 显示正常

[root@Linux122 guchenfei]# pvdisplay
  --- Physical volume ---
  PV Name               /dev/sda2
  VG Name               centos
  PV Size               <19.00 GiB / not usable 3.00 MiB
  Allocatable           yes (but full)
  PE Size               4.00 MiB
  Total PE              4863
  Free PE               0
  Allocated PE          4863
  PV UUID               0Zh72k-0gT0-cREa-k8eY-Ylq9-OpGY-knkfAa
   
  "/dev/sda5" is a new physical volume of "<8.00 GiB"
  --- NEW Physical volume ---
  PV Name               /dev/sda5
  VG Name               
  PV Size               <8.00 GiB
  Allocatable           NO
  PE Size               0   
  Total PE              0
  Free PE               0
  Allocated PE          0
  PV UUID               AtdtdP-MB9r-gUP2-R7o8-SaZw-VWfe-M7wvfo
   
  "/dev/sda3" is a new physical volume of "10.00 GiB"
  --- NEW Physical volume ---
  PV Name               /dev/sda3
  VG Name               
  PV Size               10.00 GiB
  Allocatable           NO
  PE Size               0   
  Total PE              0
  Free PE               0
  Allocated PE          0
  PV UUID               M1gmYR-9Bk9-Z48D-aeFK-N2sT-cd8L-qJr3Lh