How to find the location of BUCKET INDEX in Ceph
Ceph how to find the location of BUCKET INDEX, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain in detail for you, people with this need can come to learn, I hope you can gain something.
# # 1. Introduction this article explains how to view the index information corresponding to each BUCKET and the location of the OSD, which can be used as a reference for future operations and maintenance.
# # 2. Experimental process
# 2.1 list all the bucket information under the current system
# radosgw-admin bucket list ["small_rd_test_bucket", "mynewtest", "mytest-2", "xuwenping-bucket-zj-4", "big_rd_test_bucket", "mytest", "my-scs-test", "write_test_bucket",]
The above command shows all the BUCKET involved in the current Ceph object storage system.
# 2.2 View a specific BUCKET attribute
# radosgw-admin bucket stats-- bucket=my-scs-test {"bucket": "my-scs-test", "pool": ".rgw.buckets.zj-1", "index_pool": ".rgw.buckets.index", "id": "default.784974.1", "marker": "default.784974.1", "owner": "zj-user-1", "ver": "0,1901" "master_ver": "0600", "mtime": "2016-01-07 0000VV 23.000000", "max_marker": "usage": {"rgw.main": {"size_kb": 1048870, "size_kb_actual": 1048908, "num_objects": 17}} "bucket_quota": {"enabled": false, "max_size_kb":-1, "max_objects":-1}}
This command shows the name of BUCKET, the data pool, index pool. BUCKET ID.
2.3 check whether the corresponding BUCKET exists # rados-p .rgw.buckets.index ls-| grep "default.784974.1" .dir.default.784974.1
Note: you need to add .dir. Before BUCKET ID here. Is its index in INDEX POOL.
# 2.4 View the key recorded in the corresponding INDEX
# rados-p .rgw.buckets.index listomapkeys .dir.default.784974.1 / home/.TempWrite.py.swp/home/1024/home/TempWrite.py/home/crossdomain.xml/home/download_url.txt/home/region.conf.json/home/region.conf.json.bk/home/result/home/s3Test.cpp/home/s3testInMemory/home/struct_def.h/home/user.md.json/home/user1.md.json/home/user2.md.json/home/user3 .md.json / home/user4.md.json/home/zone.conf.json
Count the number of files
Rados-p .rgw.buckets.index listomapkeys .dir.default.104766.19 | wc-l988847
# 2.5 View the physical location where the corresponding index information is stored
# ceph osdmap .rgw.buckets.index .dir.default.104766.19osdmap e34039 pool '.rgw.buckets.index' (23) object '.dir.default.104766.19' > pg 23.e3579e34 (23.34)-> up
Through the command, we can see that the index information of BUCKET my-scs-test falls on OSD 3rec 16 osd 34, of which 3 is the main one.
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.