Device /dev/sdb1 not found (or ignored by filtering)
Solution 1:
The partition type in the MBR is set to "ee
" meaning that there should be a GPT partition table on the disk, but as parted
shows, there isn't a GPT table at all.
You need to either:
a) use parted to make a GPT partition, and use that partition as the PV
b) remove the partition table from the MBR altogether and just use block device /dev/sdb
as the PV
Solution 2:
I found that I either needed to reboot the server or run 'partprobe /dev/sdaX' in order for pvcreate to be properly informed of the partition.
Also, fdisk is not lvm aware so it was handing out errors about partitions making me think there was a bigger problem when that was simply not the case.
Solution 3:
Please run the below command before pvcreate
partprobe
partprobe /dev/sdb
Then run your command
pvcreate /dev/sdb1
Note : Sometimes you need to update your kernel manually. Thats why the above command required.
Solution 4:
The block device type could also be a problem. If you run pvcreate
with -vvvv
and you see an error like "Skipping: Unrecognised LVM device type 251", then you have to add the magic number to the allowed devices list.
Just look up the device type for the number in /proc/devices
and add it to the devices
section of the lvm config /etc/lvm/lvm.conf
, for example:
types = [ "bcache", 251 ]
That's it, you can now use pvcreate
as expected.
Solution 5:
Your parted output shows that you don't have any partitions, thus /dev/sdb1
doesn't exist. You need to create the partition first.