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

pgs not deep-scrubbed in time异常处理

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2022-12-20 17:00:15 | 显示全部楼层 |阅读模式
发现出现异常warn信息,虽然不影响整个集群正常使用,但强迫症患者还是忍不了,下面是过程。查看具体报错信息
; o- S: M# {; p7 LHEALTH_WARN 2 pgs not deep-scrubbed in time8 a: K) a9 @& P1 x/ K8 T
PG_NOT_DEEP_SCRUBBED 2 pgs not deep-scrubbed in time
# y$ B4 j8 L: v. @- ?- R% B. _! j( m    pg 18.41 not deep-scrubbed since 2022-12-07 20:15:50.550606* t% l7 G7 s9 D
    pg 5.16d not deep-scrubbed since 2022-12-07 22:21:58.141071
+ k& l; X9 V. G( A- m5 I
: K6 V" n/ C0 F6 V9 b
* M' Q+ o" q, r+ c[root@controller1 ~]# ceph pg deep-scrub 18.41
* t# `4 K% |9 e2 winstructing pg 18.41 on osd.6 to deep-scrub9 v0 v/ F. o. S7 a
[root@controller1 ~]# ceph pg deep-scrub 5.16
) T; _; f# q! c/ |4 Qinstructing pg 5.16 on osd.13 to deep-scrub
. O0 L. V3 a/ k% G
& h- R& i4 c8 _, }- e
* |1 `6 `( B2 w5 J% |" {# K5 o
* o2 y3 X" f3 `# ^3 `6 ~' F$ `[root@controller1 ~]# ceph daemon osd.6 config show |grep osd_deep_scrub_interval
" @: B" W/ p% s  t8 S! j    "osd_deep_scrub_interval": "604800.000000",% u: F0 {7 L% G  t% W" T& z2 G
[root@controller1 ~]# ceph config set global osd_deep_scrub_interval 36288008 V4 J: o) W/ [9 L) [1 ^+ R5 G
[root@controller1 ~]# ceph daemon osd.6 config show |grep osd_deep_scrub_interval4 _9 I" g" o3 Q, ^
    "osd_deep_scrub_interval": "3628800.000000",
0 Q6 ?6 b: s$ `' e[root@controller1 ~]# ceph config set global osd_deep_scrub_interval 3628800- w  d  E0 H3 B5 h4 W
恢复正常后,再改回来:# a9 f; ~% D+ S7 B
[root@controller1 ~]# ceph daemon osd.6 config show |grep osd_deep_scrub_interval
) o, E- _- u7 U" G+ J+ s    "osd_deep_scrub_interval": "604800.000000",
& Y* V* ^" o7 ~" x[root@controller1 ~]# ceph config set global osd_deep_scrub_interval 3628800
+ d3 e7 t- i2 N5 r' r# C( [: S, w[root@controller1 ~]# ceph daemon osd.6 config show |grep osd_deep_scrub_interval
% L! W( l* Q, ]+ `( H: @- ^& A    "osd_deep_scrub_interval": "3628800.000000",$ {9 L  ?+ a* J) ~1 |7 ~
[root@controller1 ~]# ceph config set global osd_deep_scrub_interval 3628800^C
; }9 i" J. {' X* o9 ]8 z9 F9 U0 m" u9 E7 R& N" i
[root@controller1 ~]#
9 Q- s$ u! W8 P0 q+ H$ O[root@controller1 ~]# ceph -s
: U3 H% B9 T4 X  k+ b. y/ o, q  cluster:# ]  v9 N8 x8 k6 _' d7 q
    id:     9d22e36a-2bdd-4d2d-8394-48af75ead777" r- B( _  M/ M& F/ v+ U
    health: HEALTH_OK
1 i. u4 i7 j1 e, F+ X. \' V8 ~) j2 K7 d, j2 p0 o$ P
  services:4 }) d' A: G8 v3 Z
    mon: 3 daemons, quorum ceph1,ceph2,ceph3 (age 5M)* C5 m- B" \3 r/ }3 g- c
    mgr: ceph1(active, since 19M), standbys: ceph2,ceph3! m3 C2 ^7 @, d4 W
    osd: 40 osds: 40 up (since 3w), 40 in (since 12M)3 S' |9 G4 J4 R2 h4 y
    rgw: 3 daemons active (host09, host10, host11)1 s8 e7 e# X5 F6 @

* ~- X7 [+ l" O2 B/ s* x9 o, S  task status:, D1 Q; l+ a/ ]* m' u; ~7 T
4 m0 H  z/ [2 N; Y! F8 K% s9 X6 @! M
  data:4 N+ ^, d8 A! J! A; n
    pools:   16 pools, 3072 pgs
: ]; Y0 z; p& [( m3 o. s0 q, j    objects: 4.20M objects, 16 TiB
; Y* ~& p: A/ |% [& m" T# u7 E    usage:   40 TiB used, 107 TiB / 148 TiB avail' q8 a; }9 k7 C6 K4 ?: i3 B
    pgs:     3067 active+clean4 t1 R: F8 Y0 m
             5    active+clean+scrubbing+deep+ y  H" X) R( J9 ]
" O) f, O4 Y9 U" K
  io:- W; p8 X0 E3 P0 ~- @  w6 z+ e
    client:   403 KiB/s rd, 9.5 MiB/s wr, 514 op/s rd, 466 op/s wr
6 B4 e( w% x" F  j2 z$ u. e+ C2 n6 L, t; u' D6 o! T; g8 T2 F
[root@ ~]# ceph config set global osd_deep_scrub_interval 604800
6 f4 D4 X  g* j" {- M[root@ ~]# * ~1 l( f3 C  l

. G! K/ J* x; j$ V* w) \" A7 O9 N) o( }
, X0 s/ @8 j2 [6 T5 t( n3 Fsystemctl restart ceph-osd@6.service
, C% L6 ?4 ]# S! v/ |  i, C+ A/ e2 p7 |; F  R

. A+ [! O. f5 \& _2 [1 d! t  o: K" m. V7 v

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2022-12-20 17:00:16 | 显示全部楼层
根源
# X0 d* J' E+ n/ H/ W  R% T2 D$ nRHCS 4 has introduced 2 new parameters on scrubbing interval warning, and default values are; c1 t; \& V: X8 D. A$ W$ }' a
Raw
5 {+ G0 P5 M3 z- R3 G* P( s"mon_warn_pg_not_deep_scrubbed_ratio": "0.750000",
. m8 u, _5 n1 I# Y- z"mon_warn_pg_not_scrubbed_ratio": "0.500000",
# I6 h! |/ G+ E1 k  AThese ratios are based on the following parameters, and default values are
/ @6 b7 k- d0 h! s; g8 jRaw
/ Y3 v" g. X3 x* J"osd_scrub_max_interval": "604800.000000",
/ [4 ]" h+ j% Q8 _/ f4 B- o"osd_deep_scrub_interval": "604800.000000"& @3 H' L. ^) A
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.
. ~! {# I6 O  J' M; k* X3 A/ s: x, `( D! s$ S# m
When 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.0 l$ u% o6 k! D( W6 a$ j: v
$ ^: y7 V& l9 h* I5 u
Sometimes, 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.4 w" x  m8 I2 U, F/ f
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.
6 X3 u; c( Y  J0 WYou can set it globally as:6 ?& G  ]+ b1 x4 e

: N( z$ u: d4 W% P, iRaw
; v5 o8 C5 z7 o. n- w" F+ V# ceph config set global osd_deep_scrub_interval 3628800
2 K! j  W# C2 R- T4 [8 [2 o0 t诊断步骤3 u) |0 k( F- p. @! O# y5 r
Checking scrubbing related configurations by admin socket
- D) I1 ~( f3 M4 K+ E) xRaw
8 {+ \+ r# |8 D9 F6 T% x( P4 Cceph --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 of, ~1 O6 u0 K8 ~* G5 G1 v5 ~
' S4 w( I2 t5 R, ~
osd_deep_scrub_interval = 604800
! e  s6 }# W* y( Huse:9 P& i, E! W4 L; P3 g/ E( [# j

9 X' a3 I" x: A- S osd_deep_scrub_interval = 1209600
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

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

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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