From 453000af19b25082aef1b473bd9284311ac98204 Mon Sep 17 00:00:00 2001 From: Sebastian Wagner Date: Tue, 8 Sep 2020 14:44:43 +0200 Subject: [PATCH] doc/cephadm: Add remove host to operations Co-authored-by: Alexandra Settle Co-authored-by: Kefu Chai Signed-off-by: Sebastian Wagner --- doc/cephadm/operations.rst | 50 ++++++++++++++++++++++++++++++++++++++ doc/mgr/orchestrator.rst | 4 ++- 2 files changed, 53 insertions(+), 1 deletion(-) diff --git a/doc/cephadm/operations.rst b/doc/cephadm/operations.rst index 456f48628f3..f852ef94424 100644 --- a/doc/cephadm/operations.rst +++ b/doc/cephadm/operations.rst @@ -305,3 +305,53 @@ the cluster, create an initial ``ceph.conf`` file. For example:: Then, run bootstrap referencing this file:: cephadm bootstrap -c /root/ceph.conf ... + + +.. _cephadm-removing-hosts: + +Removing Hosts +============== + +If the node that want you to remove is running OSDs, make sure you remove the OSDs from the node. + +To remove a host from a cluster, do the following: + +For all Ceph service types, except for ``node-exporter`` and ``crash``, remove +the host from the placement specification file (for example, cluster.yml). +For example, if you are removing the host named host2, remove all occurrences of +``- host2`` from all ``placement:`` sections. + +Update: + +.. code-block:: yaml + + service_type: rgw + placement: + hosts: + - host1 + - host2 + +To: + +.. code-block:: yaml + + + service_type: rgw + placement: + hosts: + - host1 + +Remove the host from cephadm's environment: + +.. code-block:: bash + + ceph orch host rm host2 + +See also :ref:`orchestrator-cli-host-management`. + +If the host is running ``node-exporter`` and crash services, remove them by running +the following command on the host: + +.. code-block:: bash + + cephadm rm-daemon --fsid CLUSTER_ID --name SERVICE_NAME diff --git a/doc/mgr/orchestrator.rst b/doc/mgr/orchestrator.rst index 102f65c15a2..8940d463efd 100644 --- a/doc/mgr/orchestrator.rst +++ b/doc/mgr/orchestrator.rst @@ -58,6 +58,8 @@ Status Show current orchestrator mode and high-level status (whether the orchestrator plugin is available and operational) +.. _orchestrator-cli-host-management: + Host Management =============== @@ -70,7 +72,7 @@ Add and remove hosts:: ceph orch host add [] [...] ceph orch host rm -For cephadm, see also :ref:`cephadm-fqdn`. +For cephadm, see also :ref:`cephadm-fqdn` and :ref:`cephadm-removing-hosts`. Host Specification ------------------