Forums

Home / Forums

You need to log in to create posts and topics. Login · Register

Creating a new class apart from ssd in a crush rule.

Team,
I am unable to create a new crush rule with a different class in the Petasan, usually I get an error as general crush error.
For the below syntax I get an error, I am trying to create a crush rule for a different size/performance disk.

But on a different cluster with similar class I was able to create this crush rule.

What is the prerequsites for creating a crush rule apart from SSD

{
id 2
type replicated
step take default class ssd8tb
step chooseleaf firstn 0 type host
step emit
}
Log says
 21/11/2023 03:50:57 ERROR Crush Compile Error
 21/11/2023 06:25:05 INFO GlusterFS mount attempt
 21/11/2023 23:10:16 ERROR Crush Compile Error
BELOW are the info related to the OSD and disk in the cluster.
root@uat-ps-node1:~# ceph device ls
DEVICE HOST:DEV DAEMONS WEAR LIFE EXPECTANCY
LOGICAL_VOLUME_600508b1001c0c7edbeeb5f535967144 uat-ps-node3:sdc osd.5
LOGICAL_VOLUME_600508b1001c1d3b1819fbc793063c49 uat-ps-node1:sde osd.9
LOGICAL_VOLUME_600508b1001c25fef696cd7215bc5172 uat-ps-node1:sdb mon.uat-ps-node1
LOGICAL_VOLUME_600508b1001c264f1bb48c7b8f3dc185 uat-ps-node1:sdf osd.11
LOGICAL_VOLUME_600508b1001c36abadccbae03b63fdbd uat-ps-node2:sda osd.8
LOGICAL_VOLUME_600508b1001c3e38d8d93ac85d1c047a uat-ps-node3:sda mon.uat-ps-node3
LOGICAL_VOLUME_600508b1001c47c5ec57c047d3602779 uat-ps-node2:sdd osd.2
LOGICAL_VOLUME_600508b1001c5b1b21ba0be6d33f401a uat-ps-node1:sda osd.0
LOGICAL_VOLUME_600508b1001c5d1f27331643e1efafaf uat-ps-node1:sdd osd.6
LOGICAL_VOLUME_600508b1001c749fcec3f7b95332c26f uat-ps-node1:sdc osd.1
LOGICAL_VOLUME_600508b1001c7b46e603e68fa8d297c2 uat-ps-node3:sdd osd.7
LOGICAL_VOLUME_600508b1001c816537db88b9e56e88d9 uat-ps-node3:sde osd.4
LOGICAL_VOLUME_600508b1001c97f1345b840418dc37c2 uat-ps-node2:sdf osd.12
LOGICAL_VOLUME_600508b1001cafadbbdf3c07d6b9661e uat-ps-node2:sdc osd.3
LOGICAL_VOLUME_600508b1001cc150d9dc34be87608979 uat-ps-node3:sdg osd.13
LOGICAL_VOLUME_600508b1001cc72d384454fc9531c061 uat-ps-node3:sdf osd.10
LOGICAL_VOLUME_600508b1001ce39ac808a56a6f8d8955 uat-ps-node2:sdb mon.uat-ps-node2

ID CLASS WEIGHT TYPE NAME STATUS REWEIGHT PRI-AFF
-1 38.79520 root default
-3 11.54172 host uat-ps-node1
0 hdd 2.18320 osd.0 up 1.00000 1.00000
1 hdd 2.18320 osd.1 up 1.00000 1.00000
6 ssd 1.86298 osd.6 up 1.00000 1.00000
9 ssd 1.81926 osd.9 up 1.00000 1.00000
11 ssd 3.49309 osd.11 up 1.00000 1.00000
-5 13.17195 host uat-ps-node2
2 hdd 2.18320 osd.2 up 1.00000 1.00000
3 hdd 2.18320 osd.3 up 1.00000 1.00000
8 ssd 1.81926 osd.8 up 1.00000 1.00000
12 ssd 6.98630 osd.12 up 1.00000 1.00000
-7 14.08153 host uat-ps-node3
4 hdd 2.18320 osd.4 up 1.00000 1.00000
5 hdd 2.18320 osd.5 up 1.00000 1.00000
7 ssd 0.90958 osd.7 up 1.00000 1.00000
10 ssd 1.81926 osd.10 up 1.00000 1.00000
13 ssd 6.98630 osd.13 up 1.00000 1.00000

 

root@uat-ps-node1:~# ceph osd crush class ls
[
"hdd",
"ssd"
]
root@uat-ps-node1:~#

You need to assign your custom class ss8tb to you osds

Thanks for the response.

Firstly problem is that the below CRUSH rule syntax is not working with different class name.
The same class somehow worked on a different cluster. I was able to add the OSD's to a different class ssd8tb in that custer.

{
id 2
type replicated
step take default class ssd8tb
step chooseleaf firstn 0 type host
step emit
}

 

If I am able to create a new class, I can migrate the OSD from SSD class to ssd8tb class.

Ryt now i have only two classes available in the cluster,
SSD
HDD

I get an error if the class is different from above two (SSD HDD).
That is where i need help with.

have you tried my previous reply ? if it did not work, what commands you used and what error you got ?

My Bad,

Worked

Much Thanks