Re: How does CephFS find a file?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 Aotori@xxxxxxxxxxx <Aotori@xxxxxxxxxxx> 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@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Ceph Dev]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux