The Problem
pvs command shows unknown device and pvs couldn’t find device with UUID for one of the physical volume
# pvs WARNING: Device for PV [UUID] not found or rejected by a filter. Couldn't find device with uuid [UUID]. PV VG Fmt Attr PSize PFree /dev/xvda3 VGExaDb lvm2 a-- <24.50g 508.00m /dev/xvdd1 VGExaDb lvm2 a-- <62.00g 1020.00m [unknown] VGExaDb lvm2 a-m <20.00g <20.00g
The Solution
This can happen if a physical disk is deleted from the server before being removed from VG (LVM). Before applying any steps shown below take a backup of the entire system.
Since the physical disk added to the Volume group is removed and unused or unallocated to any LV, it's safe to remove the disk from LVM VG:
# pvs -o+pv_used WARNING: Device for PV [UUID] not found or rejected by a filter. Couldn't find device with uuid [UUID]. PV VG Fmt Attr PSize PFree Used /dev/xvda3 VGExaDb lvm2 a-- <24.50g 508.00m 24.00g /dev/xvdd1 VGExaDb lvm2 a-- <62.00g 1020.00m 61.00g [unknown] VGExaDb lvm2 a-m <20.00g <20.00g 0
To fix the error/issue execute vgreduce with --removemissing directive.
# vgreduce VGExaDb --removemissing --test
Then execute without --test
# vgreduce VGExaDb --removemissing
Verify with below command for unknown error
# pvs