Created
June 14, 2021 08:45
-
-
Save cristiklein/aba3404ae169e533213f26edd52fe557 to your computer and use it in GitHub Desktop.
Nuke a Rook data
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ansible all -i inventory.ini --become --become-user=root -m shell -a 'hostname; rm -rf /var/lib/rook; umount /mnt; sgdisk --zap-all /dev/sdb; dd if=/dev/zero of="/dev/sdb" bs=1M count=100 oflag=direct,dsync; ls /dev/mapper/ceph-* | xargs -I% -- dmsetup remove %; rm -rf /dev/mapper/ceph-*; rm -rf /dev/ceph-*; partprobe /dev/sdb; ls -l /dev/mapper; lsblk' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment