Deploying the MDS service with the command-line interface

Using the Ceph Orchestrator, you can deploy the Metadata Server (MDS) service by using the placement specification in the command-line interface.

Ceph File System (CephFS) requires one or more MDS.
Note: Ensure that you have at least two pools, one for Ceph file system (CephFS) data and one for CephFS metadata.
For more information about creating Ceph File Systems, see Creating Ceph File Systems.
Before you begin, be sure that you have:
  • A running IBM Storage Ceph cluster.
  • Hosts added to the cluster.
  • All manager, monitor, and OSD daemons deployed.
To deploy the MDS service with the command-line interface, log in to the Cephadm shell.
[root@host01 ~]# cephadm shell
Use one of the following options to deploy MDS daemons using placement specification.

Create the MDS daemons through the command-line

Use ceph fs volume to create the MDS daemons.

This creates the CephFS volume and pools associated with the CephFS, and also starts the MDS service on the hosts.
ceph fs volume create FILESYSTEM_NAME --placement="NUMBER_OF_DAEMONS HOST_NAME_1 HOST_NAME_2 HOST_NAME_3"
Note: By default, replicated pools are created for this command.
For example:
[ceph: root@host01 /]# ceph fs volume create test --placement="2 host01 host02"

Create the pools, CephFS, and then deploy MDS service using placement specification

  1. Create the pools for CephFS.
    ceph osd pool create DATA_POOL PG_NUM
    ceph osd pool create METADATA_POOL PG_NUM
    For example:
    [ceph: root@host01 /]# ceph osd pool create cephfs_data 64
    [ceph: root@host01 /]# ceph osd pool create cephfs_metadata 64
  2. Create the file system for the data pools and metadata pools.
    ceph fs new FILESYSTEM_NAME METADATA_POOL DATA_POOL
    For example:
    [ceph: root@host01 /]# ceph fs new test cephfs_metadata cephfs_data
  3. Deploy MDS service using the ceph orch apply command.
    ceph orch apply mds FILESYSTEM_NAME --placement="NUMBER_OF_DAEMONS HOST_NAME_1 HOST_NAME_2 HOST_NAME_3"
    For example:
    [ceph: root@host01 /]# ceph orch apply mds test --placement="2 host01 host02"

Verifying

  1. List the service.
    [ceph: root@host01 /]# ceph orch ls
  2. Check the CephFS status.
    [ceph: root@host01 /]# ceph fs ls
    [ceph: root@host01 /]# ceph fs status
  3. List the hosts, daemons, and processes.
    ceph orch ps --daemon_type=DAEMON_NAME
    For example:
    [ceph: root@host01 /]# ceph orch ps --daemon_type=mds