Setting a device class
Use this information to set a device class for an OSD.
To set a device class for an OSD, run the following:
Syntax
ceph osd crush set-device-class CLASS OSD_ID [OSD_ID..]
Example
[ceph: root@host01 /]# ceph osd crush set-device-class hdd osd.0 osd.1
[ceph: root@host01 /]# ceph osd crush set-device-class ssd osd.2 osd.3
[ceph: root@host01 /]# ceph osd crush set-device-class bucket-index osd.4
Note: Ceph might assign a class to a device automatically. However, class names are simply arbitrary
strings. There is no requirement to adhere to
hdd, ssd or
nvme. In the foregoing example, a device class named bucket-index
might indicate an SSD device that a Ceph Object Gateway pool uses exclusively bucket index
workloads. To change a device class that was already set, use ceph osd crush
rm-device-class first.