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
sshaccess to all nodes in the storage cluster. - The IP addresses of the new hosts should be updated in the
/etc/hostsfile.
Procedure
- From the Ceph administration node, log into the
cephadmshell.For example,
[root@host01 ~]# cephadm shell
- Extract the cluster’s public SSH keys to a folder.
ceph cephadm get-pub-key > ~/PATHFor example,
[ceph: root@host01 /]# ceph cephadm get-pub-key > ~/ceph.pub
- Copy Ceph cluster’s public SSH keys to the root user’s
authorized_keysfile on the new host.ssh-copy-id -f -i ~/PATH root@HOST_NAME_2For example,
[ceph: root@host01 /]# ssh-copy-id -f -i ~/ceph.pub root@host02
- 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] host00Note: 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. - Run the preflight playbook with the
--limitoption:ansible-playbook -i INVENTORY_FILE cephadm-preflight.yml --extra-vars "ceph_origin=ibm" --limit NEWHOSTFor example,
[ansible@admin cephadm-ansible]$ ansible-playbook -i hosts cephadm-preflight.yml --extra-vars "ceph_origin=ibm" --limit host02The preflight playbook installs
podman,lvm2,chrony, andcephadmon the new host. After installation is complete,cephadmresides in the/usr/sbin/directory. - From the Ceph administration node, log into the
cephadmshell.For example,
[root@host01 ~]# cephadm shell
- Use the
cephadmorchestrator 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
Reference
For more information, see the following: