Deploying the Ceph daemons using the command line interface

Using the Ceph Orchestrator, you can deploy the daemons such as Ceph Manager, Ceph Monitors, Ceph OSDs, monitoring stack, and others using the ceph orch command. Placement specification is passed as --placement argument with the Orchestrator commands.

Prerequisites

  • A running IBM Storage Ceph cluster.

  • Hosts are added to the storage cluster.

Procedures

  1. Log into the cephadm shell:

    Example

    [root@host01 ~]# cephadm shell
  2. Use one of the following methods to deploy the daemons on the hosts:

    • Method 1: Specify the number of daemons and the host names:

      Syntax

      ceph orch apply SERVICE_NAME --placement="NUMBER_OF_DAEMONS HOST_NAME_1 HOST_NAME_2 HOST_NAME_3"

      Example

      [ceph: root@host01 /]# ceph orch apply mon --placement="3 host01 host02 host03"
    • Method 2: Add the labels to the hosts and then deploy the daemons using the labels:

      1. Add the labels to the hosts:

        Syntax

        ceph orch host label add HOSTNAME_1 LABEL

        Example

        [ceph: root@host01 /]# ceph orch host label add host01 mon
      2. Deploy the daemons with labels:

        Syntax

        ceph orch apply DAEMON_NAME label:LABEL

        Example

        ceph orch apply mon label:mon
    • Method 3: Add the labels to the hosts and deploy using the --placement argument:

      1. Add the labels to the hosts:

        Syntax

        ceph orch host label add HOSTNAME_1 LABEL

        Example

        [ceph: root@host01 /]# ceph orch host label add host01 mon
      2. Deploy the daemons using the label placement specification:

        Syntax

        ceph orch apply DAEMON_NAME --placement="label:LABEL"

        Example

        ceph orch apply mon --placement="label:mon"

Verification

  • List the service:

    Example

    [ceph: root@host01 /]# ceph orch ls
  • List the hosts, daemons, and processes:

    Syntax

    ceph orch ps --daemon_type=DAEMON_NAME
    ceph orch ps --service_name=SERVICE_NAME

    Example

    [ceph: root@host01 /]# ceph orch ps --daemon_type=mon
    [ceph: root@host01 /]# ceph orch ps --service_name=mon