Real size of a Ceph RBD image
RBD images are thin-provisionned thus you don’t always know the real size of the image. Moreover, Ceph doesn’t provide any simple facility to check the real size of an image. This blog post took his inspiration from the Ceph mailing list.
Create an image:
The magic formula using block differential:
1 2 3 4 5 6 7 8 9 10
So we wrote 10M, we should get 10MB in the ouput :).
Thanks to Olivier Bonvalet for the AWK command.