]> git.proxmox.com Git - ceph.git/blame - ceph/doc/ceph-volume/simple/activate.rst
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / doc / ceph-volume / simple / activate.rst
CommitLineData
3efd9988
FG
1.. _ceph-volume-simple-activate:
2
3``activate``
4============
5Once :ref:`ceph-volume-simple-scan` has been completed, and all the metadata
6captured for an OSD has been persisted to ``/etc/ceph/osd/{id}-{uuid}.json``
7the OSD is now ready to get "activated".
8
9This activation process **disables** all ``ceph-disk`` systemd units by masking
10them, to prevent the UDEV/ceph-disk interaction that will attempt to start them
11up at boot time.
12
13The disabling of ``ceph-disk`` units is done only when calling ``ceph-volume
f67539c2 14simple activate`` directly, but is avoided when being called by systemd when
3efd9988
FG
15the system is booting up.
16
17The activation process requires using both the :term:`OSD id` and :term:`OSD uuid`
18To activate parsed OSDs::
19
20 ceph-volume simple activate 0 6cc43680-4f6e-4feb-92ff-9c7ba204120e
21
22The above command will assume that a JSON configuration will be found in::
23
24 /etc/ceph/osd/0-6cc43680-4f6e-4feb-92ff-9c7ba204120e.json
25
26Alternatively, using a path to a JSON file directly is also possible::
27
28 ceph-volume simple activate --file /etc/ceph/osd/0-6cc43680-4f6e-4feb-92ff-9c7ba204120e.json
29
30requiring uuids
31^^^^^^^^^^^^^^^
32The :term:`OSD uuid` is being required as an extra step to ensure that the
33right OSD is being activated. It is entirely possible that a previous OSD with
34the same id exists and would end up activating the incorrect one.
35
36
37Discovery
38---------
39With OSDs previously scanned by ``ceph-volume``, a *discovery* process is
40performed using ``blkid`` and ``lvm``. There is currently support only for
41devices with GPT partitions and LVM logical volumes.
42
43The GPT partitions will have a ``PARTUUID`` that can be queried by calling out
44to ``blkid``, and the logical volumes will have a ``lv_uuid`` that can be
45queried against ``lvs`` (the LVM tool to list logical volumes).
46
47This discovery process ensures that devices can be correctly detected even if
48they are repurposed into another system or if their name changes (as in the
49case of non-persisting names like ``/dev/sda1``)
50
51The JSON configuration file used to map what devices go to what OSD will then
52coordinate the mounting and symlinking as part of activation.
53
54To ensure that the symlinks are always correct, if they exist in the OSD
55directory, the symlinks will be re-done.
56
57A systemd unit will capture the :term:`OSD id` and :term:`OSD uuid` and
58persist it. Internally, the activation will enable it like::
59
60 systemctl enable ceph-volume@simple-$id-$uuid
61
62For example::
63
64 systemctl enable ceph-volume@simple-0-8715BEB4-15C5-49DE-BA6F-401086EC7B41
65
66Would start the discovery process for the OSD with an id of ``0`` and a UUID of
67``8715BEB4-15C5-49DE-BA6F-401086EC7B41``.
68
69
70The systemd process will call out to activate passing the information needed to
71identify the OSD and its devices, and it will proceed to:
72
73# mount the device in the corresponding location (by convention this is
74 ``/var/lib/ceph/osd/<cluster name>-<osd id>/``)
75
76# ensure that all required devices are ready for that OSD and properly linked,
77regardless of objectstore used (filestore or bluestore). The symbolic link will
78**always** be re-done to ensure that the correct device is linked.
79
80# start the ``ceph-osd@0`` systemd unit