Skip to content

Instantly share code, notes, and snippets.

@cheethoe
Last active April 14, 2022 21:01
Show Gist options
  • Star 39 You must be signed in to star a gist
  • Fork 11 You must be signed in to fork a gist
  • Save cheethoe/49d9c1d0003e44423e54a060e0b3fbf1 to your computer and use it in GitHub Desktop.
Save cheethoe/49d9c1d0003e44423e54a060e0b3fbf1 to your computer and use it in GitHub Desktop.
Rook v0.8.0 device/osd removal
# This will use osd.5 as an example
# ceph commands are expected to be run in the rook-toolbox
1) disk fails
2) remove disk from node
3) mark out osd. `ceph osd out osd.5`
4) remove from crush map. `ceph osd crush remove osd.5`
5) delete caps. `ceph auth del osd.5`
6) remove osd. `ceph osd rm osd.5`
7) delete the deployment `kubectl delete deployment -n rook-ceph rook-ceph-osd-id-5`
8) delete osd data dir on node `rm -rf /var/lib/rook/osd5`
9) edit the osd configmap `kubectl edit configmap -n rook-ceph rook-ceph-osd-nodename-config`
9a) edit out the config section pertaining to your osd id and underlying device.
10) add new disk and verify node sees it.
11) restart the rook-operator pod by deleting the rook-operator pod
12) osd prepare pods run
13) new rook-ceph-osd-id-5 will be created
14) check health of your cluster `ceph -s; ceph osd tree`
@caisan
Copy link

caisan commented Dec 17, 2018

hi, there is nothing happen after i do Step 11), no newly-built osd is creating and running.
should i specify the disk name for newly-built osd.x ?
thanks.

@jamstar
Copy link

jamstar commented Jan 15, 2019

Thanks for this, i was able to fix my osd that was having problems.

James

@aba182
Copy link

aba182 commented Apr 15, 2019

A note for those who find this. For at least rook v0.8.3 the osd is not created as the same OSD id but rather it creates a new OSD ID.

For example I had to replace a disk for osd.25, after I ran through this document I was able to use the new disk but it created a new OSD id 53. Things seem to be working but slightly different than described above.

@xenolinux
Copy link

xenolinux commented Nov 7, 2019

@cheethoe Could you help me with this - When we are using aws, how to remove the disk from a worker node instance? From the console, it doesn't let us detach the attached volume.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment