|
| 1 | +cephadm configuration location |
| 2 | +============================== |
| 3 | + |
| 4 | +In kayobe-config repository, under ``etc/kayobe/cephadm.yml`` (or in a specific |
| 5 | +Kayobe environment when using multiple environment, e.g. |
| 6 | +``etc/kayobe/environments/production/cephadm.yml``) |
| 7 | + |
| 8 | +StackHPC's cephadm Ansible collection relies on multiple inventory groups: |
| 9 | + |
| 10 | +- ``mons`` |
| 11 | +- ``mgrs`` |
| 12 | +- ``osds`` |
| 13 | +- ``rgws`` (optional) |
| 14 | + |
| 15 | +Those groups are usually defined in ``etc/kayobe/inventory/groups``. |
| 16 | + |
| 17 | +Running cephadm playbooks |
| 18 | +========================= |
| 19 | + |
| 20 | +In kayobe-config repository, under ``etc/kayobe/ansible`` there is a set of |
| 21 | +cephadm based playbooks utilising stackhpc.cephadm Ansible Galaxy collection. |
| 22 | + |
| 23 | +- ``cephadm.yml`` - runs the end to end process starting with deployment and |
| 24 | + defining EC profiles/crush rules/pools and users |
| 25 | +- ``cephadm-crush-rules.yml`` - defines Ceph crush rules according |
| 26 | +- ``cephadm-deploy.yml`` - runs the bootstrap/deploy playbook without the |
| 27 | + additional playbooks |
| 28 | +- ``cephadm-ec-profiles.yml`` - defines Ceph EC profiles |
| 29 | +- ``cephadm-gather-keys.yml`` - gather Ceph configuration and keys and populate |
| 30 | + kayobe-config |
| 31 | +- ``cephadm-keys.yml`` - defines Ceph users/keys |
| 32 | +- ``cephadm-pools.yml`` - defines Ceph pools\ |
| 33 | + |
| 34 | +Running Ceph commands |
| 35 | +===================== |
| 36 | + |
| 37 | +Ceph commands can be run via ``cephadm shell`` utility container: |
| 38 | + |
| 39 | +.. code-block:: console |
| 40 | +
|
| 41 | + ceph# cephadm shell |
| 42 | +
|
| 43 | +This command will be only successful on ``mons`` group members (the admin key |
| 44 | +is copied only to those nodes). |
| 45 | + |
| 46 | +Adding a new storage node |
| 47 | +========================= |
| 48 | + |
| 49 | +Add a node to a respective group (e.g. osds) and run ``cephadm-deploy.yml`` |
| 50 | +playbook. |
| 51 | + |
| 52 | +.. note:: |
| 53 | + To add other node types than osds (mons, mgrs, etc) you need to specify |
| 54 | + ``-e cephadm_bootstrap=True`` on playbook run. |
| 55 | + |
| 56 | +Removing a storage node |
| 57 | +======================= |
| 58 | + |
| 59 | +First drain the node |
| 60 | + |
| 61 | +.. code-block:: console |
| 62 | +
|
| 63 | + ceph# cephadm shell |
| 64 | + ceph# ceph orch host drain <host> |
| 65 | +
|
| 66 | +Once all daemons are removed - you can remove the host: |
| 67 | + |
| 68 | +.. code-block:: console |
| 69 | +
|
| 70 | + ceph# cephadm shell |
| 71 | + ceph# ceph orch host rm <host> |
| 72 | +
|
| 73 | +And then remove the host from inventory (usually in |
| 74 | +``etc/kayobe/inventory/overcloud``) |
| 75 | + |
| 76 | +Additional options/commands may be found in |
| 77 | +`Host management <https://docs.ceph.com/en/latest/cephadm/host-management/>`_ |
| 78 | + |
| 79 | +Replacing a Failed Ceph Drive |
| 80 | +============================= |
| 81 | + |
| 82 | +Once an OSD has been identified as having a hardware failure, |
| 83 | +the affected drive will need to be replaced. |
| 84 | + |
| 85 | +If rebooting a Ceph node, first set ``noout`` to prevent excess data |
| 86 | +movement: |
| 87 | + |
| 88 | +.. code-block:: console |
| 89 | +
|
| 90 | + ceph# cephadm shell |
| 91 | + ceph# ceph osd set noout |
| 92 | +
|
| 93 | +Reboot the node and replace the drive |
| 94 | + |
| 95 | +Unset noout after the node is back online |
| 96 | + |
| 97 | +.. code-block:: console |
| 98 | +
|
| 99 | + ceph# cephadm shell |
| 100 | + ceph# ceph osd unset noout |
| 101 | +
|
| 102 | +Remove the OSD using Ceph orchestrator command: |
| 103 | + |
| 104 | +.. code-block:: console |
| 105 | +
|
| 106 | + ceph# cephadm shell |
| 107 | + ceph# ceph orch osd rm <ID> --replace |
| 108 | +
|
| 109 | +After removing OSDs, if the drives the OSDs were deployed on once again become |
| 110 | +available, cephadm may automatically try to deploy more OSDs on these drives if |
| 111 | +they match an existing drivegroup spec. |
| 112 | +If this is not your desired action plan - it's best to modify the drivegroup |
| 113 | +spec before (``cephadm_osd_spec`` variable in ``etc/kayobe/cephadm.yml``). |
| 114 | +Either set ``unmanaged: true`` to stop cephadm from picking up new disks or |
| 115 | +modify it in some way that it no longer matches the drives you want to remove. |
0 commit comments