Create a rack


$ ceph osd crush add-bucket rack1 rack

added bucket rack1 type rack to crush map

Assign a host to a rack


$ ceph osd crush move test1 rack=rack1

moved item id -2 name 'test1' to location {rack=rack1} in crush map

Move rack into default root


$ ceph osd crush move rack2 root=default

moved item id -6 name 'rack2' to location {root=default} in crush map

Remove osd


ceph osd crush set osd.6 0.01 host=host-test

Start an OSD thread with osd_crush_update_on_start=true


[root@ceph03 ~]# service ceph restart

=== mon.ceph03 ===

=== mon.ceph03 ===

Stopping Ceph mon.ceph03 on ceph03...kill 18073...done

=== mon.ceph03 ===

Starting Ceph mon.ceph03 on ceph03...

Running as unit ceph-mon.ceph03.1469757615.856681642.service.

Starting ceph-create-keys on ceph03...

=== osd.0 ===

=== osd.0 ===

Stopping Ceph osd.0 on ceph03...kill 18443...kill 18443...done

=== osd.0 ===

2016-07-29 10:00:21.588744 7f71442b6700 0 -- :/2747274056 >> 192.168.0.66:6789/0 pipe(0x7f714005cad0 sd=3 :0 s=1 pgs=0 cs=0 l=1 c=0x7f7140060dc0).fault

create-or-move updated item name 'osd.0' weight 0.01 at location {host=ceph03,root=default} to crush map

Starting Ceph osd.0 on ceph03...

Running as unit ceph-osd.0.1469757618.791578188.service.

=== osd.5 ===

=== osd.5 ===

Stopping Ceph osd.5 on ceph03...kill 18781...kill 18781...done

=== osd.5 ===

create-or-move updated item name 'osd.5' weight 0.01 at location {host=ceph03,root=default} to crush map

Starting Ceph osd.5 on ceph03...

Running as unit ceph-osd.5.1469757635.334783380.service.

=== osd.6 ===

=== osd.6 ===

Stopping Ceph osd.6 on ceph03...kill 19128...kill 19128...done

=== osd.6 ===

create-or-move updated item name 'osd.6' weight 0.01 at location {host=ceph03,root=default} to crush map

Starting Ceph osd.6 on ceph03...

Running as unit ceph-osd.6.1469757643.395656541.service.

Config for osd.X with update crush map info


[osd]

osd crush update on start = false

Or you could use this:

[osd.X]

osd crush location = "root=default-sas"

[osd.Y]

osd crush location = "root=default-ssd"

results matching ""

    No results matching ""