Removal of Rados Block Device images is slow

This document (7022786) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Enterprise Storage 5

Situation

Removing of Rados Block Device (RBD) images takes up to a minute or more to complete.

Resolution

Make sure the images are created with or have the "object-map" feature enabled.

Cause

The object map tracks which blocks of the image are actually allocated and where. Without the "object-map" feature enabled the removal process will try to remove all potential objects from 0 to image size (because it does not have information if the object(s) exist).

Additional Information

Unless the default features are changed, for example to accommodate images to be accessed via iSCSI, the "object-map" feature should be enabled by default. To see which features are enabled for an image issue the following example command (checking the pool called "images" and the image called "test_image"):

:~ # rbd info -p images test_image
rbd image 'test_image':
        size 10240 MB in 2560 objects
        order 22 (4096 kB objects)
        block_name_prefix: rbd_data.d38a238e1f29
        format: 2
        features: layering
        flags:

As can be seen with the above, the "object-map" feature is not present. To add features, or this specific feature, enable it for the image with:

:~ # rbd feature enable images/test_image exclusive-lock object-map

The "exclusive-lock" feature is required as the "object-map" feature depends on it. The feature will now be enabled, however, since the "object-map" feature was not present, the "object-map" will be invalid, rbd info will display the following for such an image:

:~ # rbd info -p images test_image
rbd image 'test_image':
        size 10240 MB in 2560 objects
        order 22 (4096 kB objects)
        block_name_prefix: rbd_data.d38a238e1f29
        format: 2
        features: layering, exclusive-lock, object-map
        flags: object map invalid

As can be seen, the "object map invalid" flag is set, and this is expected. It is also needed to first rebuild the object map if the feature is enabled on existing images:

:~ # rbd object-map -p images rebuild test_image

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:7022786
  • Creation Date: 28-Mar-2018
  • Modified Date:03-Mar-2020
    • SUSE Enterprise Storage

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback@suse.com

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Join Our Community

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.


SUSE Customer Support Quick Reference Guide SUSE Technical Support Handbook Update Advisories
Support FAQ

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.

Go to Customer Center