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.
Procedure
- Set the same number of MDS daemons as specified by the max_mds
parameter.
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 |
+-------------+
- 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
- Wait for the storage cluster to stabilize to the new max_mds value
by watching the Ceph File System status.
- Verify the number of active MDS daemons.
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 |
+-------------+