mirror of
https://github.com/ceph/ceph
synced 2025-01-10 13:10:46 +00:00
ea507d6c86
Adds the ability to zap OSD devices after removal, implemented as a flag on the 'orch osd rm' command. Fixes: https://tracker.ceph.com/issues/43692 Signed-off-by: Cory Snyder <csnyder@iland.com>
16 lines
571 B
YAML
16 lines
571 B
YAML
tasks:
|
|
- cephadm.shell:
|
|
host.a:
|
|
- |
|
|
set -e
|
|
set -x
|
|
ceph orch ps
|
|
ceph orch device ls
|
|
DEVID=$(ceph device ls | grep osd.1 | awk '{print $1}')
|
|
HOST=$(ceph orch device ls | grep "$DEVID" | awk '{print $1}')
|
|
DEV=$(ceph orch device ls | grep "$DEVID" | awk '{print $2}')
|
|
echo "host $HOST, dev $DEV, devid $DEVID"
|
|
ceph orch osd rm --zap --replace 1
|
|
while ceph orch osd rm status | grep ^1 ; do sleep 5 ; done
|
|
while ! ceph osd dump | grep osd.1 | grep "up\s*in" ; do sleep 5 ; done
|