]> git.proxmox.com Git - ceph.git/blame - ceph/doc/ceph-volume/lvm/activate.rst
update sources to v12.2.3
[ceph.git] / ceph / doc / ceph-volume / lvm / activate.rst
CommitLineData
b5b8bbf5
FG
1.. _ceph-volume-lvm-activate:
2
3``activate``
4============
5Once :ref:`ceph-volume-lvm-prepare` is completed, and all the various steps
6that entails are done, the volume is ready to get "activated".
7
8This activation process enables a systemd unit that persists the OSD ID and its
9UUID (also called ``fsid`` in Ceph CLI tools), so that at boot time it can
10understand what OSD is enabled and needs to be mounted.
11
12.. note:: The execution of this call is fully idempotent, and there is no
13 side-effects when running multiple times
14
15New OSDs
16--------
17To activate newly prepared OSDs both the :term:`OSD id` and :term:`OSD uuid`
18need to be supplied. For example::
19
3efd9988 20 ceph-volume lvm activate --bluestore 0 0263644D-0BF1-4D6D-BC34-28BD98AE3BC8
b5b8bbf5 21
b32b8144 22.. note:: The UUID is stored in the ``fsid`` file in the OSD path, which is
b5b8bbf5
FG
23 generated when :ref:`ceph-volume-lvm-prepare` is used.
24
25requiring uuids
26^^^^^^^^^^^^^^^
27The :term:`OSD uuid` is being required as an extra step to ensure that the
28right OSD is being activated. It is entirely possible that a previous OSD with
29the same id exists and would end up activating the incorrect one.
30
31
32Discovery
33---------
34With either existing OSDs or new ones being activated, a *discovery* process is
35performed using :term:`LVM tags` to enable the systemd units.
36
37The systemd unit will capture the :term:`OSD id` and :term:`OSD uuid` and
38persist it. Internally, the activation will enable it like::
39
40 systemctl enable ceph-volume@$id-$uuid-lvm
41
42For example::
43
44 systemctl enable ceph-volume@0-8715BEB4-15C5-49DE-BA6F-401086EC7B41-lvm
45
46Would start the discovery process for the OSD with an id of ``0`` and a UUID of
47``8715BEB4-15C5-49DE-BA6F-401086EC7B41``.
48
3efd9988 49.. note:: for more details on the systemd workflow see :ref:`ceph-volume-lvm-systemd`
b5b8bbf5
FG
50
51The systemd unit will look for the matching OSD device, and by looking at its
52:term:`LVM tags` will proceed to:
53
54# mount the device in the corresponding location (by convention this is
55 ``/var/lib/ceph/osd/<cluster name>-<osd id>/``)
56
57# ensure that all required devices are ready for that OSD
58
59# start the ``ceph-osd@0`` systemd unit
60
3efd9988
FG
61.. note:: The system infers the objectstore type (filestore or bluestore) by
62 inspecting the LVM tags applied to the OSD devices
63
b5b8bbf5
FG
64Existing OSDs
65-------------
66For exsiting OSDs that have been deployed with different tooling, the only way
67to port them over to the new mechanism is to prepare them again (losing data).
68See :ref:`ceph-volume-lvm-existing-osds` for details on how to proceed.
69
70Summary
71-------
3efd9988
FG
72To recap the ``activate`` process for :term:`bluestore`:
73
74#. require both :term:`OSD id` and :term:`OSD uuid`
75#. enable the system unit with matching id and uuid
76#. Create the ``tmpfs`` mount at the OSD directory in
77 ``/var/lib/ceph/osd/$cluster-$id/``
78#. Recreate all the files needed with ``ceph-bluestore-tool prime-osd-dir`` by
79 pointing it to the OSD ``block`` device.
80#. the systemd unit will ensure all devices are ready and linked
81#. the matching ``ceph-osd`` systemd unit will get started
82
83And for :term:`filestore`:
b5b8bbf5
FG
84
85#. require both :term:`OSD id` and :term:`OSD uuid`
86#. enable the system unit with matching id and uuid
87#. the systemd unit will ensure all devices are ready and mounted (if needed)
88#. the matching ``ceph-osd`` systemd unit will get started