clean-up script for ceph-disks and data
Change-Id: I85898be92781e1fef2293b42186d00f06f600014
This commit is contained in:
parent
ea1667a8b1
commit
6304cb2785
22
tools/wipe-ceph-disks.sh
Executable file
22
tools/wipe-ceph-disks.sh
Executable file
@ -0,0 +1,22 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if ([[ -z $1 ]] || [[ $1 == "help" ]] || [[ $1 == "--help" ]] || [[ $1 == "-h" ]]); then
|
||||||
|
echo "Must pass the disk labels as an string argument with spaces"
|
||||||
|
echo "Exmaple: ./wipe-ceph-disks.sh \"b c d e\""
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
read -p "Are you sure you wish to proceed format disks $1?" input
|
||||||
|
case $input in
|
||||||
|
[Yy]*)
|
||||||
|
for disk in $@; do
|
||||||
|
sudo parted -s /dev/sd$disk mklabel gpt
|
||||||
|
done
|
||||||
|
sudo rm -rf /var/lib/openstack-helm/ceph
|
||||||
|
sudo rm -rf /var/lib/ceph/journal/*
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo Exitting.
|
||||||
|
exit 1
|
||||||
|
esac
|
||||||
|
|
Loading…
Reference in New Issue
Block a user