Skip to content

Instantly share code, notes, and snippets.

@troeger
Created August 21, 2020 19:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save troeger/72f17112a9190701dbbe20018be155d6 to your computer and use it in GitHub Desktop.
Save troeger/72f17112a9190701dbbe20018be155d6 to your computer and use it in GitHub Desktop.
Deleting an OSD in Rook
Lets assume you want to get rid of OSD.2, and none of the "nice" ways worked.
- Determine the node where the OSD daemon is running (`kubectl -n rook-ceph get pods -o wide|grep osd.2`)
- Enter the toolbox pod, run `ceph osd out 2`
- Wait for the cluster to migrate the data away (`ceph status -w`)
- Delete the Rook deployment for OSD 2.
- Enter the toolbox pod, run:
- ceph osd crush remove osd.2
- ceph auth del osd.2
- ceph osd rm 2
- Enter any pod running on the node where the OSD is situated, there:
- `ceph-volume lvm list`, find device name for this OSD
- `ceph-volume lvm zap /dev/xxx --destroy` (if this does not work, use `wipefs /dev/xxx -a -f` before)
- Remove the device from the CephCluster CRD
- For more OSDs, repeat from the beginning
- Restart the Rook operator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment