Get Unique object id in cephfs

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

 



An HTML attachment was scrubbed...
URL: <http://lists.ceph.com/pipermail/ceph-users-ceph.com/attachments/20140527/d592ada2/attachment.htm>
-------------- next part --------------
Shashank,
I will just show you how to get unique object id in cephfs, this maybe kind of help to you in rgw.
I mount the kernel client in /cephdir , and version is ceph-v0.80. 


1. list inodes of all files (inode is decimal)
 root at ceph0:~# ls -i /cephdir
1099511627784 ceph-configure.sh  1099511627776 uuid  1099511627780 xx


decimal  ----> hexdecimal
1099511627776 100000000000
1099511627780 100000000004
1099511627784 100000000008


2. list all objects in data (in hexdecimal)
for cephfs, all file objects are in pool data
root at ceph0:~# rados -p data ls -
10000000000.00000000
10000000008.00000000
10000000004.00000000


object id format is :
<inode_no>.<object_no>
If file more than size of object(usually 4194304 or 4MB),
file will be split into pieces of objects,
object id likes this:
10000000000.00000000, 10000000000.00000001, 10000000000.00000002 , ......


file oid mapping   
object                 ->  file     
10000000000.00000000   ->  uuid
10000000008.00000000   ->  ceph-configure.sh
10000000004.00000000   ->  xx


3. to comfirm file content
take /cephdir/uuid for example
get content of file:
root at ceph0:~# cat /cephdir/uuid
befbb574-e1a9-11e3-afed-a0481c7c0900



get content of object:
root at ceph0:~# rados -p data get 10000000000.00000000 -
befbb574-e1a9-11e3-afed-a0481c7c0900



object 10000000000.00000000 's content is the same as file /cephdir/uuid,
so, 10000000000.00000000 is the unique id of /cephdir/uuid (its size is 37 < 4914304, so there is only a object)


rgw 's data pool maybe the same as cephfs


                                       min chen

















[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