- 积分
- 11080
在线时间 小时
最后登录1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?开始注册
x
"osd_max_backfills": "1",: `/ C1 I% m3 w% {2 P9 W
"osd_recovery_sleep": "0",
: \/ [: T7 ~' j" `# L- |, ~ M4 z
"osd_recovery_max_active": "3",
* J, R. d) Q6 y7 l: j5 V1 r
& W+ \- |# S% B# J- d"osd_recovery_max_single_start": "1",& U! ^# F! K+ r) _
: A3 R J- ]2 I$ ?% Q无论哪种情况,osd上线后通常会发现,自己承载的pg有数据落后了,需要进入恢复模式,从其它osd上获取新的数据达到同步。0 i+ ]6 b! S0 t+ S/ H& O5 f% J# ~
0 r T" {/ X5 F9 f: I
7 X2 |0 B; f c4 Z7 I4 c/ ^ `. _+ y
这个过程就是recovery。recovery分为两种:log-based recovery: 是说osd故障时间不长,需要恢复的数据可以通过pg log回放找回来。& n8 h+ a t, C% [0 k: ~
# Q3 {7 n. K* M0 @& ^
- D! s3 I" q$ H0 g/ M' ibackfill recovery: 是说无法通过pg log回放找全数据,只能通过全量回填(backfill)拷贝。 6 b1 T$ `& t( m& E% s
0 k0 s3 A9 U7 }% n3 O$ `* \3 B
) h) R; l9 h8 D! R" t操作前记得查看下默认参数值,操作完后记得恢复到原先参数
0 z. w7 l" q% S' p( D; i( M5 _$ v' J: Y' n
/ n+ m4 e; x& Z% s* T9 n; m3 @
业务优先:
# x( z3 Q+ W% O! l% N9 F. p
# n! M/ {! A( w0 j+ G4 m M7 x& c+ p' X( z. M+ g$ ^6 W
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' - i" R2 R% N# n( K( f8 P
* w/ |- u7 D" [7 G9 h7 q4 o
+ s* b5 x! }: r3 `# F
恢复优先:' R( b8 }+ m. R1 L7 Z
9 `8 [! D- K# H/ K- |! l) v7 X
6 E2 A# F a0 I' T: ]+ @5 z$ Xceph 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'
4 e. z. x8 E0 R5 }9 h6 N7 Z2 A a' |1 N1 _9 s/ l
$ C8 F3 p& Y; U7 n4 y: X: @/ S8 A
还原配置:% U4 d% F/ {! [2 J
; A" q1 o$ J: Q& I) ^ P7 R
h4 i5 G/ Y. o& S. S x
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 F3 X1 X# J* N7 R8 ]2 E* c o
[root@ceph1 ~]# ceph tell 'osd.*' injectargs '--osd-recovery-max-active 4'
/ l4 }) v. e/ I3 E) Xosd.0: osd_recovery_max_active = '4' (not observed, change may require restart)
- D# j) I) K- Uosd.0: {}# v, @4 Y8 y, p" u2 @
osd.1: osd_recovery_max_active = '4' (not observed, change may require restart) # C, C g X6 H7 n& Z3 F& E
osd.1: {}6 E0 I/ g; c+ T1 E' w# Q
osd.2: osd_recovery_max_active = '4' (not observed, change may require restart) 1 t- [: J& \1 L) [
osd.2: {}' S* H+ r6 O" p, M! A5 A v
[root@ceph1 ~]# ceph tell 'osd.*' injectargs '--osd-max-backfills 16'
9 ~6 A) |' _9 X$ A. ~2 K1 d- mosd.0: osd_max_backfills = '16'
/ j6 P4 i& {# ]( {$ oosd.0: {}
' l" B% S5 R- J9 j; S3 Q# wosd.1: osd_max_backfills = '16'
0 M- k1 v4 K3 n. J/ Nosd.1: {}
' D1 M! |2 w& P9 \- M: x/ T5 H% nosd.2: osd_max_backfills = '16' , H R6 g/ z& y: n, i' V
osd.2: {}5 ^3 j! O4 p2 \$ a% r
4 E* Q. {; [( Y6 }, k3 Z; D
2 q/ I0 e& {" I) a+ _3 `7 p2 ?
) p# V) ~8 V. o X! @* o上面都是临时方式修改:1 T- Y: b% w8 l% v- W
/ U/ p% S; O; {) P6 p, z& W/ d/ V
3 i8 H9 w& i8 }, e& C9 h
% K% D. r. t/ w. n7 V9 y |
|