RDB Map Error RBD Sysfs write failed

Source: Internet
Author: User
Tags diff unsupported

Created a RBD image

$ rbd create --size 4096 docker_test

Then, an error occurred when the RBD mirror was mapped to a local device on the Ceph client side.

$ rbd map docker_test --name client.adminrbd: sysfs write failedRBD image feature set mismatch. You can disable features unsupported by the kernel with "rbd feature disable".In some cases useful info is found in syslog - try "dmesg | tail" or so.

Reason:
RBD Some features of the image, OS kernel is not supported, so the mapping fails. We look at what features are supported by the image.

$ rbd info docker_testrbd image ‘docker_test‘:    size 4096 MB in 1024 objects    order 22 (4096 kB objects)    block_name_prefix: rbd_data.43702ae8944a    format: 2    features: layering, exclusive-lock, object-map, fast-diff, deep-flatten    

You can see the feature feature column, because my OS kernel only support layering, others do not support, so we need to disable some of the unsupported features.
Method One:
The unsupported features of this RBD mirror are directly diable:

$ rbd feature disable docker_test exclusive-lock object-map fast-diff deep-flatten

Method Two:
When you create a RBD image, you specify the features you want, such as:

$ rbd create --size 4096 docker_test --image-feature layering

Method Three:
If you want to do this once and for all, modify the Ceph configuration file/etc/ceph/ceph.conf on the server that created the RBD Image command, and under the Global section, add

rbd_default_features = 1

Then create the RDB image.

$ rbd create --size 4096 docker_test

After using the above three methods, view the information of the RBD image.

$ rbd info docker_testrbd image ‘docker_test‘:    size 4096 MB in 1024 objects    order 22 (4096 kB objects)    block_name_prefix: rbd_data.43a22ae8944a    format: 2    features: layering    flags:

Try to map the RDB image to this parcel device again, success!

$ rbd map docker_test --name client.admin/dev/rbd0

RDB Map Error RBD Sysfs write failed

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.