Red Hat Training

A Red Hat training course is available for Red Hat Ceph Storage

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:

  1. Declare the OSD devices in the osds.yml file. See Section 3.2, “Installing a Red Hat Ceph Storage Cluster” for more details.
  2. Comment out the osd_auto_discovery option in the osds.yml file.

To purge the Ceph cluster…​

  1. As root, navigate to the /usr/share/ceph-ansible/ directory:

    # cd /usr/share/ceph-ansible
  2. As root, copy the purge-cluster.yml Ansible playbook to the current directory:

    # cp infrastructure-playbooks/purge-cluster.yml .
  3. Run the purge-cluster.yml Ansible playbook:

    $ ansible-playbook purge-cluster.yml