Adding multiple hosts

You can use the Ceph Orchestrator to add multiple hosts to an IBM Storage Ceph cluster at the same time using the service specification in YAML file format.

Prerequisites

  • A running IBM Storage Ceph .

Procedure

  1. Create the hosts.yaml file:

    Example

    [root@host01 ~]# touch hosts.yaml
  2. Edit the hosts.yaml file to include the following details:

    Example

    service_type: host
    addr: host01
    hostname: host01
    labels:
    - mon
    - osd
    - mgr
    ---
    service_type: host
    addr: host02
    hostname: host02
    labels:
    - mon
    - osd
    - mgr
    ---
    service_type: host
    addr: host03
    hostname: host03
    labels:
    - mon
    - osd
  3. Mount the YAML file under a directory in the container:

    Example

    [root@host01 ~]# cephadm shell --mount hosts.yaml:/var/lib/ceph/hosts.yaml
  4. Navigate to the directory:

    Example

    [ceph: root@host01 /]# cd /var/lib/ceph/
  5. Deploy the hosts using service specification:

    Syntax

    ceph orch apply -i FILE_NAME.yaml

    Example

    [ceph: root@host01 hosts]# ceph orch apply -i hosts.yaml

Verification

  • List the hosts:

    Example

    [ceph: root@host01 /]# ceph orch host ls