Skip to content

Instantly share code, notes, and snippets.

@pwldp
Created January 22, 2019 08:22
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 pwldp/8333f3cc6c2db230f62c081c0e7fe37a to your computer and use it in GitHub Desktop.
Save pwldp/8333f3cc6c2db230f62c081c0e7fe37a to your computer and use it in GitHub Desktop.
$ rbd info vm-XXX-disk-1
rbd image 'rbdbigsize':
size 1862 PB in 500000000000 objects
order 22 (4096 kB objects)
block_name_prefix: rbd_data.047aa74b0dc51
format: 1
$ rados -p cph rm rbd_id.vm-XXX-disk-1
$ rados -p cph rm rbd_header.047aa74b0dc51
$ rados -p cph ls | grep '^rbd_data.047aa74b0dc51' | xargs -n 100 rados -p cph rm
$ rbd rm rbdbigsize
Ewentualnie:
$ for id in `cat ids`; do rados -p cph rm $id; done
#!/bin/bash
OSDID=$1
echo "Removing OSD=$OSDID"
ceph osd out osd.$OSDID
ceph osd down osd.$OSDID
systemctl stop ceph-osd@$OSDID
ceph osd rm osd.$OSDID
ceph osd crush rm osd.$OSDID
ceph auth del osd.$OSDID
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment