Add workaround for tunnel connectivity
[infra/stack/kubernetes.git] / apps / ceph / kubespray / playbooks / roles / prepare / files / clean-ceph-osd.sh
1 #!/usr/bin/env bash
2 DISK="/dev/$1"
3 # Zap the disk to a fresh, usable state (zap-all is important, b/c MBR has to be clean)
4 # You will have to run this step for all disks.
5 sgdisk --zap-all $DISK
6
7 # These steps only have to be run once on each node
8 # If rook sets up osds using ceph-volume, teardown leaves some devices mapped that lock the disks.
9 ls /dev/mapper/ceph-* | xargs -I% -- dmsetup remove %
10 # ceph-volume setup can leave ceph-<UUID> directories in /dev (unnecessary clutter)
11 rm -rf /dev/ceph-*