I'm fairly new to CephFS, but in my poking around with it, this is what I
understand.

The MDS manages dentries as omap (simple key/value database) entries in the
metadada pool. Each dentry keeps a list of filenames and some metadata
about the file such as inode number and some other info such as size I
presume (can't find a documentation outlining the binary format of the
omap, just did enough digging to find the inode location). The MDS can
return the inode and size to the client and the client looks up the OSDs
for the inode using the CRUSH map and dividing the size by the stripe size
to know how many objects to fetch for the whole object. The file is stored
by the inode (in hex) appended by the object offset. The inode corresponds
to the same value in `ls -li` in CephFS converted to hex.

I hope that is correct and useful as a starting point for you.
----------------
Robert LeBlanc
PGP Fingerprint 79A2 9CA4 6CC4 45DD A904  C70E E654 3BB2 FA62 B9F1


On Mon, Aug 19, 2019 at 2:37 AM aot...@outlook.com <aot...@outlook.com>
wrote:

> I am a student new to cephfs. I think there are 2 steps to finding a file:
>
> 1.    Find out which objects belong to this file.
>
> 2.    Use CRUSH to find out OSDs.
>
>
>
> What I don’t know is how does CephFS get the object list of the file. Does
> MDS save all object list of all files? Or CRUSH can use some
> information(what information?) to calculate the list of objects? In other
> words, where is the object list of the file saved?
> _______________________________________________
> ceph-users mailing list
> ceph-users@lists.ceph.com
> http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
>
_______________________________________________
ceph-users mailing list
ceph-users@lists.ceph.com
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

Reply via email to