找回密码
 注册
查看: 3807|回复: 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
, q2 J. f  b& j+ u, I# d) i! Tmon_max_pg_per_osd - Max number of PGs per OSD the cluster will allow. i4 Z' t" F, x: |
  (uint, advanced)! q( F; C+ U' u4 a
  Default: 2507 |& o$ e; a6 l, _! f# j
  Minimum: 1
. E( D6 M1 O+ p' i- T& A  Maximum: 6 \, A: A+ k8 Z9 D
  Can update at runtime: true) [% C' E& P5 S" R
  Services: [mgr]
& t# P: o" k$ C* pIf 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.
" L( R, ?# T+ A& V# r7 B$ l2 D) G' z( K, ^4 d& y7 |6 Z* a

& ?/ K& U, H$ I查看ceph的mon_max_pg_per_osd默认值:! f; X$ [2 j2 m0 J1 a2 O( C3 T
ceph daemon mgr.`hostname -s` config get mon_max_pg_per_osd
" R* w  u$ v$ M: R2 i1 `. _- J) {{
: _" O) }  \9 J& A$ Y    "mon_max_pg_per_osd": "1000"
" e+ v. P7 Z" U7 n! S0 W3 N9 N}4 _6 n, p8 V  h7 Y, r9 Y4 U$ O2 N

6 e+ e' p& M- ^. ]/ e1 e& l! Z在线实时调整配置参数(重启后失效)
' o( m) k' x/ q) d; a3 a  o# v! \2 R5 t/ `" s. b7 f
```8 A. c" |  X+ ~' s4 p
[root@ceph ~]# ceph daemon mgr.ceph1 config set mon_max_pg_per_osd 300
0 D3 i. R$ L( @) f( O{
# Y% @# D# R* c" M9 r! I% G/ J- M; O    "success": "mon_max_pg_per_osd = '300' (not observed, change may require restart) "
6 P2 m7 t; `' m% K" Y}
0 H7 o/ F* l/ O& _! I: F* Y```
& k" S4 V" y3 }* f0 |* c
: z4 R7 u  K# f3 @9 K0 Q0 a: R% ^; c
& W7 N# o7 E5 a$ ]* `4 d* f) F4 K6 W2 _9 r& O
启动保存配置; a% }. B8 V0 G/ B$ d0 t$ ?
需要在/etc/ceph/ceph.conf加上以下内容
& I) ~# m5 \: X9 ?9 R, r" D$ G: N9 U5 O7 Q
```
6 F9 s- G- K+ [: ~$ f[mgr.ceph]% c& u# q+ J  b3 h5 x* k: [: ~
mon_max_pg_per_osd = 300# I! n2 G( |3 T$ q( q
```, y+ W, {! Z1 h; U( ~

3 x; G$ X4 Y/ {8 I" h6 u
- u+ `5 d2 s% S1 j* ?! s8 t  X* A) ?' m6 [" X% s

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2021-8-6 16:23:39 | 显示全部楼层
查看ceph mon_max_pg_per_osd  最大连接数
, S* ~. k# H7 o. s* U( ?ceph daemon mgr.`hostname -s` config get mon_max_pg_per_osd# `2 k, E  X' _+ Z4 R3 `
{
- \- y/ _) q3 m% L: e. \    "mon_max_pg_per_osd": "1000"0 V1 h: _0 v! s( l2 U) }4 g5 s7 x
}

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
2 n% o: d5 a% E- E  p. V- L+ L{
* y& t) s" _- E* k) S    "success": "mon_max_pg_per_osd = '1000' (not observed, change may require restart) "& s6 U( z$ e! u- w  l# J
}
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-12 02:18 , Processed in 0.014257 second(s), 22 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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