]> git.proxmox.com Git - ceph.git/blob - ceph/doc/mgr/osd_support.rst
fb1037c2b74ace5d44b3dea4b701043f34d232ba
[ceph.git] / ceph / doc / mgr / osd_support.rst
1 OSD Support Module
2 ==================
3 The OSD Support module holds osd specific functionality that
4 is needed by different components like the orchestrators.
5
6 In current scope:
7
8 * osd draining
9
10 Enabling
11 --------
12 When an orchestrator is used this should be enabled as a dependency.
13 (*currently only valid for the cephadm orchestrator*)
14
15 The *osd_support* module is manually enabled with::
16
17 ceph mgr module enable osd_support
18
19 Commands
20 --------
21
22 Draining
23 ########
24
25 This mode is for draining OSDs gracefully. `Draining` in this context means gracefully emptying out OSDs by setting their
26 weight to zero. An OSD is considered to be drained when no PGs are left.
27
28 ::
29
30 ceph osd drain $osd_id
31
32 Takes a $osd_id and schedules it for draining. Since that process can take
33 quite some time, the operation will be executed in the background. To query the status
34 of the operation you can use:
35
36 ::
37
38 ceph osd drain status
39
40 This gives you the status of all running operations in this format::
41
42 [{'osd_id': 0, 'pgs': 1234}, ..]
43
44 If you wish to stop an OSD from being drained::
45
46 ceph osd drain stop [$osd_id]
47
48 Stops all **scheduled** osd drain operations (not the operations that have been started already)
49 if no $osd_ids are given. If $osd_ids are present it only operates on them.
50 To stop and reset the weight of already started operations we need to save the initial weight
51 (see 'Ideas for improvement')
52
53
54 Ideas for improvement
55 ----------------------
56 - add health checks set_health_checks
57 - use objects to represent OSDs
58 - allows timestamps, trending information etc
59 - save osd drain state (at least the osd_ids in the mon store)
60 - resume after a mgr crash
61 - save the initial weight of a osd i.e. (set to initial weight on abort)