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