Appendix J. Purging a Ceph Cluster by Using Ansible
If you deployed a Ceph cluster using Ansible and you want to purge the cluster, then use the purge-cluster.yml
Ansible playbook located in the infrastructure-playbooks
directory.
Purging a Ceph cluster will lose data stored on the cluster’s OSDs.
Before purging the Ceph cluster…
Check the osd_auto_discovery
option in the osds.yml
file. Having this option set to true
will cause the purge to fail. To prevent the failure, do the following steps before running the purge:
-
Declare the OSD devices in the
osds.yml
file. See Section 3.2, “Installing a Red Hat Ceph Storage Cluster” for more details. -
Comment out the
osd_auto_discovery
option in theosds.yml
file.
To purge the Ceph cluster…
As
root
, navigate to the/usr/share/ceph-ansible/
directory:# cd /usr/share/ceph-ansible
As
root
, copy thepurge-cluster.yml
Ansible playbook to the current directory:# cp infrastructure-playbooks/purge-cluster.yml .
Run the
purge-cluster.yml
Ansible playbook:$ ansible-playbook purge-cluster.yml