找回密码
 注册
查看: 722|回复: 2

pgs not deep-scrubbed in time异常处理

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2022-12-20 17:00:15 | 显示全部楼层 |阅读模式
发现出现异常warn信息,虽然不影响整个集群正常使用,但强迫症患者还是忍不了,下面是过程。查看具体报错信息
7 k! X6 \6 U4 W( D( ^( P6 cHEALTH_WARN 2 pgs not deep-scrubbed in time3 K0 L% b: p9 _
PG_NOT_DEEP_SCRUBBED 2 pgs not deep-scrubbed in time' n& H7 `1 o# X8 J' v
    pg 18.41 not deep-scrubbed since 2022-12-07 20:15:50.550606( e) Q" K1 k' q# A# h+ Z
    pg 5.16d not deep-scrubbed since 2022-12-07 22:21:58.141071
* x7 q+ w) K: Z. e  x
8 H% W3 K# x  d+ x- M" m
. R0 K5 v1 Z3 z& n- ^[root@controller1 ~]# ceph pg deep-scrub 18.41
  N- n, u7 y6 o# ainstructing pg 18.41 on osd.6 to deep-scrub
+ M" V" t0 k, N3 y& g2 x' L: e1 W/ O[root@controller1 ~]# ceph pg deep-scrub 5.16
  {& X: F3 d( t" s3 Y8 winstructing pg 5.16 on osd.13 to deep-scrub$ l6 ?) Z' ^( U' x' Q
' ?) J* y; y9 ^! G- L7 w

) M; B5 ~- Y; a/ t3 Y  l5 u
1 z) W9 G3 A6 c$ @% J+ ]9 s[root@controller1 ~]# ceph daemon osd.6 config show |grep osd_deep_scrub_interval
, G6 G0 A7 s  e  ?7 e    "osd_deep_scrub_interval": "604800.000000",
5 E( k1 I7 |! e1 i' Y+ |[root@controller1 ~]# ceph config set global osd_deep_scrub_interval 3628800
8 w/ I/ a7 J& Z  Z[root@controller1 ~]# ceph daemon osd.6 config show |grep osd_deep_scrub_interval* N' Y3 s( O) y- U1 P0 F6 W% A& s3 N
    "osd_deep_scrub_interval": "3628800.000000",4 S4 S7 u8 v$ {/ p$ G! @
[root@controller1 ~]# ceph config set global osd_deep_scrub_interval 3628800
7 a* V& I$ Y  M2 H' ]! N: D恢复正常后,再改回来:% b& l  Q0 F( W* y9 @
[root@controller1 ~]# ceph daemon osd.6 config show |grep osd_deep_scrub_interval4 V# R' W- r2 c
    "osd_deep_scrub_interval": "604800.000000",& p1 c, Z1 S8 l* s- x1 o
[root@controller1 ~]# ceph config set global osd_deep_scrub_interval 3628800
+ l9 y* ?* U! p+ M[root@controller1 ~]# ceph daemon osd.6 config show |grep osd_deep_scrub_interval' t9 ]  C% f3 @- d) j. Z* j
    "osd_deep_scrub_interval": "3628800.000000",
. {' t. ]* O( c! S+ j( H[root@controller1 ~]# ceph config set global osd_deep_scrub_interval 3628800^C
5 r; B5 c2 I: V& S$ U3 s( s" d, j2 ~* d
[root@controller1 ~]#
9 e, O# ]  M5 v  m/ L, E( `0 P[root@controller1 ~]# ceph -s0 j  c9 E& r9 D9 \, k% Q2 T
  cluster:4 H, `. N3 T  J8 {) F" w& z" u9 t
    id:     9d22e36a-2bdd-4d2d-8394-48af75ead777' I* O  d) C; X( Z& i$ E( b7 d% i
    health: HEALTH_OK
" ]" f2 u  q( ^3 \
. J' x1 k2 @+ K/ X# B* T4 n  x  services:
) ^: E$ W& G7 e# o0 f4 i    mon: 3 daemons, quorum ceph1,ceph2,ceph3 (age 5M)
) g% B: B; m$ h    mgr: ceph1(active, since 19M), standbys: ceph2,ceph3; b6 X+ c- \3 f& }, i- q; L# a5 g
    osd: 40 osds: 40 up (since 3w), 40 in (since 12M)" U! D+ k+ k: ?8 c/ F& a8 p
    rgw: 3 daemons active (host09, host10, host11)
- r" L3 l) l* N( J2 b) J6 H8 K+ {: C* v8 j
  task status:
- }8 @) i& f% m/ C" A8 X/ a- M/ E- X! c0 n
  data:
2 x2 a! X5 ^. z* y% E  p    pools:   16 pools, 3072 pgs
- J, S! u% l$ P. h# b    objects: 4.20M objects, 16 TiB
' r+ v* b/ q# m9 n6 S/ m    usage:   40 TiB used, 107 TiB / 148 TiB avail+ e4 W  N* V' f) z) t5 K
    pgs:     3067 active+clean
8 R( B, g" u8 R) b/ A# m) Q6 e$ c0 J             5    active+clean+scrubbing+deep
: u- A/ c/ b% v2 K6 v8 m
# Y% E' T0 T! S0 e( `) C3 h  io:/ l1 {# c8 w) ]0 i1 U) u1 U
    client:   403 KiB/s rd, 9.5 MiB/s wr, 514 op/s rd, 466 op/s wr/ L4 e* o/ g5 F4 x6 |1 I

5 d% T; n& N8 Y; d[root@ ~]# ceph config set global osd_deep_scrub_interval 604800
; d" ~5 e3 f2 b[root@ ~]#
6 e2 Q( m3 z1 \. f6 `4 q
6 ~1 Y) I$ X3 {9 D9 A
2 ]! L# [( |( _3 Y" x1 Osystemctl restart ceph-osd@6.service: Q+ t5 h# m! n8 M* F
/ E0 ~2 H7 X( g* P
, n1 D5 N% x0 d" T
9 f) H+ T2 K( q8 K

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2022-12-20 17:00:16 | 显示全部楼层
根源
- t' _5 B  l7 n% ~! nRHCS 4 has introduced 2 new parameters on scrubbing interval warning, and default values are, A0 ~4 K) ?. \, b5 s5 a0 \5 y; U, z
Raw
( q( h5 j, S! b+ Y% w"mon_warn_pg_not_deep_scrubbed_ratio": "0.750000",6 i& |. J" D5 f. c; o9 `1 W
"mon_warn_pg_not_scrubbed_ratio": "0.500000",
( |. b) Y3 }5 VThese ratios are based on the following parameters, and default values are
7 W$ h  l4 C* \' s$ M7 lRaw9 Z2 h- D% @; J
"osd_scrub_max_interval": "604800.000000",
0 z$ _  O5 n2 g' M; }6 g! U"osd_deep_scrub_interval": "604800.000000"2 Y& {1 [( Z+ Y# M
When pgs are not scrubbed / deep scrubbed for the configured ratio of the interval, warnings of "pgs not scrubbed / deep-scrubbed in time" will show in Ceph status.
* \; z$ y& h5 D+ Q$ ?' l) ^! R; G
1 o' ^0 E/ q8 R6 W# u) p2 XWhen setting "mon_warn_pg_not_deep_scrubbed_ratio" or "mon_warn_pg_not_scrubbed_ratio" values to 0, warnings will be disabled. Please evaluate the cluster's past usage carefully before setting.! W6 ^, T* p7 o

  i/ S* y6 |! S% f; q* r: OSometimes, we might get a false warning even though the osd_deep_scrub_interval has been increased. This happens when the scrubbing parameters are not applied globally because these settings are used by both OSDs and MONs.3 o& \' \0 w7 w+ h4 N
The OSDs use them to determine when to run scrub, and the MONs/MGRs use them to check if they need to show the warning.& c/ P3 B, x% F2 r
You can set it globally as:0 `3 J. n" Y  c  f- l# z; L2 t/ `. S
& b, R" W7 Q, h* s% N
Raw
  ?, Y6 |* Y$ y: I3 Y# ceph config set global osd_deep_scrub_interval 3628800& s% b. O4 E% {  D
诊断步骤2 v  d6 y. o! x9 Q5 N5 }8 |
Checking scrubbing related configurations by admin socket3 c* K& N9 z- Q
Raw
/ O" Y0 s4 A* w5 ~7 ]ceph --admin-daemon /var/run/ceph/<admin_socket_name>.asok config show | grep scrub

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2022-12-20 17:00:17 | 显示全部楼层
You can set the deep scrub period to 2 week, to stretch the deep scrub window. Insted of5 }2 E1 }* G) \' |
+ C. r7 ^. W* j" G: }# x
osd_deep_scrub_interval = 604800
3 C5 `3 _# ^2 W. |1 P5 @3 ?use:* F+ s- E" s& X2 x. t
8 T7 S- d1 Q+ I% m; r5 O) l( r) I
osd_deep_scrub_interval = 1209600
您需要登录后才可以回帖 登录 | 注册

本版积分规则

返回首页|Archiver|手机版|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )

GMT+8, 2026-6-12 01:02 , Processed in 0.015460 second(s), 22 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表