CephFS: determine a file location

Quick tip to determine the location of a file stored on CephFS.

To achieve that we simply need the inode number of this file. For this we will be using stat, just like this:

$ stat -c %i /mnt/blah

Now we get the hex format of the inode:

$ printf '%x\n' 1099511627776

Eventually, we search across our OSD directories:

$ sudo find /var/lib/ceph/osd -name 10000000000*

Tada! That’s all!