|
|
[root@compute01 ~]# ceph config help mon_max_pg_per_osd
( i8 x |+ F) }mon_max_pg_per_osd - Max number of PGs per OSD the cluster will allow# x! G; O' y* f3 E7 ]( z" b/ W* c O
(uint, advanced)
* H9 d. J. C! n Default: 250
/ p& H5 T$ K8 k Minimum: 1
/ I5 X2 O r0 E! ^! \ Maximum:
H, i; g! s5 N- L/ D5 e Can update at runtime: true1 ?) U0 s. i4 K" ]: v
Services: [mgr]
) a6 k7 E7 u& y7 Z! i& V- U1 lIf 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.# Y, _" O( F e* B4 T8 z7 w a2 S
c" c/ j! v8 A
. b" {3 Q0 e# _4 W
查看ceph的mon_max_pg_per_osd默认值:* v4 Z( n J& P+ D( H
ceph daemon mgr.`hostname -s` config get mon_max_pg_per_osd) s6 L9 c; U( |' X' e" _. H4 R
{9 B' @2 O9 f( n& T a. N& y
"mon_max_pg_per_osd": "1000"% G! M8 y& S& O, o3 p' H D
}
& h6 x0 J' n4 A( k/ L7 ~- U
; o$ B. W8 ]7 N. T' z: K2 V7 d. F在线实时调整配置参数(重启后失效)# p5 Q; m; ^; p" f
9 Q1 E4 f! q J. H0 g; I6 X, g! m```
( ?7 s; x* d) C7 z. j. S[root@ceph ~]# ceph daemon mgr.ceph1 config set mon_max_pg_per_osd 3001 A& \: G' h7 ?4 V; h
{
1 k$ K/ W, G) B V! s1 ? "success": "mon_max_pg_per_osd = '300' (not observed, change may require restart) "
3 i0 E, d( z4 C7 o& d+ u}4 N* E5 Q3 w% A5 A- a7 Z4 V( \
```% _; H* U, x- k- F
w. Q3 p7 n8 f6 a3 @) N# r
. M6 G) h2 e" z" v; W: A" X( C, F) M0 _. V* j3 f( F
启动保存配置
: V, l; D; X- Y2 o需要在/etc/ceph/ceph.conf加上以下内容4 C' I0 x2 u5 y( ]
" [0 A5 Y/ D" J i
```
: j4 s; n' f4 [" _6 ^[mgr.ceph]& D7 u. N: K/ X: p' |+ j
mon_max_pg_per_osd = 300
( `7 g; w6 D) j7 y: z```
% L: H7 N# c; M% X
5 t, b. _$ B1 Z2 B
6 T6 `1 `# `5 ?8 G( X- _; S$ v! }- `6 Y4 i
|
|