]> git.proxmox.com Git - ceph.git/blobdiff - ceph/doc/cephadm/host-management.rst
import ceph quincy 17.2.4
[ceph.git] / ceph / doc / cephadm / host-management.rst
index f342558fafcb74fcf841a51f36fb9c4cd4faa069..fee286e3a72a225aaf4936928aeb63f2eb1dc8bf 100644 (file)
@@ -161,7 +161,9 @@ The following host labels have a special meaning to cephadm.  All start with ``_
   bootstrap was originally run), and the ``client.admin`` key is set to be distributed
   to that host via the ``ceph orch client-keyring ...`` function.  Adding this label
   to additional hosts will normally cause cephadm to deploy config and keyring files
-  in ``/etc/ceph``.
+  in ``/etc/ceph``. Starting from versions 16.2.10 (Pacific) and 17.2.1 (Quincy) in
+  addition to the default location ``/etc/ceph/`` cephadm also stores config and keyring
+  files in the ``/var/lib/ceph/<fsid>/config`` directory.
 
 Maintenance Mode
 ================
@@ -175,6 +177,21 @@ Where the force flag when entering maintenance allows the user to bypass warning
 
 See also :ref:`cephadm-fqdn`
 
+Rescanning Host Devices
+=======================
+
+Some servers and external enclosures may not register device removal or insertion with the
+kernel. In these scenarios, you'll need to perform a host rescan. A rescan is typically
+non-disruptive, and can be performed with the following CLI command.::
+
+    ceph orch host rescan <hostname> [--with-summary]
+
+The ``with-summary`` flag provides a breakdown of the number of HBAs found and scanned, together
+with any that failed.::
+
+    [ceph: root@rh9-ceph1 /]# ceph orch host rescan rh9-ceph1 --with-summary
+    Ok. 2 adapters detected: 2 rescanned, 0 skipped, 0 failed (0.32s)
+
 Creating many hosts at once
 ===========================
 
@@ -226,6 +243,95 @@ create a new CRUSH host located in the specified hierarchy.
 
 See also :ref:`crush_map_default_types`.
 
+OS Tuning Profiles
+==================
+
+Cephadm can manage operating system tuning profiles that apply a set of sysctl settings
+to a given set of hosts. First create a YAML spec file in the following format
+
+.. code-block:: yaml
+
+    profile_name: 23-mon-host-profile
+    placement:
+      hosts:
+        - mon-host-01
+        - mon-host-02
+    settings:
+      fs.file-max: 1000000
+      vm.swappiness: '13'
+
+Then apply the tuning profile with::
+
+    ceph orch tuned-profile apply -i <tuned-profile-file-name>
+
+This profile will then be written to ``/etc/sysctl.d/`` on each host matching the
+given placement and `sysctl --system` will be run on the host.
+
+.. note::
+
+  The exact filename the profile will be written to is within ``/etc/sysctl.d/`` is
+  ``<profile-name>-cephadm-tuned-profile.conf`` where <profile-name>
+  is the `profile_name` setting specified in the provided YAML spec. Since sysctl
+  settings are applied in lexicographical order by the filename the setting is
+  specified in, you may want to set the `profile_name` in your spec so
+  that it is applied before or after other conf files that may exist.
+
+.. note::
+
+  These settings are applied only at the host level, and are not specific
+  to any certain daemon or container
+
+.. note::
+
+  Applying tuned profiles is idempotent when the ``--no-overwrite`` option is passed.
+  In this case existing profiles with the same name are not overwritten.
+
+
+Viewing Profiles
+----------------
+
+To view all current profiles cephadm is managing::
+
+    ceph orch tuned-profile ls
+
+.. note:: 
+
+  If you'd like to make modifications and re-apply a profile passing `--format yaml` to the
+  ``tuned-profile ls`` command will present the profiles in a format where they can be copied
+  and re-applied.
+
+
+Removing Profiles
+-----------------
+
+If you no longer want one of the previously applied profiles, it can be removed with::
+
+    ceph orch tuned-profile rm <profile-name>
+
+When a profile is removed, cephadm will clean up the file previously written to /etc/sysctl.d
+
+
+Modifying Profiles
+------------------
+
+While you can modify a profile by simply re-applying a YAML spec with the same profile name,
+you may also want to adjust a setting within a given profile, so there are commands
+for this purpose.
+
+To add or modify a setting for an existing profile::
+
+    ceph orch tuned-profile add-setting <setting-name> <value>
+
+To remove a setting from an existing profile::
+
+    ceph orch tuned-profile rm-setting <setting-name>
+
+.. note:: 
+
+  Modifying the placement will require re-applying a profile with the same name. Keep
+  in mind that profiles are tracked by their name, so whenever a profile with the same
+  name as an existing profile is applied, it will overwrite the old profile.
+
 SSH Configuration
 =================