找回密码
 注册
查看: 3809|回复: 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# q8 |: U& \/ c4 ]7 E: l
mon_max_pg_per_osd - Max number of PGs per OSD the cluster will allow
' Q* ^' c# s+ M; `7 x1 L; `  (uint, advanced)+ |0 R. A; b8 \+ ?9 a# U  o
  Default: 250
' G3 }2 V* [' r$ h$ G7 K' Z7 d  Minimum: 1
5 a# s% H  L# E$ ^- d9 ?  Maximum:
9 Z9 o3 E9 N3 C! r2 t, m  Can update at runtime: true
* ]/ F3 b* N/ D6 f# U4 W  Services: [mgr]% F0 x+ s' z' J
If 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# N& P0 i+ c8 A

4 s+ @7 z- s) ^( p) T" M! ?( V. |( [0 S2 \: w
查看ceph的mon_max_pg_per_osd默认值:
! M: ?. c4 ?# n/ ^* hceph daemon mgr.`hostname -s` config get mon_max_pg_per_osd& `& J* I% j  e: d/ y+ g
{! B( y) h7 l1 t5 i4 W* ?
    "mon_max_pg_per_osd": "1000"
7 J5 K8 _+ n( l9 D}. s( p( t8 g: H2 N

( M+ u; i0 h1 [在线实时调整配置参数(重启后失效)
+ m+ E2 r" T) }8 x1 A+ v! w1 a1 q! J& m4 g$ Z: A0 H7 M
```
7 q- i" C2 J8 l6 z[root@ceph ~]# ceph daemon mgr.ceph1 config set mon_max_pg_per_osd 300
: y! ^1 s. L& [0 [6 ?! H{3 |! F+ ^: O  g! X6 t% d
    "success": "mon_max_pg_per_osd = '300' (not observed, change may require restart) "
$ g: ^# V& L2 N# j  R5 w1 s}
3 W/ }  Z0 c6 M- V8 n```
7 ~. m, y( X6 Y- v2 t5 I5 X2 M
3 A! O3 m) A3 @* I5 k- c* j
  V7 w+ N9 ?6 M7 O& i- h- a$ v* [& ?$ ^, W: N0 r% i: i
启动保存配置: }2 ?: n' Q+ |7 m* U+ g, ^2 N6 c  m
需要在/etc/ceph/ceph.conf加上以下内容
) v3 N  U+ i1 c1 x0 f; y' Q! g! g; A! `  V- M9 H
```
% ]/ C) _9 ~0 {8 O& {7 a6 l0 h[mgr.ceph]
- V% W2 T8 ?- L7 W$ W1 ^. Ymon_max_pg_per_osd = 300
& R  B: O2 p+ ?) ^+ S0 \7 U7 H```
% w8 \# z; V8 R% ?
! |: p7 B# h& L( e# k9 r6 J0 p% T8 m9 _7 x; c4 g

. V" f, s6 K' J; r6 c. y2 w

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2021-8-6 16:23:39 | 显示全部楼层
查看ceph mon_max_pg_per_osd  最大连接数
- F( k# e/ g0 t! Eceph daemon mgr.`hostname -s` config get mon_max_pg_per_osd
# H  ]/ ^2 \6 i) g0 O2 u: Y& h{
& e+ u9 u% O! R( \' B' X8 E    "mon_max_pg_per_osd": "1000"
8 i  Q8 C& ?. U3 E  T3 o8 `}

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2021-12-3 19:11:14 | 显示全部楼层
[root@compute01 ~]#  ceph daemon mgr.compute01 config set mon_max_pg_per_osd 1000# Y8 Y: d: S( K
{
: X+ J. Z: Q7 M# Q2 _    "success": "mon_max_pg_per_osd = '1000' (not observed, change may require restart) "% J$ S- W8 o0 E, W# l- G6 Z
}
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

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

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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