Ceph: Modification Time of RBD Images
Get the modification time of a RBD image.
Each RADOS object does maintain a
mtime that you can get via the RADOS tool.
$ sudo rbd create leseb -s 10240
Now check the image properties, we are looking here for the
block_name_prefix in order to identify the objects in RADOS:
$ sudo rbd info leseb
Ok so this gives us:
Given that most of the filesystem structure is built from the start of the device we do not need to bother looking around for all the filesystem block.
The first block is enough, in a RADOS naming it is easy to find out that the first block will be named:
Now let’s look at the properties of that object:
$ sudo rados -p rbd stat rb.0.3b19.74b0dc51.000000000000
And oh suprise! This gives us the
mtime of this object.
So basically everytime there is an operation on the filesystem
For a block based application, this a bit more tricky because we do not know which blocks will be accessed.
So we have to go through all the objects and sort their
ZA WARUDO! TOKI YO TOMARE!