|
检查结果: ceph health detail
4 l" [" g. y$ D" e) F7 i& F/ \ceph df
7 H; a* J$ t! B. L7 gceph osd df # m. I( B/ L0 y9 i0 X) w) k
ceph osd dump | grep full_ratio
5 I, `3 ^. ^' s) h V) x
0 a: s: K9 t9 h5 R8 Q# t0 ~; A1 m网络的解决方法: 1. 设置 osd 禁止读写 ceph osd pause
2 ?8 N- [) c1 N2. 通知 mon 和 osd 修改 full 阈值 ceph tell mon.* injectargs "--mon-osd-full-ratio 0.96" ceph tell osd.* injectargs "--mon-osd-full-ratio 0.96"
J4 `' c$ T; Z' F3. 通知 pg 修改 full 阈值 ceph pg set_full_ratio 0.96 (Luminous版本之前) ceph osd set-full-ratio 0.96 (Luminous版本)
% z" @9 x! T O8 U8 W ]0 @4. 解除 osd 禁止读写 ceph osd unpause
& {- y) F7 U' W& l5. 删除相关数据 最好是 nova 或者 glance 删除 也可以在 ceph 层面删除 " g3 ~0 `& E: S, ?0 g
6. 配置还原 ceph tell mon.* injectargs "--mon-osd-full-ratio 0.95" ceph tell osd.* injectargs "--mon-osd-full-ratio 0.95" ceph pg set_full_ratio 0.95 (Luminous版本之前) ceph osd set-full-ratio 0.95 (Luminous版本) + Y$ j" |- a2 O) x( T; p! K& x- U- }( o
按以上方法,在ceph version 15.2.13 octopus 环境下测试报错
: }; J2 {1 S) c* f. p3 v; q8 H5 I% S4 i9 J" J0 e
) ~% F$ E7 G/ N最终在官网找到了解决方法: ' O \" P1 D( |, i8 J) f
OSD_FULL One or more OSDs has exceeded the full threshold and is preventing the cluster from servicing writes. Utilization by pool can be checked with: ceph df The currently defined full ratio can be seen with: ceph osd dump | grep full_ratio A short-term workaround to restore write availability is to raise the full threshold by a small amount: ceph osd set-full-ratio <ratio> New storage should be added to the cluster by deploying more OSDs or existing data should be deleted in order to free up space. OSD_BACKFILLFULL One or more OSDs has exceeded the backfillfull threshold, which will prevent data from being allowed to rebalance to this device. This is an early warning that rebalancing may not be able to complete and that the cluster is approaching full. OSD_NEARFULL One or more OSDs has exceeded the nearfull threshold. This is an early warning that the cluster is approaching full. OSDMAP_FLAGS One or more cluster flags of interest has been set. These flags include: - full - the cluster is flagged as full and cannot serve writes
- pauserd, pausewr - paused reads or writes
- noup - OSDs are not allowed to start
- nodown - OSD failure reports are being ignored, such that the monitors will not mark OSDs down
- noin - OSDs that were previously marked out will not be marked back in when they start
- noout - down OSDs will not automatically be marked out after the configured interval
- nobackfill, norecover, norebalance - recovery or data rebalancing is suspended
- noscrub, nodeep_scrub - scrubbing is disabled
- notieragent - cache tiering activity is suspended
+ N* Y. F) o, B7 }( nWith the exception of full, these flags can be set or cleared with: ceph osd set <flag>3 m1 [% A: C9 E# V
ceph osd unset <flag>
$ t3 U" ?: x$ d6 t4 [POOL_FULL One or more pools has reached its quota and is no longer allowing writes. Pool quotas and utilization can be seen with: ceph df detail You can either raise the pool quota with: ceph osd pool set-quota <poolname> max_objects <num-objects>, ^0 t! ^' V) u+ C& r
ceph osd pool set-quota <poolname> max_bytes <num-bytes> or delete some existing data to reduce utilization. 9 S4 Q1 F8 B) ~2 ^
设置 osd 禁止读写 ceph osd pause 5 @) m8 E0 q9 T4 a- r% ~
设置集群标记,避免恢复过程中其他任务引发其他问题 ceph osd set noout ceph osd set noscrub ceph osd set nodeep-scrub
/ I/ ~% W6 w( u) G2 i& L% ?: A. t( S. r
# a' k" ] N- f' w, |3 |
ceph osd set-full-ratio 0.96 (不能调太高,要不再次到阈值了就没得再调整了) ceph osd set-backfillfull-ratio 0.92 ceph osd set-nearfull-ratio 0.9
5 Z' o( @/ [1 F" e) a) s
5 Q0 o! K, O! z( Nceph osd dump | grep full_ratio 3 K" h$ o6 n. C6 c% V7 A9 B N
0 j: L. g, ~$ _% H0 u
调整后,ceph显示Health OK 趁ceph临时可操作osd,赶紧整理删除没用的image数据或增加新的磁盘同步降低平均值。 cephadm shell -- ceph orch daemon add osd ceph-mon1:/dev/sdd cephadm shell -- ceph orch daemon add osd ceph-mon2:/dev/sdd
" x; c7 T% b. O4 D7 S) B, _添加两磁盘后,使用率自动均衡降低了。
3 O- m4 O* Z. Z2 A正常后恢复为初始值 ceph osd set-full-ratio 0.95 ceph osd set-backfillfull-ratio 0.90 ceph osd set-nearfull-ratio 0.85 7 e% ]7 S/ P# F& Y2 h/ ^- E$ z; X
最后解除OSD的禁止读写和群集标记 ceph osd unpause ceph osd unset noout ceph osd unset noscrub ceph osd unset nodeep-scrub
$ {: p9 \( g; R8 A: z* e5 d0 |/ P8 h6 C2 N, o
如果要删除OSD,需确保ceph是健康状态才操作。
9 @' O1 y- O! Y4 a, aHealth状态下无警告。 / f! S& h# ^! [$ L
. s( `$ N5 d3 o" F6 _; U! D# H
|