Removing a CephFS

Learn how to remove a Ceph File System.

Before you begin

Before removing a CephFS, be sure that you have root-level access to a Ceph Monitor node and to back up your data.

About this task

You can remove a Ceph File System (CephFS). Before doing so, consider backing up all the data and verifying that all clients have unmounted the file system locally.
Warning: This operation is destructive and will make the data that is stored on the Ceph File System permanently inaccessible.

Procedure

  1. Mark the storage cluster as down:
    ceph fs set FS_NAME down true
    Replace FS_NAME with the name of the Ceph File System that you want to remove.
    For example:
    [ceph: root@host01 /]# ceph fs set cephfs down true
    
    cephfs marked down.
  2. Display the status of the Ceph File System.
    ceph fs status
    For example:
    [ceph: root@host01 /]# ceph fs status
    
    cephfs - 0 clients
    ======
    +-------------------+----------+-------+-------+
    |       POOL        |   TYPE   |  USED | AVAIL |
    +-----------------+------------+-------+-------+
    |cephfs.cephfs.meta | metadata | 31.5M |  52.6G|
    |cephfs.cephfs.data |   data   |    0  |  52.6G|
    +-----------------+----------+-------+---------+
                   STANDBY MDS
    cephfs.ceph-host01
    cephfs.ceph-host02
    cephfs.ceph-host03
  3. Remove the Ceph File System.
    ceph fs rm FS_NAME --yes-i-really-mean-it
    Replace FS_NAME with the name of the Ceph File System that you want to remove.
    For example:
    [ceph: root@host01 /]# ceph fs rm cephfs --yes-i-really-mean-it
  4. Verify that the file system has been successfully removed.
    For example:
    [ceph: root@host01 /]# ceph fs ls
  5. Optional: Remove data and metadata pools associated with the removed file system.