# 问题: rbd map 失败
[root@ceph1 ceph-deploy]# rbd map ssdpool/rbd-ssd.img
rbd: sysfs write failed
RBD image feature set mismatch. You can disable features unsupported by the kernel with "rbd feature disable ssdpool/rbd-ssd.img object-map fast-diff deep-flatten".
In some cases useful info is found in syslog - try "dmesg | tail".
rbd: map failed: (6) No such device or address
[root@ceph1 ceph-deploy]# dmesg | tail
[10263.739589] libceph: mon0 10.1.31.131:3300 socket closed (con state CONNECTING)
[10264.740372] libceph: mon1 10.1.31.131:6789 session established
[10264.740818] libceph: client4947 fsid eb4d0231-7f7d-4b07-97a8-c84a46c8ac73
[10264.749910] rbd: image rbd-ssd.img: image uses unsupported features: 0x38
[10589.278012] libceph: mon0 10.1.31.131:3300 socket closed (con state CONNECTING)
[10589.733115] libceph: mon0 10.1.31.131:3300 socket closed (con state CONNECTING)
[10590.735130] libceph: mon0 10.1.31.131:3300 socket closed (con state CONNECTING)
[10592.735830] libceph: mon1 10.1.31.131:6789 session established
[10592.736074] libceph: client4974 fsid eb4d0231-7f7d-4b07-97a8-c84a46c8ac73
[10592.743510] rbd: image rbd-ssd.img: image uses unsupported features: 0x38
# 该核心只支持 layering
[root@ceph1 ceph-deploy]# uname -r
3.10.0-1127.19.1.el7.x86_64
[root@ceph1 ceph-deploy]# rbd info ssdpool/rbd-ssd.img
rbd image 'rbd-ssd.img':
size 20 GiB in 5120 objects
order 22 (4 MiB objects)
snapshot_count: 0
id: 1311371f72d2
block_name_prefix: rbd_data.1311371f72d2
format: 2
features: layering, exclusive-lock, object-map, fast-diff, deep-flatten
op_features:
flags:
create_timestamp: Fri Sep 11 12:30:17 2020
access_timestamp: Fri Sep 11 12:30:17 2020
modify_timestamp: Fri Sep 11 12:30:17 2020
解决方法
# 1. 直接修改
rbd feature enable <pool-name>/<image-name> <feature-name>
rbd feature disable <pool-name>/<image-name> <feature-name>
[root@ceph1 ceph-deploy]# rbd feature disable ssdpool/rbd-ssd.img exclusive-lock object-map fast-diff deep-flatten
[root@ceph1 ceph-deploy]# rbd info ssdpool/rbd-ssd.img
rbd image 'rbd-ssd.img':
size 20 GiB in 5120 objects
order 22 (4 MiB objects)
snapshot_count: 0
id: 1311371f72d2
block_name_prefix: rbd_data.1311371f72d2
format: 2
features: layering
op_features:
flags:
create_timestamp: Fri Sep 11 12:30:17 2020
access_timestamp: Fri Sep 11 12:30:17 2020
modify_timestamp: Fri Sep 11 12:30:17 2020
# 2. 修改配置文件
rbd_default_features = 1
END