How to view the location where the rbd image stores the osd
This article is about how to view the location of rbd images where osd is stored. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
Create a 1G block image # rados mkpool testpool # rbd create testpool/test-- size 102 'rbd info testpool/test rbd image' test': size 1024 MB in 256 objects order 22 (4096 kB objects) block_name_prefix: rb.0.fbe4e.2ae8944a format: 1 View the image mapping location # ceph osdmap testpool rb.0.fbe4e.2ae8944a.000000000000 / / Block device first address osdmap E50 pool' testpool' (15) object 'rb.0.fbe4e.2ae8944a.00000000'-> pg 15.5cf0bd7d (15.3d)-> up ([1LJ 0] P 1) acting ([1J 0], p 1)
Description: the data storage directory is 15.3d._head primary osd=1 replicate osd=0
Enter the osd.1 data storage directory # cd / var/lib/ceph/osd/ceph-1/current/15.3e_head; ll-rw-r--r-- 1 root root 4194304 Mar 12 14:14 rb.0.fbe4e.2ae8944a.000000000000__head_3154DE7E__f
A file defaults to 4m, and the naming of objects will be discussed in the in-depth analysis of rbd articles. Please look forward to it.
# # pressing 10m data into testpool/test
# dd if=/dev/zero of=/dev/rbd/testpool/test bs=1M count=10 View the objects under pool:testpool # rados ls-p rb.0.fbe4e.2ae8944a.000000000000 rb.0.fbe4e.2ae8944a.00000000002c rb.0.fbe4e.2ae8944a.000000000038 rb.0.fbe4e.2ae8944a.000000000073 Thank you for reading! This is the end of the article on "how to check the location of the rbd image where the osd is stored". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!