Adding labels to a host

Use the Ceph Orchestrator to add a label to a host. Labels can be used to specify placement of daemons.

Before you begin

Before you begin, make sure that you have the following prerequisites in place:
  • A storage cluster is installed and bootstrapped.
  • Root-level access to all nodes in the storage cluster.
  • Hosts are added to the storage cluster.

About this task

A few examples of labels are mgr, mon, and osd based on the service deployed on the hosts. Each host can have multiple labels.

The following labels have special meaning to cephadm.
Note: Special labels begin with _ (underscore).
_no_schedule
This label prevents cephadm from scheduling or deploying daemons on the host. If it is added to an existing host that already contains Ceph daemons, it causes cephadm to move those daemons elsewhere, except OSDs which are not removed automatically. When a host is added with the _no_schedule label, no daemons are deployed on it. When the daemons are drained before the host is removed, the _no_schedule label is set on that host.
_no_autotune_memory
This label does not autotune memory on the host. It prevents the daemon memory from being tuned even when the osd_memory_target_autotune option or other similar options are enabled for one or more daemons on that host.
_admin
By default, the _admin label is applied to the bootstrapped host in the storage cluster and the client.admin key is set to be distributed to that host with the ceph orch client-keyring [ls|set|rm] function. Adding this label to additional hosts normally causes cephadm to deploy configuration and keyring files in the /etc/ceph directory.

Procedure

  1. Launch the cephadm shell.
    For example,
    [root@host01 ~]# cephadm shell
    [ceph: root@host01 /]#
  2. Add a label to a host.
    ceph orch host label add HOSTNAME LABEL
    For example,
    [ceph: root@host01 /]# ceph orch host label add host02 mon
    Note: If your IBM Storage Ceph deployment comprises multiple CRUSH bucket types, such as chassis or rack, also known as failure domains, that are higher than host, assign the mon label to no more than 2 hosts per failure domain. Limiting the mon label spreads the daemons across failure domains, ensuring Monitor quorum when entire failure domain is lost.

What to do next

Verify that the label is added to the host, by using the ceph orch host ls command.