Using a filesystem it is possible to find the physical location of files using filefrag, hdparm or Fibmap.
What about Ceph? Is it possible to find out where a file is stored ? (which OSD, which Disk, where physically on the disk).
Lets say i have a folder with 5 files in it. I would like to create a script that outputs a file that stores the following information: 1.How many blocks is each file split into, 2.Each block --> OSD, 3.Each block --> which Disk, 4.Where (sector) on the disk is each block stored.
I would appreciate any input.
I am not sure if this is what you're looking for, but you can find out SOME information about the location of an object in a Ceph Object Storage Cluster:
http://docs.ceph.com/docs/jewel/rados/operations/monitoring-osd-pg/
For example, if you have a pool "pool-1" and want to find out where your object "testobject-1" is stored, you can get that information with this command (from your mon-node):
Which will give you a result like this:
This tells you that your object is in placement group 7.62 on osd-nodes 1, 0 and 2 / primary partition (p1).
Now you can drill down a bit further, e.g. on your osd.0 node, switch to your root user and cd into
/var/lib/ceph/osd/ceph-0
--> this is the location where the actual blocks are stored. If you do a "ls" you will see this:This is all I could find out, and I don't know how you can actually "read" the contents of the block.
I hope this could help you at least a little bit....