Adding OSD hosts with three availability zones

You can add Ceph OSDs with three availability zones on a generalized stretch cluster. The procedure is similar to the addition of the OSD hosts on a cluster where a generalized stretch cluster is not enabled.

Before you begin

Before you begin, make sure that you have the following prerequisites in place:

About this task

For more information, see Adding OSDs.

Procedure

  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@host10 ~]# ssh-copy-id -f -i /etc/ceph/ceph.pub root@host11
    [root@host10 ~]# ssh-copy-id -f -i /etc/ceph/ceph.pub root@host12
  2. Add nodes by IP address.
    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@host10 /]# ceph orch host add host11 10.10.128.69
    Added host 'host11' with addr '10.10.128.69'
  3. Optional: Verify the status of the storage cluster and that each new host has been added by using the ceph orch host ls command.
    See that the new host has been added and that the Status of each host is blank in the output.
  4. List the available devices to deploy OSDs.
    ceph orch device ls [--hostname=HOST11 HOST12] [--wide] [--refresh]
  5. Deploy the OSDs on specific hosts or on all the available devices.
    Deploy in one of the following ways:
    • Create an OSD from a specific device on a specific host.
      ceph orch daemon add osd HOST:DEVICE_PATH
      For example,
      [ceph: root@host10 /]# ceph orch daemon add osd host11:/dev/sdb
    • Deploy OSDs on any available and unused devices.
      Important: This command creates collocated WAL and DB devices. If you want to create non-collocated devices, do not use this command.
      ceph orch apply osd --all-available-devices
  6. Move the OSD hosts under the CRUSH bucket.
    ceph osd crush move HOST datacenter=DATACENTER
    [ceph: root@host10 /]# ceph osd crush move host10 datacenter=DC1
    [ceph: root@host10 /]# ceph osd crush move host11 datacenter=DC2
    [ceph: root@host10 /]# ceph osd crush move host12 datacenter=DC3
    Note: Ensure you add the same topology nodes on all sites. Issues might arise if hosts are added only on one site.

What to do next

Verify that all hosts are moved to the assigned data centers, by using the ceph osd tree command.