|
|
"osd_max_backfills": "1",
9 Y* T+ {% U. @. X3 a3 B6 R"osd_recovery_sleep": "0",5 B2 A& W. X. I4 Z H# x" M( L
, o+ p6 M- h) s# k# U" r& t# `
"osd_recovery_max_active": "3",5 t4 o$ h2 k" I4 ?3 ]3 _7 e! [# J
! j. V7 K% h- p W"osd_recovery_max_single_start": "1",3 n' a6 N$ c9 k+ @
( `6 f3 L( A& @" _3 C5 I: B无论哪种情况,osd上线后通常会发现,自己承载的pg有数据落后了,需要进入恢复模式,从其它osd上获取新的数据达到同步。
: Y5 b8 I* R/ B5 ?8 Q' L3 O; @
' w" q: z ]$ x3 p |/ k: N0 E. o+ Y4 V
这个过程就是recovery。recovery分为两种:log-based recovery: 是说osd故障时间不长,需要恢复的数据可以通过pg log回放找回来。4 \* z( A3 k' H5 n1 Q! b
( ^/ m- O7 k- U( x1 w
5 O) _6 q5 N( a2 I; d! b( ?
backfill recovery: 是说无法通过pg log回放找全数据,只能通过全量回填(backfill)拷贝。
2 F: J5 v( d$ J1 q; |
3 D% V0 l% W" O
6 Z; K& R7 ]7 W7 F8 C操作前记得查看下默认参数值,操作完后记得恢复到原先参数 & p6 u6 x' ~/ i6 v
, U3 [, K; k- E4 c
( @; [# l) x: c' s- T* L; ^; i业务优先:
6 [. {0 S, {9 p& b5 W
2 E. Z/ V0 p' H4 ^3 m3 G$ G9 H1 [
- p# w0 m2 h2 G6 z6 u4 {ceph tell osd.* injectargs '--osd-max-backfills 1 --osd-recovery-max-active 1 --osd-recovery-max-single-start 1'ceph tell osd.* injectargs '--osd-recovery-sleep 1' 7 ?) J$ C a# M
. R+ [1 L% n/ y: J; j
; P n$ ?7 D- s. s. S/ F
恢复优先:" B6 H9 i& f* x2 F/ ?9 \1 A
4 a. [! u% }) `+ {: K' Y _( H8 M. n7 ^; J0 M7 A
ceph tell osd.* injectargs '--osd-max-backfills 5 --osd-recovery-max-active 5 --osd-recovery-max-single-start 5'ceph tell osd.* injectargs '--osd-recovery-sleep 0'
" `! J1 } X) [- _0 U/ p1 r; N! _$ U
3 f+ G) l9 `4 d' _2 N7 e! k# y! f还原配置:
& d+ l; @4 ]" t, m; @$ Y9 W9 c9 W, A8 Z, G' c4 ~
& Q7 r: M# C4 s2 z3 E8 A3 J& C/ f
ceph tell osd.* injectargs '--osd-max-backfills 1 --osd-recovery-max-active 3 --osd-recovery-max-single-start 1'ceph tell osd.* injectargs '--osd-recovery-sleep 0'
4 l- G7 m% V% X, e/ ?$ q/ P
* T- B8 ~3 H4 ?$ `, ^; V[root@ceph1 ~]# ceph tell 'osd.*' injectargs '--osd-recovery-max-active 4'6 U; c4 E( Z! D( D) s( V0 m
osd.0: osd_recovery_max_active = '4' (not observed, change may require restart)
+ s4 z# v$ p- x5 s1 e) {osd.0: {}
7 z3 ?* {* n" N [" J7 R0 E, ?osd.1: osd_recovery_max_active = '4' (not observed, change may require restart)
2 {5 i% W+ z% [" @' J* _& q' qosd.1: {}
+ R4 w1 n- R" z9 c( h% posd.2: osd_recovery_max_active = '4' (not observed, change may require restart) 2 h' A4 b! |8 H3 i& u
osd.2: {}, ]) P" d: i/ F; q# I1 K
[root@ceph1 ~]# ceph tell 'osd.*' injectargs '--osd-max-backfills 16'
+ K& J; Z" k+ `osd.0: osd_max_backfills = '16' ' h+ K+ a4 P; h- V
osd.0: {}
; G' {' j2 F5 [/ ~2 v% x8 kosd.1: osd_max_backfills = '16'
+ ]0 [8 r. r$ N3 T" cosd.1: {}
1 A+ `3 X2 Z* @1 J$ Z4 n/ posd.2: osd_max_backfills = '16'
5 ` d4 m r9 Rosd.2: {}
# q0 F9 d. w. q/ K8 {* n; _; S/ D2 u7 {( u+ z
8 C6 p x4 L e3 R' K% f+ ~: U
7 x) c$ x! n6 L' n+ K7 U" L上面都是临时方式修改:
, T8 R0 n( m# w3 x' {% A3 \) X8 X! L& T1 b7 [0 }
2 @; g# b' g8 U" \: X Z
( K9 b$ ?4 U; O2 {7 G% C! { |
|