Find the OSD Location

Datetime:2016-08-23 04:07:13         Topic: Ceph          Share        Original >>
Here to See The Original Article!!!

Of course, the simplest way is using the command ceph osd tree .

Note that, if an osd is down, you can see “last address” in ceph health detail :

$ ceph health detail
osd.37 is down since epoch 16952, last address

Also, you can use:

$ ceph osd find 37
    "osd": 37,
    "ip": "\/636",
    "crush_location": {
        "datacenter": "pa2.ssdr",
        "host": "lxc-ceph-main-front-osd-03.ssdr",
        "physical-host": "store-front-03.ssdr",
        "rack": "pa2-104.ssdr",
        "root": "ssdr"

To get partition UUID, you can use ceph osd dump (see at the end of the line) :

$ ceph osd dump | grep ^osd.37
osd.37 down out weight 0 up_from 56847 up_thru 57230 down_at 57538 last_clean_interval [56640,56844) exists d7ab9ac1-c68c-4594-b25e-48d3a7cfd182

$ ssh | blkid | grep d7ab9ac1-c68c-4594-b25e-48d3a7cfd182
/dev/sdg1: UUID="98594f17-eae5-45f8-9e90-cd25a8f89442" TYPE="xfs" PARTLABEL="ceph data" PARTUUID="d7ab9ac1-c68c-4594-b25e-48d3a7cfd182"
#(Depending on how the partitions are created, PARTUUID label is not necessarily present.)


Put your ads here, just $200 per month.