Thursday, April 4, 2013

PV Name unknown device


If you allocate the one volume to one VM and you did created PV after that you did dettach the volume without unmounting the volume.
So here is the procedure how to troubleshoot with it.

[root@localhost ~]#  pvdisplay
  --- Physical volume ---
  PV Name               /dev/sda2
  VG Name               VolGroup00
  PV Size               19.89 GB / not usable 19.49 MB
  Allocatable           yes (but full)
  PE Size (KByte)       32768
  Total PE              636
  Free PE               0
  Allocated PE          636
  PV UUID               KhAEcp-48eH-a3nz-HFzF-sXPt-4duo-Vl0NAa

  --- Physical volume ---
  PV Name               unknown device
  VG Name               VolGroup00
  PV Size               10.00 GB / not usable 32.00 MB
  Allocatable           yes
  PE Size (KByte)       32768
  Total PE              319
  Free PE               319
  Allocated PE          0
  PV UUID               7CeL4J-wKL1-EigZ-YpWc-qufr-Gbwp-UcFOne


[root@localhost ~]# vgreduce --removemissing --force

Now just check following things.. your issue is resolved.
[root@localhost ~]# vgdisplay
 
  --- Volume group ---
  VG Name               VolGroup00
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  4
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                2
  Open LV               2
  Max PV                0
  Cur PV                2
  Act PV                1
  VG Size               29.84 GB
  PE Size               32.00 MB
  Total PE              955
  Alloc PE / Size       636 / 19.88 GB
  Free  PE / Size       319 / 9.97 GB
  VG UUID               7o4aWW-Euef-k2Ti-n4rt-QTB0-6RZr-4u7Y9w