Decreasing the number of active Metadata Server daemons

Learn how to decrease the number of active Ceph File System (CephFS) Metadata Server (MDS) daemons.

Before you begin

A rank that is to be removed, must first be active. This means that you must have the same number of MDS daemons as specified by the max_mds parameter.

Before you begin be sure that you have root-level access to a Ceph Monitor node.

About this task

For more information about Metadata Server daemons, see Metadata Server daemon states and Configuring multiple active Metadata Server daemons.

Procedure

  1. Set the same number of MDS daemons as specified by the max_mds parameter.
    ceph fs status NAME
    For example:
    [root@mon ~]# ceph fs status cephfs
    cephfs - 0 clients
    
    +------+--------+-------+---------------+-------+-------+--------+--------+
    | RANK | STATE  |  MDS  |    ACTIVITY   |  DNS  |  INOS |  DIRS  |  CAPS  |
    +------+--------+-------+---------------+-------+-------+--------+--------+
    |  0   | active | node1 | Reqs:    0 /s |   10  |   12  |   12   |   0    |
    |  1   | active | node2 | Reqs:    0 /s |   10  |   12  |   12   |   0    |
    +------+--------+-------+---------------+-------+-------+--------+--------+
    +-----------------+----------+-------+-------+
    |       POOL      |   TYPE   |  USED | AVAIL |
    +-----------------+----------+-------+-------+
    | cephfs_metadata | metadata | 4638  | 26.7G |
    |   cephfs_data   |   data   |    0  | 26.7G |
    +-----------------+----------+-------+-------+
    
    +-------------+
    | Standby MDS |
    +-------------+
    |    node3    |
    +-------------+
  2. On a node with administration capabilities, change the max_mds parameter to the desired number of active MDS daemons.
    ceph fs set NAME max_mds NUMBER
    For example:
    [root@mon ~]# ceph fs set cephfs max_mds 1
  3. Wait for the storage cluster to stabilize to the new max_mds value by watching the Ceph File System status.
  4. Verify the number of active MDS daemons.
    ceph fs status NAME
    For example:
    [root@mon ~]# ceph fs status cephfs
    cephfs - 0 clients
    
    +------+--------+-------+---------------+-------+-------+--------+--------+
    | RANK | STATE  |  MDS  |    ACTIVITY   |  DNS  |  INOS |  DIRS  |  CAPS  |
    +------+--------+-------+---------------+-------+-------+--------+--------+
    |  0   | active | node1 | Reqs:    0 /s |   10  |   12  |   12   |   0    |
    +------+--------+-------+---------------+-------+-------+--------|--------+
    +-----------------+----------+-------+-------+
    |       POOl      |   TYPE   |  USED | AVAIL |
    +-----------------+----------+-------+-------+
    | cephfs_metadata | metadata | 4638  | 26.7G |
    |   cephfs_data   |   data   |    0  | 26.7G |
    +-----------------+----------+-------+-------+
    
    +-------------+
    | Standby MDS |
    +-------------+
    |    node3    |
    |    node2    |
    +-------------+