- 积分
- 11013
在线时间 小时
最后登录1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?开始注册
x
"osd_max_backfills": "1",0 \: k& \' i8 W* k" m: o
"osd_recovery_sleep": "0",5 j2 H1 m. E7 l, i- A
$ m; [. A; f7 n1 }"osd_recovery_max_active": "3",1 |7 h2 q: U9 H" m$ n) K, D
4 K- f7 u7 f7 `6 m6 M( }( q
"osd_recovery_max_single_start": "1",% y4 t4 u% X/ L- h8 |! l: J- ]
" Y! W' @2 g; l* }: B* S, g无论哪种情况,osd上线后通常会发现,自己承载的pg有数据落后了,需要进入恢复模式,从其它osd上获取新的数据达到同步。3 G) F% z$ m2 z) z, i Y/ Y& n2 @/ F) w" t
' z x- P7 w& U2 }9 L
& P5 F' U$ h- G/ U* G2 _) c
这个过程就是recovery。recovery分为两种:log-based recovery: 是说osd故障时间不长,需要恢复的数据可以通过pg log回放找回来。" J2 P6 a" e0 z- X- q% d S
* ^) J* |" u! C7 ?( ^$ g
: b9 n$ e3 A' B a# O3 y
backfill recovery: 是说无法通过pg log回放找全数据,只能通过全量回填(backfill)拷贝。 % {8 T6 }- l5 h" [, C( i/ C& i
* U; L8 E4 T5 T8 e
1 n& @ G% I: f* d4 h3 i: n4 v
操作前记得查看下默认参数值,操作完后记得恢复到原先参数 $ m* L: `' u. M* _7 _- m. ~
/ }1 d: t* c( |; g8 w3 v9 P% Z1 a' f5 T3 g
业务优先:8 Y* ?6 _# p) x9 v3 ~& ~6 j" j
# r9 j, N2 n: A& o# i7 l9 Y7 t S2 m' ]/ o$ m" ^8 M
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' ) t6 L! G. g" l* ~. u6 g: `
. j- I" Z* L) K* V8 ?
/ e, L) s, \$ W! \* N9 m
恢复优先:) N/ j# V" l1 B7 y6 v" p
% N" ^+ o, Z' m: C/ W' G& h3 j% }) l; u2 x3 \7 x+ d
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'
- t. c7 @3 A* \2 |. S9 R- l* b3 U, D( R3 K
: k! K3 H# r% Q, J" ~" M% e还原配置:
" V$ K+ s7 u/ W) w2 ]* a5 q/ O0 w @3 H) X( i
0 X: u3 b: @2 r9 R7 F6 O
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 J7 D7 \3 V% x% p2 R1 m6 q: c- B
+ {: t5 [+ H; [& w3 v4 `[root@ceph1 ~]# ceph tell 'osd.*' injectargs '--osd-recovery-max-active 4'
7 s+ D! y4 q9 q Fosd.0: osd_recovery_max_active = '4' (not observed, change may require restart)
" f- ?* s$ I' l) W! Uosd.0: {}/ n' K9 ]! q9 @6 E/ w
osd.1: osd_recovery_max_active = '4' (not observed, change may require restart) 4 @5 m' S& t$ l! ~
osd.1: {}
7 ?. } D$ {2 _. r7 O" @& rosd.2: osd_recovery_max_active = '4' (not observed, change may require restart) , g' @6 }' k( M) }5 ^
osd.2: {}
( S8 \) e( [5 C+ B* c) U' X0 D[root@ceph1 ~]# ceph tell 'osd.*' injectargs '--osd-max-backfills 16'
( A8 d9 ~+ f( V; |osd.0: osd_max_backfills = '16' ! z5 i2 X" M; F6 C- t e1 o
osd.0: {}1 m" s4 m2 s5 g: d* V6 M' A
osd.1: osd_max_backfills = '16' 9 p$ C$ y% V) Z; Y: r
osd.1: {}) k9 j9 z- Z, K( P
osd.2: osd_max_backfills = '16'
! D: T7 C1 {( l9 w' y) A2 oosd.2: {}
J( |" N) j+ V2 F" b2 w( w S
+ U# l* I& Z4 T' |; ^6 R+ G1 ~% y; P0 v9 a
- G# O2 Y+ r7 j/ {2 Y& K
上面都是临时方式修改:5 T, _9 C3 d, H3 y$ y$ c+ ?. x7 C5 E
$ Z9 u; k& ~. @
. K8 ~" s: v! L# \- b; t# J
, W: r, j- h2 U( G) v |
|