Sébastien Han

Stacker! Cepher! What's next?

Remove a MDS server from a Ceph cluster

Quick tip.

If you don’t use CephFS, you don’t need a MDS server. However if you installed it simply to try CephFS and if you’r done playing with it here is how to delete the MDS server.

First stop every MDS running daemon:

$ sudo service ceph stop mds
=== mds.0 ===
Stopping Ceph mds.0 on server-3...kill 1190...done

Remove the MDS section in your ceph.conf configuration file:

    keyring = /etc/ceph/keyring.$name
    host = server-3

And so on for every MDS server.

Now run this command:

$ ceph mds rm mds.0
mds gid 0 dne

Sometimes (for unknow reason), after deleting the MDS, this message will remain on the ceph log:

$ ceph health
HEALTH_WARN mds 0 is laggy
$ ceph mds stat
e35: 1/1/1 up {0=0=up:active(laggy or crashed)}

To overcome this problem run:

$ ceph mds newfs metadata data --yes-i-really-mean-it
new fs with metadata pool 0 and data pool 0
$ ceph health

R Note: as Gregory Farnum mentioned it, the new cephfs command needs pool IDs as an argument and not pool name. :-)

This command will remove the MDS map.

Eventually uninstall all the packages related to CephFS:

$ sudo apt-get purge ceph-fuse ceph-mds libcephfs1 -y

Et voilà!