找回密码
 注册
查看: 3806|回复: 2

ceph config help mon_max_pg_per_osd查看默认值

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2021-6-10 15:01:17 | 显示全部楼层 |阅读模式
[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' @

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2021-8-6 16:23:39 | 显示全部楼层
查看ceph mon_max_pg_per_osd  最大连接数$ k  J: x. k$ z! a
ceph daemon mgr.`hostname -s` config get mon_max_pg_per_osd8 h/ @0 \7 G/ r
{
: P3 \) E7 n) ]$ r* i9 p    "mon_max_pg_per_osd": "1000"
9 b; d! c  r* F" m9 @}

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2021-12-3 19:11:14 | 显示全部楼层
[root@compute01 ~]#  ceph daemon mgr.compute01 config set mon_max_pg_per_osd 10005 r& E) p7 Z* [4 F: d4 t" e
{6 b3 T& J4 f+ C: R; C
    "success": "mon_max_pg_per_osd = '1000' (not observed, change may require restart) "  J' _" g3 {; `, p
}
您需要登录后才可以回帖 登录 | 注册

本版积分规则

返回首页|Archiver|手机版|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )

GMT+8, 2026-6-12 01:04 , Processed in 0.031249 second(s), 23 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表