|
|
停止有问题ceph的mon服务:
" r/ E4 I3 ~1 w) ~ o3 c; e: W, c[root@host11 ~]# systemctl stop ceph-mon@host11) q m$ z5 q2 d/ s; v
! k( J1 V+ Y2 N* S9 I删除有问题的mon数据:* o) y2 H% e3 g! _
[root@host11 ~]# rm -rf /var/lib/ceph/mon/ceph-host11/*8 m9 y* {4 g( j5 o) `: m
1 d/ c, P5 L$ O+ C尝试使用rsync方式同步:; w$ Z! W7 T0 h6 d
[root@host11 ~]# rsync -avz root@host10:/var/lib/ceph/mon/ceph-host10/ /var/lib/ceph/mon/ceph-host11/
: q5 o4 F4 b1 p; C2 g-bash: rsync: command not found
D, s2 h6 u1 W: x[root@host11 ~]# dnf install -y rsync+ a* J3 h; ]' R& s
-bash: dnf: command not found
9 u, e' i/ ?! ]' f* D5 ]2 h+ n# _报错:无法使用rsync方式同步:
2 C9 K" Y& `" C1 H: p
' t( @7 R* g- c# M& R- Y( ~使用scp方式复制:' {" z1 _- x4 f
[root@host11 ~]# scp root@host10:/var/lib/ceph/mon/ceph-host10/ /var/lib/ceph/mon/ceph-host11/
% x( a1 H# x5 f+ E Escp: /var/lib/ceph/mon/ceph-host10: not a regular file6 K0 h! m& [1 @5 |
6 R8 z7 ~- S: ?1 i& q5 P3 N7 [& ?' N6 _8 p: I
& p8 H3 ]% p3 l* Y! d- a; z( K5 C( Y
[root@host11 ~]# scp -r root@host10:/var/lib/ceph/mon/ceph-host10/ /var/lib/ceph/mon/ceph-host11/
, S# J; V3 D3 v8 Y2 ?kv_backend 100% 8 9.3KB/s 00:00
% Y- Y# h. G9 YLOCK 100% 0 0.0KB/s 00:00
3 v/ }$ n/ ~$ `! `) C* }7 J2 WCURRENT 100% 17 24.8KB/s 00:00
3 W) R4 I$ P( @IDENTITY 100% 37 2.7KB/s 00:00 # N* p3 d3 n k$ p" G
OPTIONS-9023316 100% 4943 5.9MB/s 00:00
4 v* B- p5 V5 N+ ]' C: U( ~MANIFEST-9024281 100% 4822KB 49.2MB/s 00:00
3 d. X' h. I' [ N5 `% AOPTIONS-9024284 100% 4943 6.8MB/s 00:00 @# d) k( ~. j4 q
9106767.log 100% 14MB 51.4MB/s 00:00
( ~% i/ X' w6 N5 `' Z* U$ X( ?( D9106769.sst 100% 57MB 55.0MB/s 00:01 / |. n' U& r3 T! @, r+ S' e: ]7 H
keyring 100% 77 43.2KB/s 00:00
, _$ T2 H7 {( ]' r" l }done 100% 0 0.0KB/s 00:00
* N4 ^3 w# H6 K# i8 Zsystemd 100% 0 0.0KB/s 00:00
r4 e' m4 h/ ?* x+ ]% g7 Fmin_mon_release 100% 3 0.2KB/s 00:00
! b% Q( Z; h0 P2 o" j
2 ~$ }# X! c% s[root@host11 ceph-host10]# ls
; J X5 [, X* udone keyring kv_backend min_mon_release store.db systemd3 i0 |/ C6 i- f% n
[root@host11 ceph-host10]# mv * ..% K. O+ a: V( X% L4 \7 t
[root@host11 ceph-host10]# ls; j! }; R! @' `8 q8 C1 f
[root@host11 ceph-host10]# cd ..
$ k+ p& y( |5 {[root@host11 ceph-host11]# ls
+ [" ]9 s* f2 Q+ ^2 mceph-host10 done keyring kv_backend min_mon_release store.db systemd
, c3 I& O, S6 [4 {2 d- l, T- m+ l/ z) w, `. a# f
[root@host11 ceph-host11]# ls
: Q! U7 m# K/ f! Kdone keyring kv_backend min_mon_release store.db systemd: m# l, X2 d9 c' @4 t' C7 f1 f
[root@host11 ceph-host11]# ll
" C, O! s% f4 V# j: @ ~* Ktotal 12
+ l) h6 Z' F, l) b2 | C8 z-rw-r--r-- 1 root root 0 Mar 28 07:20 done/ A+ I: C$ f9 L9 Q$ B* P
-rw------- 1 root root 77 Mar 28 07:20 keyring
( a; Y: {7 B% c& V) G+ \$ O m-rw------- 1 root root 8 Mar 28 07:20 kv_backend" H7 g" A4 r) _
-rw------- 1 root root 3 Mar 28 07:20 min_mon_release2 ^( K4 l- V: B0 E8 @5 {$ t3 T
drwxr-xr-x 2 root root 157 Mar 28 07:20 store.db
! [) Y" R3 o4 T+ {0 b: z-rw-r--r-- 1 root root 0 Mar 28 07:20 systemd
) i' P# E& A6 I# R/ g1 I[root@host11 ceph-host11]# cd ..# T( v* v F. ]- D" U) M$ v
[root@host11 mon]# ls7 \( N% G" I: f9 w# b6 p
ceph-host11
, t0 v3 T V, t6 X' |$ N% A$ L5 p[root@host11 mon]# ll8 X! \" o9 D- G
total 0
5 b9 n: U/ r/ S5 ]5 _+ L0 {drwxr-xr-x 3 ceph ceph 105 Mar 28 07:20 ceph-host11, v! u9 c' r& S. ?
[root@host11 mon]# chown -R ceph:ceph ceph-host11/
7 r# _7 [1 a) u" \[root@host11 mon]# cd ceph-host11/
A6 m! K: Y$ t( X5 r6 }+ h[root@host11 ceph-host11]# ls3 e3 J* }9 f9 m2 E; C
done keyring kv_backend min_mon_release store.db systemd
8 [% l2 Y3 u" ]! Y8 J) V[root@host11 ceph-host11]# ll
0 `* y( |6 e7 _! Q' Ltotal 12* _% l1 d( n; g& e# | p9 w$ {, e
-rw-r--r-- 1 ceph ceph 0 Mar 28 07:20 done$ d# \! }3 V! |. {
-rw------- 1 ceph ceph 77 Mar 28 07:20 keyring
# c( ~" P" K) C w3 K @4 L/ S-rw------- 1 ceph ceph 8 Mar 28 07:20 kv_backend* w0 A" Y1 ?. v
-rw------- 1 ceph ceph 3 Mar 28 07:20 min_mon_release
; k- F* r( f7 H% |! S5 rdrwxr-xr-x 2 ceph ceph 157 Mar 28 07:20 store.db+ k! j: X: Q f/ ]! ^, Y
-rw-r--r-- 1 ceph ceph 0 Mar 28 07:20 systemd: l3 B& |3 }4 k7 i, V, ^' C9 z
4 P t* Y) C) ]) @: v1 J3 X* U; |
启动mon服务:
2 U7 C) c! Z- M. z8 @0 C[root@host11 ceph-host11]# systemctl start ceph-mon@host11.service
3 v4 G/ ^# I% m8 i- P0 H0 |) sJob for ceph-mon@host11.service failed because start of the service was attempted too often. See "systemctl status ceph-mon@host11.service" and "journalctl -xe" for details.
# I. U% _& n9 U+ i5 Y' u0 g( z& H, ATo force a start use "systemctl reset-failed ceph-mon@host11.service" followed by "systemctl start ceph-mon@host11.service" again.
- V9 g5 K" S1 Z- d; U& ]
9 o6 W6 E, a6 R" M+ B根据提示修改:
% h& T' q Z. Z ?0 b* i N[root@host11 ceph-host11]# systemctl reset-failed ceph-mon@host11.service
! R4 p9 p; G- e- B8 h+ d# D
6 P& L$ v; P$ s& K6 y: s$ L再次启动:# V; `7 h4 j/ Y+ S2 g9 s2 ~7 S
[root@host11 ceph-host11]# systemctl start ceph-mon@host11.service
; ?. h, V- E+ y7 m检查状态:6 y7 p% N# h( b+ {/ z( x
[root@host11 ceph-host11]# systemctl status ceph-mon@host11.service
% N( T& f }& j1 m● ceph-mon@host11.service - Ceph cluster monitor daemon6 I- G4 I9 N4 x
Loaded: loaded (/usr/lib/systemd/system/ceph-mon@.service; enabled; vendor preset: disabled)
/ s9 V8 c* `; u* m; L9 U Active: active (running) since Sat 2026-03-28 07:22:00 CST; 11s ago# `& N# @1 z/ H
Main PID: 68995 (ceph-mon)
2 A/ }3 w7 R$ ~6 w, o CGroup: /system.slice/system-ceph\x2dmon.slice/ceph-mon@host11.service! X" o* n- s" h* Q& r
└─68995 /usr/bin/ceph-mon -f --cluster ceph --id host11 --setuser ceph --setgroup ceph9 L7 }- C# I7 e8 I' Y6 j1 \
7 h/ g! e. j) j5 W' ~0 b# G# ]
Mar 28 07:22:00 host11 systemd[1]: Started Ceph cluster monitor daemon.
3 R, @/ Z$ Y& {Mar 28 07:22:06 host11 ceph-mon[68995]: 2026-03-28 07:22:06.757 7fc8eef35700 -1 mon.host11@2(electing) e3 failed to get devid for : udev_device_new_from_sub...iled on ''
$ m0 U& T9 B4 q9 _, MMar 28 07:22:06 host11 ceph-mon[68995]: 2026-03-28 07:22:06.793 7fc8eef35700 -1 mon.host11@2(electing) e3 failed to get devid for : udev_device_new_from_sub...iled on ''. N+ p5 N) v0 c" V
Hint: Some lines were ellipsized, use -l to show in full.8 K; w- d; E G. }. x1 c
[root@host11 ceph-host11]#
8 l3 j k- U, y3 J- s[root@host11 ceph-host11]# & U6 m' E: {3 W L
[root@host11 ceph-host11]# ceph -s- j" H. X; ~3 F; X! R8 t0 _
cluster:
# p& E0 u; E8 z$ u- Z- | id: 9d22e36a-2bdd-4d2d-8394-ead777
/ w# U. k m3 t- V- m; T5 O health: HEALTH_WARN8 D' q( ~2 z( q( X
3 nearfull osd(s), O1 r+ g$ f3 @& E4 D3 t
5 pool(s) nearfull7 Z3 h% g% s$ X- N' Z, C2 l O
5 daemons have recently crashed( t' G$ Z/ X0 |: }6 A7 B+ I
- X1 u+ Q) V+ g services:. f8 b' d! _/ f8 A: o
mon: 3 daemons, quorum host09,host10,host11 (age 22s); h0 d9 H" F, k8 S% {8 C5 Y
mgr: host09(active, since 6w), standbys: host11, host10
( L* p: M( }; ~, ] osd: 40 osds: 40 up (since 6w), 40 in (since 6w); }3 E# c, J2 E+ g0 P
! c1 S1 e7 u0 ^# N/ Z( W/ V; z data:
/ l3 v0 ~2 ^( r8 o, a pools: 16 pools, 3072 pgs- i3 E& _) I7 A5 u3 l
objects: 7.15M objects, 27 TiB
1 j0 D c) |2 n" _7 @: K6 F usage: 65 TiB used, 83 TiB / 147 TiB avail" M+ G6 k9 `4 N, e; c$ D5 z9 o. }% F
pgs: 3069 active+clean
4 Q( |0 }5 k: L 3 active+clean+scrubbing+deep
: x p8 k/ E0 r& U
! H1 W6 M {- ^9 [ io:7 `9 U% w, h1 h' K
client: 16 MiB/s rd, 27 MiB/s wr, 339 op/s rd, 380 op/s wr
# X; l! M1 N- ]' v2 y. {% a6 y& W$ y6 t$ x& u, p; L
mon问题解决。7 y1 u3 [6 j9 x: \; H& X0 P
E: \. K3 q; N- `) ~1 O
, {( L) z- ~- O' a
|
|