If you use LVM frequently enough, especially when re-using existing disks, you might come a cross a problem when you’re unable to create a physical volume from that disk. For example, here is what I encountered today when I tried to create a physical volume on a device called
[root@db3 ~]# pvcreate /dev/sdb Device /dev/sdb excluded by a filter.
I’m sure I haven’t had any filters in
To fix this, I needed to wipe the signature from this device with
[root@db3 ~]# wipefs -a /dev/sdb /dev/sdb: 8 bytes were erased at offset 0x00000200 (gpt): 45 46 49 20 50 41 52 54 /dev/sdb: 8 bytes were erased at offset 0x18fffffe00 (gpt): 45 46 49 20 50 41 52 54 /dev/sdb: 2 bytes were erased at offset 0x000001fe (PMBR): 55 aa /dev/sdb: calling ioctl to re-read partition table: Success
Finally, I was able to create the physical volume on
[root@srsdb3 ~]# pvcreate /dev/sdb Physical volume "/dev/sdb" successfully created.