From: Sage Weil Date: Tue, 1 Aug 2017 16:14:51 +0000 (-0400) Subject: doc/rados/operations/crush-map: more device class docs X-Git-Tag: ses5-milestone10~6^2~4^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=20d2921194bb36f006613c2796e29c2a8056b437;p=ceph.git doc/rados/operations/crush-map: more device class docs Signed-off-by: Sage Weil --- diff --git a/doc/rados/operations/crush-map.rst b/doc/rados/operations/crush-map.rst index d07844c351a6..8d748a0d107a 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 ------------