Ceph select specific OSD to form a Pool

Jul 4, 2022
77
11
13
Poland
Hello there,

I want to create two separate pools in my CEPH. At the moment I have a configuration made on 4 nodes with m.2 NVMe drives as OSDs. My nodes also have SATA SSD drives which I'd like to use for 2nd pool but I don't see any option to select these OSDs, you just add them and that's it. I've read CEPH selects automatically HDD and SSD but does it also work for NVMe?
What should be created 1st? Pool or OSDs? Thanks for any advice.
 
Ceph can only distinguish between rotating and non-rotating devices. It uses the flag in /sys/block/DEVICE/queue/rotational for that purpose. If this file contains 1 the OSD gets "hdd" as device class. If it contains 0 the device class "ssd" is assigned.

But you can change the device class of an OSD to anything you need.

Create a new device class with "ceph osd crush class create CLASSNAME" and then use "ceph osd crush set-device-class CLASSNAME OSDID" to set the class.

The crush rules for the data placement of the pools then can use the device class to use specific OSDs.
 
  • Like
Reactions: itret