From 20d2921194bb36f006613c2796e29c2a8056b437 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 1 Aug 2017 12:14:51 -0400 Subject: [PATCH] doc/rados/operations/crush-map: more device class docs Signed-off-by: Sage Weil --- doc/rados/operations/crush-map.rst | 37 ++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/doc/rados/operations/crush-map.rst b/doc/rados/operations/crush-map.rst index d07844c351a..8d748a0d107 100644 --- a/doc/rados/operations/crush-map.rst +++ b/doc/rados/operations/crush-map.rst @@ -206,6 +206,43 @@ You can view the contents of the rules with:: ceph osd crush rule dump +Device classes +-------------- + +Each device can optionally have a *class* associated with it. By +default, OSDs automatically set their class on startup to either +`hdd`, `ssd`, or `nvme` based on the type of device they are backed +by. + +The device class for one or more OSDs can be explicitly set with:: + + ceph osd crush set-device-class [...] + +Once a device class is set, it cannot be changed to another class +until the old class is unset with:: + + ceph osd crush rm-device-class [...] + +This allows administrators to set device classes without the class +being changed on OSD restart or by some other script. + +A placement rule that targets a specific device class can be created with:: + + ceph osd crush rule create-replicated + +A pool can then be changed to use the new rule with:: + + ceph osd pool set crush_rule + +Device classes are implemented by creating a "shadow" CRUSH hierarchy +for each device class in use that contains only devices of that class. +Rules can then distributed data over the shadow hierarchy. One nice +thing about this approach is that it is fully backward compatible with +old Ceph clients. You can view the CRUSH hierarchy with shadow items +with:: + + ceph osd crush tree --show-shadow + Weights sets ------------ -- 2.39.5