Skip to content

Instantly share code, notes, and snippets.

@cristiklein
Created June 14, 2021 08:45
Show Gist options
  • Save cristiklein/aba3404ae169e533213f26edd52fe557 to your computer and use it in GitHub Desktop.
Save cristiklein/aba3404ae169e533213f26edd52fe557 to your computer and use it in GitHub Desktop.
Nuke a Rook data
#!/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