# pvcreate -vvvv /dev/rbd0 &> /tmp/out # less /tmp/out .... #filters/filter-type.c:27 /dev/rbd0: Skipping: Unrecognised LVM device type 252 ....
查看设备类型ID
cat /proc/devices
可以找到rbd设备类型ID编号为252,记住它后接下来在LVM过滤器配置文件中添加它。
修改LVM过滤器配置文件
vim /etc/lvm/lvm.conf
找到types参数,将rbd和252修改为如下配置:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
... # Configuration section devices. # How LVM uses block devices. devices { ... # Configuration option devices/types. # List of additional acceptable block device types. # These are of device type names from /proc/devices, followed by the # maximum number of partitions. # # Example types = [ "rbd", 252 ] # # This configuration option is advanced. # This configuration option does not have a default value defined. ...