Ceph Replacing OSD

Steps

  • ceph osd out <OSD ID>

WAIT UNTIL PG =0 < Around 1hour?>

systemctl stop (ceph-cluster)@<OSD ID RELATED>

example: systemctl stop ceph-9124ada3513@osd.1

  • ceph osd down <OSD ID>
  • ceph osd crush remove <OSD ID>
  • ceph osd rm <OSD ID>
  • ceph auth del <OSD ID>
  • Go To The following ceph osd node
  • Cd /var/lib/ceph/<ceph cluster>
  • Do > find * | grep <OSD ID>
  • Remove everything related to the osd > rm -f -r <OSD ID RELATED>
  • Make sure to do systemctl daemon-reload

Don’t forget to cleanup the disk from ceph

  • gdisk /dev/<OSD DISK> INPUT = X Z Y Y

Adding the Disk

  • ceph orch daemon add osd –method raw (ceph-host):/dev/<OSD RELATED PATH>

NOTE: If you encounter the following:

Osd(…) exists, already created?

You need to redo step 1-9, and then restart the docker of the ceph-host related

NOTE: You can also just remove the hard disk directly, and do the clean up with the following command, but there may be some steps to be skipped from the commands

Leave a Reply

Your email address will not be published. Required fields are marked *