Adding hosts

You can use the Ceph Orchestrator with cephadm in the backend to add hosts to an existing IBM Storage Ceph.

Prerequisites

  • A running IBM Storage Ceph cluster.
  • Root-level access to all nodes in the storage cluster.
  • Register the nodes to the CDN and attach subscriptions.
  • Ansible user with sudo and passwordless ssh access to all nodes in the storage cluster.
  • The IP addresses of the new hosts should be updated in the /etc/hosts file.

Procedure

  1. From the Ceph administration node, log into the cephadm shell.

    For example,

    [root@host01 ~]# cephadm shell
  2. Extract the cluster’s public SSH keys to a folder.
    ceph cephadm get-pub-key > ~/PATH

    For example,

    [ceph: root@host01 /]# ceph cephadm get-pub-key > ~/ceph.pub
  3. Copy Ceph cluster’s public SSH keys to the root user’s authorized_keys file on the new host.
    ssh-copy-id -f -i ~/PATH root@HOST_NAME_2

    For example,

    [ceph: root@host01 /]# ssh-copy-id -f -i ~/ceph.pub root@host02
  4. From the Ansible administration node, add the new host to the Ansible inventory file. The default location for the file is /usr/share/cephadm-ansible/hosts. The following example shows the structure of a typical inventory file:
    host01
    host02
    host03
    
    [admin]
    host00
    Note: If you have previously added the new host to the Ansible inventory file and run the preflight playbook on the host, skip to step 6.
  5. Run the preflight playbook with the --limit option:
    ansible-playbook -i INVENTORY_FILE cephadm-preflight.yml --extra-vars "ceph_origin=ibm" --limit NEWHOST

    For example,

    [ansible@admin cephadm-ansible]$ ansible-playbook -i hosts cephadm-preflight.yml --extra-vars "ceph_origin=ibm"
     --limit host02

    The preflight playbook installs podman, lvm2, chrony, and cephadm on the new host. After installation is complete, cephadm resides in the /usr/sbin/ directory.

  6. From the Ceph administration node, log into the cephadm shell.

    For example,

    [root@host01 ~]# cephadm shell
  7. Use the cephadm orchestrator to add hosts to the storage cluster.
    ceph orch host add HOST_NAME IP_ADDRESS_OF_HOST [--label=LABEL_NAME_1,LABEL_NAME_2]

    For example,

    [ceph: root@host01 /]# ceph orch host add host02 10.10.128.70 --labels=mon,mgr

Verification

Verify that the hosts were added successfully, by running the ceph orch host ls command.

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