Bug 1838701

Summary: [RFE] Online re-sparsification of image
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Jason Dillaman <jdillama>
Component: RBDAssignee: Ilya Dryomov <idryomov>
Status: CLOSED ERRATA QA Contact: Gopi <gpatta>
Severity: medium Docs Contact: Ranjini M N <rmandyam>
Priority: unspecified    
Version: 5.0CC: ceph-eng-bugs, hmunjulu, idryomov, jsisul, kdreyer, mkasturi, owasserm, rmandyam, vereddy
Target Milestone: ---Keywords: FutureFeature
Target Release: 5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ceph-16.0.0-8633.el8cp Doc Type: Enhancement
Doc Text:
.Online re-sparsification of RBD images Previously, reclaiming space for image extents that are zeroed and yet fully allocated in the underlying OSD object store was highly cumbersome and error prone. With this release, the new `rbd sparsify` command can now be used to scan the image for chunks of zero data and deallocate the corresponding ranges in the underlying OSD object store.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-08-30 08:25:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1959686    

Description Jason Dillaman 2020-05-21 15:31:43 UTC
Description of problem:
A new "rbd sparsify <image-spec>" command is available which will scan the image for chunks of zeroed data blocks and will deallocate the corresponding space from the backing RADOS data objects. This works over both replicated and EC pools and should be compatible with krbd if the exclusive-lock feature is not enabled.

Version-Release number of selected component (if applicable):
RHCS 5.0


[1] https://trello.com/c/QVimN8qS

Comment 1 RHEL Program Management 2020-05-21 15:31:49 UTC
Please specify the severity of this bug. Severity is defined here:
https://bugzilla.redhat.com/page.cgi?id=fields.html#bug_severity.

Comment 7 Harish Munjulur 2021-03-23 19:45:18 UTC
working as expected. Moving to verified state. 

steps: 
1. create pool and image 
2. write zeroed blocks 
3. rbd du --exact <image-spec> to check the size before running sparsify
4. rbd sparsify <image-spec>
5. rbd du --exact <image-spec> to check the size after running sparsify

Comment 13 errata-xmlrpc 2021-08-30 08:25:30 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Red Hat Ceph Storage 5.0 bug fix and enhancement), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2021:3294