Adding hosts

Bootstrapping the IBM Storage Ceph installation creates a working storage cluster, consisting of one Monitor daemon and one Manager daemon within the same container. As a storage administrator, you can add additional hosts to the storage cluster and configure them.

Before you begin

Before you begin, make sure that you have the following prerequisites in place:
  • A running IBM Storage Ceph cluster.
  • Root-level or user with sudo access to all nodes in the storage cluster.
  • Register the nodes to IBM subscription.
  • Ansible user with sudo and passwordless ssh access to all nodes in the storage cluster.

About this task

Important: For adding hosts with disconnected installations, see Adding hosts in disconnected deployments.
Note:
  • Running the preflight playbook installs podman, lvm2, chrony, and cephadm on all hosts listed in the Ansible inventory file.
  • When using a custom registry, be sure to log in to the custom registry on newly added nodes before adding any Ceph daemons.
    ceph cephadm registry-login --registry-url CUSTOM_REGISTRY_NAME --registry_username REGISTRY_USERNAME --registry_password REGISTRY_PASSWORD
    For example,
    # ceph cephadm registry-login --registry-url myregistry --registry_username myregistryusername --registry_password myregistrypassword1

Procedure

In the following procedure, use either root, as indicated, or the username with which the user is bootstrapped.
  1. From the node that contains the admin keyring, install the storage cluster’s public SSH key in the root user’s authorized_keys file on the new host.
    ssh-copy-id -f -i /etc/ceph/ceph.pub user@NEWHOST
    For example,
    [root@host01 ~]# ssh-copy-id -f -i /etc/ceph/ceph.pub root@host02
    [root@host01 ~]# ssh-copy-id -f -i /etc/ceph/ceph.pub root@host03
  2. Navigate to the /usr/share/cephadm-ansible directory on the Ansible administration node.
    For example,
    [ansible@admin ~]$ cd /usr/share/cephadm-ansible
  3. 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.
    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 4.
    [ansible@admin ~]$ cat hosts
    
    host02
    host03
    host04
    
    [admin]
    host01
  4. 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
  5. Install podman, lvm2, chrony, and cephadm manually.
    dnf install podman lvm2 chrony cephadm
    For example,
    [root@host01 ~]# dnf install podman lvm2 chrony cephadm
    cephadm resides in the /usr/sbin/ directory.
  6. From the bootstrap node, use the cephadm orchestrator to add the new host to the storage cluster.
    ceph orch host add NEWHOST
    For example,
    [ceph: root@host01 /]# ceph orch host add host02
    Added host 'host02' with addr '10.10.128.69'
    [ceph: root@host01 /]# ceph orch host add host03
    Added host 'host03' with addr '10.10.128.70'
  7. Optional: Add nodes to the host, by IP address.
    Adding nodes can be done before and after running the preflight playbook. If you do not have DNS configured in your storage cluster environment, you can add the hosts by IP address, along with the host names.
    ceph orch host add HOSTNAME IP_ADDRESS
    For example,
    [ceph: root@host01 /]# ceph orch host add host02 10.10.128.69
    Added host 'host02' with addr '10.10.128.69'
  8. Optional: Set labels to the host.
    For more information, see Labeling hosts.

What to do next

View the status of the storage cluster and verify that the new host has been added.
Note: The status output of the hosts is blank.
ceph orch host ls