Member-only story

Classifying Ceph ODS disks

Managing device classes

DaeGon Kim
3 min readJul 7, 2023

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.

list of device classes and list of OSD disks of ssd class

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…

--

--

Responses (1)