]> git.proxmox.com Git - ceph.git/blame - ceph/doc/ceph-volume/systemd.rst
bump version to 12.2.5-pve1
[ceph.git] / ceph / doc / ceph-volume / systemd.rst
CommitLineData
3efd9988
FG
1.. _ceph-volume-systemd:
2
3systemd
4=======
5As part of the activation process (either with :ref:`ceph-volume-lvm-activate`
6or :ref:`ceph-volume-simple-activate`), systemd units will get enabled that
7will use the OSD id and uuid as part of their name. These units will be run
8when the system boots, and will proceed to activate their corresponding
9volumes via their sub-command implementation.
10
11The API for activation is a bit loose, it only requires two parts: the
12subcommand to use and any extra meta information separated by a dash. This
13convention makes the units look like::
14
15 ceph-volume@{command}-{extra metadata}
16
17The *extra metadata* can be anything needed that the subcommand implementing
18the processing might need. In the case of :ref:`ceph-volume-lvm` and
19:ref:`ceph-volume-simple`, both look to consume the :term:`OSD id` and :term:`OSD uuid`,
20but this is not a hard requirement, it is just how the sub-commands are
21implemented.
22
23Both the command and extra metadata gets persisted by systemd as part of the
24*"instance name"* of the unit. For example an OSD with an ID of 0, for the
25``lvm`` sub-command would look like::
26
27 systemctl enable ceph-volume@lvm-0-0A3E1ED2-DA8A-4F0E-AA95-61DEC71768D6
28
29The enabled unit is a :term:`systemd oneshot` service, meant to start at boot
30after the local filesystem is ready to be used.
31
32
33Failure and Retries
34-------------------
35It is common to have failures when a system is coming up online. The devices
36are sometimes not fully available and this unpredictable behavior may cause an
37OSD to not be ready to be used.
38
39There are two configurable environment variables used to set the retry
40behavior:
41
42* ``CEPH_VOLUME_SYSTEMD_TRIES``: Defaults to 30
43* ``CEPH_VOLUME_SYSTEMD_INTERVAL``: Defaults to 5
44
45The *"tries"* is a number that sets the maximum amount of times the unit will
46attempt to activate an OSD before giving up.
47
48The *"interval"* is a value in seconds that determines the waiting time before
49initiating another try at activating the OSD.