The only way I could reproduce this was by removing the existing class
from an OSD and setting it:
---snip---
pacific:~ # ceph osd crush rm-device-class 0
done removing class of osd(s): 0
pacific:~ # ceph osd crush set-device-class jbod.hdd 0
set osd(s) 0 to class 'jbod.hdd'
pacific:~ # ceph osd tree
ID CLASS WEIGHT TYPE NAME STATUS REWEIGHT PRI-AFF
-1 0.03596 root default
-3 0.03596 host pacific
1 hdd 0.01199 osd.1 up 1.00000 1.00000
2 hdd 0.01199 osd.2 up 1.00000 1.00000
0 jbod.hdd 0.01198 osd.0 up 1.00000 1.00000
pacific:~ # ceph osd crush class ls
[
"hdd",
"jbod.hdd"
]
---snip---
But if I remove it from the OSD the device class is gone as well:
---snip---
pacific:~ # ceph osd crush rm-device-class 0
done removing class of osd(s): 0
pacific:~ # ceph osd crush set-device-class hdd 0
set osd(s) 0 to class 'hdd'
pacific:~ # ceph osd tree
ID CLASS WEIGHT TYPE NAME STATUS REWEIGHT PRI-AFF
-1 0.03596 root default
-3 0.03596 host pacific
0 hdd 0.01198 osd.0 up 1.00000 1.00000
1 hdd 0.01199 osd.1 up 1.00000 1.00000
2 hdd 0.01199 osd.2 up 1.00000 1.00000
pacific:~ # ceph osd crush class ls
[
"hdd"
]
---snip---
So I would have expected that there is one or more OSDs with that
device class but you already checked that. Do you still find it in the
crushmap? To retrieve it you run:
ceph osd getcrushmap -o crushmap.bin
crushtool -d crushmap.bin -o crushmap.txt
Regards,
Eugen
Zitat von Michael Thomas <wart@xxxxxxxxxxx>:
In 15.2.7, how can I remove an invalid crush class? I'm surprised
that I was able to create it in the first place:
[root@ceph1 bin]# ceph osd crush class ls
[
"ssd",
"JBOD.hdd",
"nvme",
"hdd"
]
[root@ceph1 bin]# ceph osd crush class ls-osd JBOD.hdd
Invalid command: invalid chars . in JBOD.hdd
osd crush class ls-osd <class> : list all osds belonging to the
specific <class
Error EINVAL: invalid command
There are no devices mapped to this class:
[root@ceph1 bin]# ceph osd crush tree | grep JBOD | wc -l
--Mike
_______________________________________________
ceph-users mailing list -- ceph-users@xxxxxxx
To unsubscribe send an email to ceph-users-leave@xxxxxxx
_______________________________________________
ceph-users mailing list -- ceph-users@xxxxxxx
To unsubscribe send an email to ceph-users-leave@xxxxxxx