|
|
[root@compute01 ~]# ceph config help mon_max_pg_per_osd' C3 s4 @! E! M" K/ K8 D; B
mon_max_pg_per_osd - Max number of PGs per OSD the cluster will allow+ g3 p* S$ s" [- g7 ?5 K* R
(uint, advanced)/ X4 \; {' y* H, _8 C3 u
Default: 250) x* \) I/ i1 r- s7 c; Z! |0 \
Minimum: 1( K8 ~( s" X( w! k$ O# J) Z
Maximum: 9 C o5 v( Y/ p: J) k7 b5 t- T
Can update at runtime: true
9 H& X" ]$ u" y9 {' x; ]6 |; F. p0 T: ] Services: [mgr]
3 V+ `( I# ?- p8 d4 H* xIf the number of PGs per OSD exceeds this, a health warning will be visible in `ceph status`. This is also used in automated PG management, as the threshold at which some pools' pg_num may be shrunk in order to enable increasing the pg_num of others.
( O! ]/ T) a- S
, _4 [6 ~; n/ L/ o0 J) M& _4 P8 a
! N' E& X8 ?6 E) r+ N查看ceph的mon_max_pg_per_osd默认值:
6 R1 @* b) @" K* l ]" iceph daemon mgr.`hostname -s` config get mon_max_pg_per_osd b8 D }- S- f" x H* @8 g
{. D/ D: {9 d4 r7 o' W7 E+ K3 Q: y
"mon_max_pg_per_osd": "1000"
# z8 ]8 e- ^% c- A2 B}' z+ s: q+ q' l8 ^( b4 e1 h
! |* ~- Q" w* W' C \$ {3 |! }在线实时调整配置参数(重启后失效)( e$ ^/ N: i2 J# ?/ i( v4 U* o6 o
8 c M! ?/ t4 \' i& b P
```
% P4 H d' F& k, G" C2 L6 Z[root@ceph ~]# ceph daemon mgr.ceph1 config set mon_max_pg_per_osd 300( {+ j& b* B" a+ N# J& z! b1 s
{
8 C. R& Y7 n% g4 [ "success": "mon_max_pg_per_osd = '300' (not observed, change may require restart) "9 Q" y- e$ ] R$ f$ X: h
}6 e& ]$ B" w# F3 E" I% d8 c0 ]
```
6 H4 h6 J) P% o2 l5 a- `* h) V! X) K1 _" k7 |
+ w* S1 S4 E+ P' F6 C5 h
9 C2 I& z3 K( j1 M, I# ~" P
启动保存配置
9 f) s8 f7 C! u需要在/etc/ceph/ceph.conf加上以下内容
" M$ A& |; r2 W1 G0 j6 i" D1 X. V
```
. b$ p; n Q9 r, I& T! }[mgr.ceph]' q k2 @ [& ^1 R8 x. w8 g7 V8 Y
mon_max_pg_per_osd = 300
) }! @4 t5 [6 T7 |7 x! r, k7 O```
4 G" H) Z- L: ]' l" x& F1 m- }1 A: V
$ C2 a2 T* K! @$ y. l
9 r. M- [' p- G4 a' @ |
|