]> git.proxmox.com Git - ceph.git/blame - ceph/doc/rados/operations/health-checks.rst
update sources to 12.2.2
[ceph.git] / ceph / doc / rados / operations / health-checks.rst
CommitLineData
c07f9fc5
FG
1
2=============
3Health checks
4=============
5
6Overview
7========
8
9There is a finite set of possible health messages that a Ceph cluster can
10raise -- these are defined as *health checks* which have unique identifiers.
11
12The identifier is a terse pseudo-human-readable (i.e. like a variable name)
13string. It is intended to enable tools (such as UIs) to make sense of
14health checks, and present them in a way that reflects their meaning.
15
16This page lists the health checks that are raised by the monitor and manager
17daemons. In addition to these, you may also see health checks that originate
18from MDS daemons (see :doc:`/cephfs/health-messages`), and health checks
19that are defined by ceph-mgr python modules.
20
21Definitions
22===========
23
24
25OSDs
26----
27
28OSD_DOWN
29________
30
31One or more OSDs are marked down. The ceph-osd daemon may have been
32stopped, or peer OSDs may be unable to reach the OSD over the network.
33Common causes include a stopped or crashed daemon, a down host, or a
34network outage.
35
36Verify the host is healthy, the daemon is started, and network is
37functioning. If the daemon has crashed, the daemon log file
38(``/var/log/ceph/ceph-osd.*``) may contain debugging information.
39
40OSD_<crush type>_DOWN
41_____________________
42
43(e.g. OSD_HOST_DOWN, OSD_ROOT_DOWN)
44
45All the OSDs within a particular CRUSH subtree are marked down, for example
46all OSDs on a host.
47
48OSD_ORPHAN
49__________
50
51An OSD is referenced in the CRUSH map hierarchy but does not exist.
52
53The OSD can be removed from the CRUSH hierarchy with::
54
55 ceph osd crush rm osd.<id>
56
57OSD_OUT_OF_ORDER_FULL
58_____________________
59
60The utilization thresholds for `backfillfull`, `nearfull`, `full`,
61and/or `failsafe_full` are not ascending. In particular, we expect
62`backfillfull < nearfull`, `nearfull < full`, and `full <
63failsafe_full`.
64
65The thresholds can be adjusted with::
66
67 ceph osd set-backfillfull-ratio <ratio>
68 ceph osd set-nearfull-ratio <ratio>
69 ceph osd set-full-ratio <ratio>
70
71
72OSD_FULL
73________
74
75One or more OSDs has exceeded the `full` threshold and is preventing
76the cluster from servicing writes.
77
78Utilization by pool can be checked with::
79
80 ceph df
81
82The currently defined `full` ratio can be seen with::
83
84 ceph osd dump | grep full_ratio
85
86A short-term workaround to restore write availability is to raise the full
87threshold by a small amount::
88
89 ceph osd set-full-ratio <ratio>
90
91New storage should be added to the cluster by deploying more OSDs or
92existing data should be deleted in order to free up space.
93
94OSD_BACKFILLFULL
95________________
96
97One or more OSDs has exceeded the `backfillfull` threshold, which will
98prevent data from being allowed to rebalance to this device. This is
99an early warning that rebalancing may not be able to complete and that
100the cluster is approaching full.
101
102Utilization by pool can be checked with::
103
104 ceph df
105
106OSD_NEARFULL
107____________
108
109One or more OSDs has exceeded the `nearfull` threshold. This is an early
110warning that the cluster is approaching full.
111
112Utilization by pool can be checked with::
113
114 ceph df
115
116OSDMAP_FLAGS
117____________
118
119One or more cluster flags of interest has been set. These flags include:
120
121* *full* - the cluster is flagged as full and cannot service writes
122* *pauserd*, *pausewr* - paused reads or writes
123* *noup* - OSDs are not allowed to start
124* *nodown* - OSD failure reports are being ignored, such that the
125 monitors will not mark OSDs `down`
126* *noin* - OSDs that were previously marked `out` will not be marked
127 back `in` when they start
128* *noout* - down OSDs will not automatically be marked out after the
129 configured interval
130* *nobackfill*, *norecover*, *norebalance* - recovery or data
131 rebalancing is suspended
132* *noscrub*, *nodeep_scrub* - scrubbing is disabled
133* *notieragent* - cache tiering activity is suspended
134
135With the exception of *full*, these flags can be set or cleared with::
136
137 ceph osd set <flag>
138 ceph osd unset <flag>
139
140OSD_FLAGS
141_________
142
143One or more OSDs has a per-OSD flag of interest set. These flags include:
144
145* *noup*: OSD is not allowed to start
146* *nodown*: failure reports for this OSD will be ignored
147* *noin*: if this OSD was previously marked `out` automatically
148 after a failure, it will not be marked in when it stats
149* *noout*: if this OSD is down it will not automatically be marked
150 `out` after the configured interval
151
152Per-OSD flags can be set and cleared with::
153
154 ceph osd add-<flag> <osd-id>
155 ceph osd rm-<flag> <osd-id>
156
157For example, ::
158
159 ceph osd rm-nodown osd.123
160
161OLD_CRUSH_TUNABLES
162__________________
163
164The CRUSH map is using very old settings and should be updated. The
165oldest tunables that can be used (i.e., the oldest client version that
166can connect to the cluster) without triggering this health warning is
167determined by the ``mon_crush_min_required_version`` config option.
168See :doc:`/rados/operations/crush-map/#tunables` for more information.
169
170OLD_CRUSH_STRAW_CALC_VERSION
171____________________________
172
173The CRUSH map is using an older, non-optimal method for calculating
174intermediate weight values for ``straw`` buckets.
175
176The CRUSH map should be updated to use the newer method
177(``straw_calc_version=1``). See
178:doc:`/rados/operations/crush-map/#tunables` for more information.
179
180CACHE_POOL_NO_HIT_SET
181_____________________
182
183One or more cache pools is not configured with a *hit set* to track
184utilization, which will prevent the tiering agent from identifying
185cold objects to flush and evict from the cache.
186
187Hit sets can be configured on the cache pool with::
188
189 ceph osd pool set <poolname> hit_set_type <type>
190 ceph osd pool set <poolname> hit_set_period <period-in-seconds>
191 ceph osd pool set <poolname> hit_set_count <number-of-hitsets>
192 ceph osd pool set <poolname> hit_set_fpp <target-false-positive-rate>
193
194OSD_NO_SORTBITWISE
195__________________
196
197No pre-luminous v12.y.z OSDs are running but the ``sortbitwise`` flag has not
198been set.
199
200The ``sortbitwise`` flag must be set before luminous v12.y.z or newer
201OSDs can start. You can safely set the flag with::
202
203 ceph osd set sortbitwise
204
205POOL_FULL
206_________
207
208One or more pools has reached its quota and is no longer allowing writes.
209
210Pool quotas and utilization can be seen with::
211
212 ceph df detail
213
214You can either raise the pool quota with::
215
216 ceph osd pool set-quota <poolname> max_objects <num-objects>
217 ceph osd pool set-quota <poolname> max_bytes <num-bytes>
218
219or delete some existing data to reduce utilization.
220
221
222Data health (pools & placement groups)
d2e6a577 223--------------------------------------
c07f9fc5
FG
224
225PG_AVAILABILITY
226_______________
227
228Data availability is reduced, meaning that the cluster is unable to
229service potential read or write requests for some data in the cluster.
230Specifically, one or more PGs is in a state that does not allow IO
231requests to be serviced. Problematic PG states include *peering*,
232*stale*, *incomplete*, and the lack of *active* (if those conditions do not clear
233quickly).
234
235Detailed information about which PGs are affected is available from::
236
237 ceph health detail
238
239In most cases the root cause is that one or more OSDs is currently
240down; see the dicussion for ``OSD_DOWN`` above.
241
242The state of specific problematic PGs can be queried with::
243
244 ceph tell <pgid> query
245
246PG_DEGRADED
247___________
248
249Data redundancy is reduced for some data, meaning the cluster does not
250have the desired number of replicas for all data (for replicated
251pools) or erasure code fragments (for erasure coded pools).
252Specifically, one or more PGs:
253
254* has the *degraded* or *undersized* flag set, meaning there are not
255 enough instances of that placement group in the cluster;
256* has not had the *clean* flag set for some time.
257
258Detailed information about which PGs are affected is available from::
259
260 ceph health detail
261
262In most cases the root cause is that one or more OSDs is currently
263down; see the dicussion for ``OSD_DOWN`` above.
264
265The state of specific problematic PGs can be queried with::
266
267 ceph tell <pgid> query
268
269
270PG_DEGRADED_FULL
271________________
272
273Data redundancy may be reduced or at risk for some data due to a lack
274of free space in the cluster. Specifically, one or more PGs has the
275*backfill_toofull* or *recovery_toofull* flag set, meaning that the
276cluster is unable to migrate or recover data because one or more OSDs
277is above the *backfillfull* threshold.
278
279See the discussion for *OSD_BACKFILLFULL* or *OSD_FULL* above for
280steps to resolve this condition.
281
282PG_DAMAGED
283__________
284
285Data scrubbing has discovered some problems with data consistency in
286the cluster. Specifically, one or more PGs has the *inconsistent* or
287*snaptrim_error* flag is set, indicating an earlier scrub operation
288found a problem, or that the *repair* flag is set, meaning a repair
289for such an inconsistency is currently in progress.
290
291See :doc:`pg-repair` for more information.
292
293OSD_SCRUB_ERRORS
294________________
295
296Recent OSD scrubs have uncovered inconsistencies. This error is generally
297paired with *PG_DAMANGED* (see above).
298
299See :doc:`pg-repair` for more information.
300
301CACHE_POOL_NEAR_FULL
302____________________
303
304A cache tier pool is nearly full. Full in this context is determined
305by the ``target_max_bytes`` and ``target_max_objects`` properties on
306the cache pool. Once the pool reaches the target threshold, write
307requests to the pool may block while data is flushed and evicted
308from the cache, a state that normally leads to very high latencies and
309poor performance.
310
311The cache pool target size can be adjusted with::
312
313 ceph osd pool set <cache-pool-name> target_max_bytes <bytes>
314 ceph osd pool set <cache-pool-name> target_max_objects <objects>
315
316Normal cache flush and evict activity may also be throttled due to reduced
317availability or performance of the base tier, or overall cluster load.
318
319TOO_FEW_PGS
320___________
321
322The number of PGs in use in the cluster is below the configurable
323threshold of ``mon_pg_warn_min_per_osd`` PGs per OSD. This can lead
324to suboptimizal distribution and balance of data across the OSDs in
325the cluster, and similar reduce overall performance.
326
327This may be an expected condition if data pools have not yet been
328created.
329
330The PG count for existing pools can be increased or new pools can be
331created. Please refer to
332:doc:`placement-groups#Choosing-the-number-of-Placement-Groups` for
333more information.
334
335TOO_MANY_PGS
336____________
337
338The number of PGs in use in the cluster is above the configurable
3efd9988
FG
339threshold of ``mon_max_pg_per_osd`` PGs per OSD. If this threshold is
340exceed the cluster will not allow new pools to be created, pool `pg_num` to
341be increased, or pool replication to be increased (any of which would lead to
342more PGs in the cluster). A large number of PGs can lead
c07f9fc5
FG
343to higher memory utilization for OSD daemons, slower peering after
344cluster state changes (like OSD restarts, additions, or removals), and
345higher load on the Manager and Monitor daemons.
346
3efd9988
FG
347The simplest way to mitigate the problem is to increase the number of
348OSDs in the cluster by adding more hardware. Note that the OSD count
349used for the purposes of this health check is the number of "in" OSDs,
350so marking "out" OSDs "in" (if there are any) can also help::
c07f9fc5 351
3efd9988 352 ceph osd in <osd id(s)>
c07f9fc5
FG
353
354Please refer to
355:doc:`placement-groups#Choosing-the-number-of-Placement-Groups` for
356more information.
357
358SMALLER_PGP_NUM
359_______________
360
361One or more pools has a ``pgp_num`` value less than ``pg_num``. This
362is normally an indication that the PG count was increased without
363also increasing the placement behavior.
364
365This is sometimes done deliberately to separate out the `split` step
366when the PG count is adjusted from the data migration that is needed
367when ``pgp_num`` is changed.
368
369This is normally resolved by setting ``pgp_num`` to match ``pg_num``,
370triggering the data migration, with::
371
372 ceph osd pool set <pool> pgp_num <pg-num-value>
373
c07f9fc5
FG
374MANY_OBJECTS_PER_PG
375___________________
376
377One or more pools has an average number of objects per PG that is
378significantly higher than the overall cluster average. The specific
379threshold is controlled by the ``mon_pg_warn_max_object_skew``
380configuration value.
381
382This is usually an indication that the pool(s) containing most of the
383data in the cluster have too few PGs, and/or that other pools that do
384not contain as much data have too many PGs. See the discussion of
385*TOO_MANY_PGS* above.
386
387The threshold can be raised to silence the health warning by adjusting
388the ``mon_pg_warn_max_object_skew`` config option on the monitors.
389
390POOL_APP_NOT_ENABLED
391____________________
392
393A pool exists that contains one or more objects but has not been
394tagged for use by a particular application.
395
396Resolve this warning by labeling the pool for use by an application. For
397example, if the pool is used by RBD,::
398
399 rbd pool init <poolname>
400
401If the pool is being used by a custom application 'foo', you can also label
402via the low-level command::
403
404 ceph osd pool application enable foo
405
406For more information, see :doc:`pools.rst#associate-pool-to-application`.
407
408POOL_FULL
409_________
410
411One or more pools has reached (or is very close to reaching) its
412quota. The threshold to trigger this error condition is controlled by
413the ``mon_pool_quota_crit_threshold`` configuration option.
414
415Pool quotas can be adjusted up or down (or removed) with::
416
417 ceph osd pool set-quota <pool> max_bytes <bytes>
418 ceph osd pool set-quota <pool> max_objects <objects>
419
420Setting the quota value to 0 will disable the quota.
421
422POOL_NEAR_FULL
423______________
424
425One or more pools is approaching is quota. The threshold to trigger
426this warning condition is controlled by the
427``mon_pool_quota_warn_threshold`` configuration option.
428
429Pool quotas can be adjusted up or down (or removed) with::
430
431 ceph osd pool set-quota <pool> max_bytes <bytes>
432 ceph osd pool set-quota <pool> max_objects <objects>
433
434Setting the quota value to 0 will disable the quota.
435
436OBJECT_MISPLACED
437________________
438
439One or more objects in the cluster is not stored on the node the
440cluster would like it to be stored on. This is an indication that
441data migration due to some recent cluster change has not yet completed.
442
443Misplaced data is not a dangerous condition in and of itself; data
444consistency is never at risk, and old copies of objects are never
445removed until the desired number of new copies (in the desired
446locations) are present.
447
448OBJECT_UNFOUND
449______________
450
451One or more objects in the cluster cannot be found. Specifically, the
452OSDs know that a new or updated copy of an object should exist, but a
453copy of that version of the object has not been found on OSDs that are
454currently online.
455
456Read or write requests to unfound objects will block.
457
458Ideally, a down OSD can be brought back online that has the more
459recent copy of the unfound object. Candidate OSDs can be identified from the
460peering state for the PG(s) responsible for the unfound object::
461
462 ceph tell <pgid> query
463
464If the latest copy of the object is not available, the cluster can be
465told to roll back to a previous version of the object. See
466:doc:`troubleshooting-pg#Unfound-objects` for more information.
467
468REQUEST_SLOW
469____________
470
471One or more OSD requests is taking a long time to process. This can
472be an indication of extreme load, a slow storage device, or a software
473bug.
474
475The request queue on the OSD(s) in question can be queried with the
476following command, executed from the OSD host::
477
478 ceph daemon osd.<id> ops
479
480A summary of the slowest recent requests can be seen with::
481
482 ceph daemon osd.<id> dump_historic_ops
483
484The location of an OSD can be found with::
485
486 ceph osd find osd.<id>
487
488REQUEST_STUCK
489_____________
490
491One or more OSD requests has been blocked for an extremely long time.
492This is an indication that either the cluster has been unhealthy for
493an extended period of time (e.g., not enough running OSDs) or there is
494some internal problem with the OSD. See the dicussion of
495*REQUEST_SLOW* above.
496
497PG_NOT_SCRUBBED
498_______________
499
500One or more PGs has not been scrubbed recently. PGs are normally
501scrubbed every ``mon_scrub_interval`` seconds, and this warning
502triggers when ``mon_warn_not_scrubbed`` such intervals have elapsed
503without a scrub.
504
505PGs will not scrub if they are not flagged as *clean*, which may
506happen if they are misplaced or degraded (see *PG_AVAILABILITY* and
507*PG_DEGRADED* above).
508
509You can manually initiate a scrub of a clean PG with::
510
511 ceph pg scrub <pgid>
512
513PG_NOT_DEEP_SCRUBBED
514____________________
515
516One or more PGs has not been deep scrubbed recently. PGs are normally
517scrubbed every ``osd_deep_mon_scrub_interval`` seconds, and this warning
518triggers when ``mon_warn_not_deep_scrubbed`` such intervals have elapsed
519without a scrub.
520
521PGs will not (deep) scrub if they are not flagged as *clean*, which may
522happen if they are misplaced or degraded (see *PG_AVAILABILITY* and
523*PG_DEGRADED* above).
524
525You can manually initiate a scrub of a clean PG with::
526
527 ceph pg deep-scrub <pgid>