6 C
Texas
Melhttp://www.osradar.com
Guru Unix /Linux and GNU supporter

Remove a Physical Volume listed as an “unknown device”

Remove a Physical Volume listed as an “unknown device” is one of the most known issues for an Linux administrator, and that happen when LVM has scanned the storage stack, but it is unable to find a required PV UUID . also happen when the physical volume was not removed from the volume group first while the disk was already remove from the system .

Let me tell you. how i have fixed it .

My volume group called vgora and long time i have removed the disk (LUN) and forgot to  remove the disk from the volume group

The missing physical volume is part of  vgora group , you can show that with command  pvscan and pvdisplay

- Advertisement -

Now please  clean the unknow physical volumes from vgora

# vgreduce <volume_group_name> --removemissing

In my case

#vgreduce vgora --removemissing

Redhat dont advice to use –force option

Now Check again:

Diplay the physical volumes

# pvdisplay
--- Physical volume ---
PV Name /dev/mapper/mpatha2
VG Name vg00
PV Size 49.51 GiB / not usable 3.00 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 12674
Free PE 898
Allocated PE 11776
PV UUID WApBv4-TU6A-bq7h-HrYz-D76d-Q6Bq-73xOHG

--- Physical volume ---
PV Name /dev/mapper/oracle
VG Name vgora
PV Size 200.00 GiB / not usable 3.00 MiB
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 51199
Free PE 0
Allocated PE 51199
PV UUID 32jutv-K2WS-6ES3-g3pg-ZhhN-m23z-1Q3bz0

--- Physical volume ---
PV Name /dev/mapper/export
VG Name vgexport
PV Size 300.00 GiB / not usable 4.00 MiB
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 76799
Free PE 0
Allocated PE 76799
PV UUID aEfq5E-Qtno-t1ug-TNEB-wyKg-EwSh-YhD0Ov

scan the  physical volumes with command  pvscan 

# pvs
PV VG Fmt Attr PSize PFree
/dev/mapper/export vgexport lvm2 a-- 300.00g 0
/dev/mapper/mpatha2 vg00 lvm2 a-- 49.51g 3.51g
/dev/mapper/oracle vgora lvm2 a-- 200.00g 0

Looks very fine now, the Unknow pv is gone !!.

cheers !!

 

- Advertisement -
Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"

1 COMMENT

LEAVE A REPLY

Please enter your comment!
Please enter your name here



Latest article