OSD actions

ceph orch daemon add osd [hostname]:[device]

ex: ceph orch daemon add osd ceph-1:/dev/vdb,/dev/vdc

More Explanation

ceph orch apply osd --all-available-devices    # Makes OSDs unmange

I don't suggest to make OSDs unmanage and join them manually or with yaml file that I talk abut later.

To remove the osd:

ceph orch osd rm OSD_ID --zap

To add OSDs with the same host pattern:

service_type: osd
service_id: ssd_osd
placement:
  hosts:
    - ceph-1
    - ceph-2
    - ceph-3
spec:
  data_devices:
    paths:
      - /dev/vdf
      - /dev/vdg
      - /dev/vde
  crush_device_class: ssd

This file create a new service, type OSD and name of the service is ssd_osd

To apply the file:

ceph orch apply -i osd_SSD.yaml

To find out disk name with osd:

ceph device ls

Change an OSD Device Class

To change an OSD to another device class use the following commands:

ceph osd crush rm-device-class osd.NUM

ceph osd crush set-device-class ssd osd.NUM

Last updated