Member-only story
Classifying Ceph ODS disks
Managing device classes
Let us describe a situation where we want to classify Ceph OSD disks. Let’s say we have 8 OSD disks where the half of them are NVMe disks and the remaining are HDDs. Due to different characteristics of disks, we do not want to mix them for a pool.
To achieve this, we will create two device classes, apply them to OSD disks and then create crush rules and apply the rules to pools.
Creation and Assignment of device classes
We start with checking the existing device class and then create new device classes. First, let us see what device classes exist.
sudo ceph osd crush class ls
When an OSD is added, its device class is automatically assigned. The typical ones are ssd or hdd. To see OSD disks of a particular device class, use this command.
sudo ceph osd crush class ls-osd [device class]
The following screenshot shows the results of these commands.
Now, let’s create two custom device classes: system and user.
sudo ceph osd crush class create system
sudo ceph osd crush class create user
Then, we will assign them to appropriate OSD disks. Please note that we need to remove the existing…