|
|
"osd_max_backfills": "1",
: b4 G& p# Q% U! ~5 ]"osd_recovery_sleep": "0",
! y3 @. D( ^6 V( p3 I: P0 B9 g% c# b9 w A% ^0 S/ {3 _
"osd_recovery_max_active": "3",
, x/ a B$ q& t) p& C( a3 l7 A3 t4 t
"osd_recovery_max_single_start": "1",; j* H( \ B! X; y6 i/ S
* V# ], L0 l8 I, E7 a7 J无论哪种情况,osd上线后通常会发现,自己承载的pg有数据落后了,需要进入恢复模式,从其它osd上获取新的数据达到同步。
$ Y* A, S$ Z+ k& C/ G! p/ c f/ r6 l! Z8 l
2 |, B1 v2 y+ p7 e+ P
这个过程就是recovery。recovery分为两种:log-based recovery: 是说osd故障时间不长,需要恢复的数据可以通过pg log回放找回来。
4 ?: P( x( A6 k; E: d
( ?1 U$ k! ]' z2 \1 P8 ~; k
& q* o/ s& F: K D' b i gbackfill recovery: 是说无法通过pg log回放找全数据,只能通过全量回填(backfill)拷贝。 6 A2 T8 `1 D- b6 C1 g
0 l8 G, H$ |# v/ F9 @$ U) _. I, s4 |! A
操作前记得查看下默认参数值,操作完后记得恢复到原先参数
1 l/ d( k3 f' r7 l" T
# T% L% ?3 s9 U9 M& `8 x: S" q# h4 n" b" p1 z" Q
业务优先:2 ]/ C5 \2 l- H# O' v' M8 X8 O
" {9 g) x7 b; |, Z) J6 I6 R9 I% L( L& A4 X3 `0 _% z% p8 b) U
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'
: o# S2 O3 j5 ~% H3 I, H9 ?! t+ g; C6 e* M& A) A
$ k! l: n/ {( ~# s U恢复优先:" B2 p) W0 o) F: Z$ N
8 j3 U# r$ j! j8 x
1 w- C! d* j8 q# k. b& v6 mceph 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' + b# Y2 ]) N9 G7 v" `5 b/ N
4 D9 J ~: |9 f( o
* N% g h# x: `" H/ |还原配置:7 A6 u8 C2 p2 J# J
. W6 f% m$ X1 k o+ P
& g! z- e, o/ |$ \" W& _7 z& G4 |
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'. `# P3 ]2 j, N( e* S9 P# r1 J
/ h# o( B& H+ u" n1 E[root@ceph1 ~]# ceph tell 'osd.*' injectargs '--osd-recovery-max-active 4'
5 A. @$ M1 f1 ^! qosd.0: osd_recovery_max_active = '4' (not observed, change may require restart)
- F' |* d" z9 O0 B9 {+ ?0 X, Eosd.0: {}8 O2 R1 ^; Z) M9 {: r# |
osd.1: osd_recovery_max_active = '4' (not observed, change may require restart) : }/ N9 V9 X- u
osd.1: {}0 n ^2 [) z7 h
osd.2: osd_recovery_max_active = '4' (not observed, change may require restart)
4 q3 U6 G# L5 ~% C5 W& V' D2 Rosd.2: {}9 P6 B3 O: C( ? H( k; u1 E
[root@ceph1 ~]# ceph tell 'osd.*' injectargs '--osd-max-backfills 16' g- R0 F3 {( ]. y. z" v9 x6 Q& l& ?
osd.0: osd_max_backfills = '16' ; x# X/ V% `2 N
osd.0: {}9 h! D: h( F. [% N4 O& V8 ~" q
osd.1: osd_max_backfills = '16'
: L* I$ o# P) `% [/ posd.1: {}# @1 }0 T6 Q; f
osd.2: osd_max_backfills = '16' . G4 z( b$ D; Z7 V6 j
osd.2: {}# p0 R5 I M/ q% I
* E9 g, w. d4 I M+ k5 o; e* K: S1 U; d/ [
& A' J4 n) T% c上面都是临时方式修改:4 N. b9 N# ?' r* V, |* l d( B/ A
: x0 W# r3 N0 ~
, i! c5 p! M5 |* z) R1 \( }. [/ d
2 B! m; C/ \4 g) f3 q |
|