Real size of a Ceph RBD image
shan
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:
1
|
|
The magic formula using block differential:
1 2 |
|
Further testing:
1 2 3 4 5 6 7 8 9 10 |
|
So we wrote 10M, we should get 10MB in the ouput :).
1 2 |
|
Thanks to Olivier Bonvalet for the AWK command.