I am looking to create a new pool that would be backed by a particular set
of drives that are larger nVME SSDs (Intel SSDPF2NV153TZ, 15TB drives).
Particularly, I am wondering about what is the best way to move devices
from one pool and to direct them to be used in a new pool to be created. In
this case, the documentation suggests I could want to assign them to a new
device-class and have a placement rule that targets that device-class in
the new pool.
If you're using cephadm / ceph orch you can craft an OSD spec that uses or ignores drives based on size or model.
Multiple pools can share OSDs, for your use-case though you probably don't want to.
Currently the Ceph cluster has two device classes 'hdd' and 'ssd', and the
larger 15TB drives were automatically assigned to the 'ssd' device class
that is in use by a different pool. The `ssd` device classes are used in a
placement rule targeting that class.
The names of device classes are actually semi-arbitrary. The above distinction is made on the basis of whether or not the kernel believes a given device to rotate.
The documentation describes that I could set a device class for an OSD with
a command like:
`ceph osd crush set-device-class CLASS OSD_ID [OSD_ID ..]`
Class names can be arbitrary strings like 'big_nvme".
or "qlc"
Before setting a new
device class to an OSD that already has an assigned device class, should
use `ceph osd crush rm-device-class ssd osd.XX`.
Yep. I suspect that's a guardrail to prevent inadvertently trampling.
Can I proceed to directly remove these OSDs from the current device class
and assign to a new device class?
Carpe NAND!
Should they be moved one by one? What is
the way to safely protect data from the existing pool that they are mapped
to?
Are there other SSDs in said existing pool? If you reassign all of these, will there be enough survivors to meet replication policy and hold all the data?
One by one would be safe. Doing more than one might be faster and more efficient, depending on your hardware and topology. For sure you don't want to reassign more than one per CRUSH failure domain at a time (host, rack, depends on your setup). If your topology, RAM, and clients are amenable, you could do all OSDs in a single failure domain at once, then proceed to the next only after all PGs are active+clean.