]> git.proxmox.com Git - ceph.git/blobdiff - ceph/doc/ceph-volume/lvm/activate.rst
import ceph quincy 17.2.6
[ceph.git] / ceph / doc / ceph-volume / lvm / activate.rst
index 956a62a627df2aac3f1aa9b6f251d9506ba6122c..9faf1f74ebd724ed79c2c08828f97d4251e0919a 100644 (file)
@@ -2,6 +2,7 @@
 
 ``activate``
 ============
+
 Once :ref:`ceph-volume-lvm-prepare` is completed, and all the various steps
 that entails are done, the volume is ready to get "activated".
 
@@ -12,6 +13,9 @@ understand what OSD is enabled and needs to be mounted.
 .. note:: The execution of this call is fully idempotent, and there is no
           side-effects when running multiple times
 
+For OSDs deployed by cephadm, please refer to :ref:`cephadm-osd-activate`
+instead.
+
 New OSDs
 --------
 To activate newly prepared OSDs both the :term:`OSD id` and :term:`OSD uuid`
@@ -19,9 +23,25 @@ need to be supplied. For example::
 
     ceph-volume lvm activate --bluestore 0 0263644D-0BF1-4D6D-BC34-28BD98AE3BC8
 
-.. note:: The UUID is stored in the ``osd_fsid`` file in the OSD path, which is
+.. note:: The UUID is stored in the ``fsid`` file in the OSD path, which is
           generated when :ref:`ceph-volume-lvm-prepare` is used.
 
+Activating all OSDs
+-------------------
+
+.. note:: For OSDs deployed by cephadm, please refer to :ref:`cephadm-osd-activate`
+          instead.
+
+It is possible to activate all existing OSDs at once by using the ``--all``
+flag. For example::
+
+    ceph-volume lvm activate --all
+
+This call will inspect all the OSDs created by ceph-volume that are inactive
+and will activate them one by one. If any of the OSDs are already running, it
+will report them in the command output and skip them, making it safe to rerun
+(idempotent).
+
 requiring uuids
 ^^^^^^^^^^^^^^^
 The :term:`OSD uuid` is being required as an extra step to ensure that the
@@ -29,19 +49,26 @@ right OSD is being activated. It is entirely possible that a previous OSD with
 the same id exists and would end up activating the incorrect one.
 
 
+dmcrypt
+^^^^^^^
+If the OSD was prepared with dmcrypt by ceph-volume, there is no need to
+specify ``--dmcrypt`` on the command line again (that flag is not available for
+the ``activate`` subcommand). An encrypted OSD will be automatically detected.
+
+
 Discovery
 ---------
-With either existing OSDs or new ones being activated, a *discovery* process is
+With OSDs previously created by ``ceph-volume``, a *discovery* process is
 performed using :term:`LVM tags` to enable the systemd units.
 
 The systemd unit will capture the :term:`OSD id` and :term:`OSD uuid` and
 persist it. Internally, the activation will enable it like::
 
-    systemctl enable ceph-volume@$id-$uuid-lvm
+    systemctl enable ceph-volume@lvm-$id-$uuid
 
 For example::
 
-    systemctl enable ceph-volume@0-8715BEB4-15C5-49DE-BA6F-401086EC7B41-lvm
+    systemctl enable ceph-volume@lvm-0-8715BEB4-15C5-49DE-BA6F-401086EC7B41
 
 Would start the discovery process for the OSD with an id of ``0`` and a UUID of
 ``8715BEB4-15C5-49DE-BA6F-401086EC7B41``.
@@ -54,7 +81,11 @@ The systemd unit will look for the matching OSD device, and by looking at its
 # mount the device in the corresponding location (by convention this is
   ``/var/lib/ceph/osd/<cluster name>-<osd id>/``)
 
-# ensure that all required devices are ready for that OSD
+# ensure that all required devices are ready for that OSD. In the case of
+a journal (when ``--filestore`` is selected) the device will be queried (with
+``blkid`` for partitions, and lvm for logical volumes) to ensure that the
+correct device is being linked. The symbolic link will *always* be re-done to
+ensure that the correct device is linked.
 
 # start the ``ceph-osd@0`` systemd unit
 
@@ -63,9 +94,11 @@ The systemd unit will look for the matching OSD device, and by looking at its
 
 Existing OSDs
 -------------
-For exsiting OSDs that have been deployed with different tooling, the only way
-to port them over to the new mechanism is to prepare them again (losing data).
-See :ref:`ceph-volume-lvm-existing-osds` for details on how to proceed.
+For existing OSDs that have been deployed with ``ceph-disk``, they need to be
+scanned and activated :ref:`using the simple sub-command <ceph-volume-simple>`.
+If a different tooling was used then the only way to port them over to the new
+mechanism is to prepare them again (losing data). See
+:ref:`ceph-volume-lvm-existing-osds` for details on how to proceed.
 
 Summary
 -------