|
|
楼主 |
发表于 2022-7-25 08:00:04
|
显示全部楼层
1、没有创建pool之前; k6 E' ? ~4 o' q& r
/ H- l, I3 o1 s. p/ T
复制代码 q& n4 M6 j5 v8 u" M V) r: v
[root@cluster9 ceph-cluster]# ceph -s
. _. l# c8 b+ s! D- f cluster:+ V7 o" w6 }" p$ A4 m0 K& w
id: d81b3ce4-bcbc-4b43-870e-430950652315
8 F. w" _: B9 `! m+ b5 z# o health: HEALTH_OK% B5 Q3 J" k1 t+ |9 A( L! T
5 a6 Y9 h6 W! h% Q services:
8 ~( n! r' C3 j( e mon: 1 daemons, quorum cluster9( {% s7 A8 D( W0 D
mgr: cluster9(active)6 i8 p3 ~" d' d/ M& s j/ l: v
osd: 3 osds: 3 up, 3 in* W6 Q+ p) K' T" }; T: u
w6 x P3 O+ G5 V data:
$ Z4 X0 {! z3 G7 a pools: 0 pools, 0 pgs
: B$ A( x3 v+ l. w L. r6 \% ? objects: 0 objects, 0B6 ^$ X' c9 B1 r( J" C7 r- t
usage: 3.06GiB used, 10.9TiB / 10.9TiB avail. _. B: v) A* |& Y) e7 k: u6 J
pgs: # r& H e8 y/ m8 w
复制代码
0 E% h6 B% j9 c6 v7 u3 L2、创建pool后" \# {' L7 K, d1 l8 [
2 X7 ?1 r7 d- \ u/ P5 p2 o' K复制代码9 x$ {! q2 _7 o7 Z6 A ^: U
[root@cluster9 ceph-cluster]# ceph -s
. S. [8 V# }0 t& h; z; { cluster:6 g5 k2 s# p9 @; _
id: d81b3ce4-bcbc-4b43-870e-430950652315
. C5 V# D( S; f$ Q/ t health: HEALTH_OK+ X8 a9 s# D8 T3 G/ M
9 T8 m4 E- c6 I3 a
services:
K7 L% x+ l) @- t' G* V( `0 G mon: 1 daemons, quorum cluster9& Z1 C9 g R3 x( T7 r
mgr: cluster9(active)
$ X0 E$ W9 M5 ?4 i osd: 3 osds: 3 up, 3 in" i- v; {: \/ B
5 t0 C0 p2 ^# C! @$ b& y data:8 Y. w* E k3 a; ?# `1 g
pools: 1 pools, 128 pgs
9 U9 l# |7 l8 h4 n8 q objects: 0 objects, 0B
6 r4 _# S A3 L+ f0 Y* k0 [ usage: 3.06GiB used, 10.9TiB / 10.9TiB avail- b. Z/ ~9 C5 {. L1 `
pgs: 100.000% pgs not active; B, [6 j; Q0 t3 T* w
128 undersized+peered
+ ~0 A X. w' N2 E, @复制代码, L$ ]4 h: b& A% h( i
3、修改osd级别
9 }( r/ S8 q* g8 S/ o5 e/ u& X% X5 E
' V4 ]" ?$ f1 y$ i) W- g6 ?复制代码
- G0 ^4 l. X/ ~+ N[root@cluster9 ceph-cluster]# cd /etc/ceph/
* {) u+ n; {0 e3 w; j4 a) v[root@cluster9 ceph]# ceph osd getcrushmap -o /etc/ceph/crushmap, e6 q% ^5 {# }& R+ }+ k! D
18) \3 i6 r8 \/ ?- h2 I1 I
[root@cluster9 ceph]# crushtool -d /etc/ceph/crushmap -o /etc/ceph/crushmap.txt
2 F$ Z& \5 U& z% n4 Y& I[root@cluster9 ceph]# sed -i 's/step chooseleaf firstn 0 type host/step chooseleaf firstn 0 type osd/' /etc/ceph/crushmap.txt7 h1 J8 c" h, T! B3 @
[root@cluster9 ceph]# grep 'step chooseleaf' /etc/ceph/crushmap.txt
% C! V4 x% ~0 g9 ~# Y step chooseleaf firstn 0 type osd
5 f+ A6 j2 F' e8 D[root@cluster9 ceph]# crushtool -c /etc/ceph/crushmap.txt -o /etc/ceph/crushmap-new
) t' |/ R2 Q# L6 T) x[root@cluster9 ceph]# ceph osd setcrushmap -i /etc/ceph/crushmap-new: w8 E4 `; ?3 ^) ^& O( b9 Y& G
19
0 I# _& T+ A/ [ i# U) V: H7 y8 L复制代码
+ G/ i, B2 f4 k, d; j- K5 k4、再次查看ceph状态
( m0 X/ x: I) C0 ?' ^0 ~0 c4 |' C% a* y9 S* A
复制代码2 o0 p6 {$ v7 {1 w
[root@cluster9 ceph]# ceph -s2 M& X) B& W' @2 B. P
cluster:
4 z0 E% Q4 ]2 ^4 f2 e id: d81b3ce4-bcbc-4b43-870e-430950652315
( `8 X. y+ h: w health: HEALTH_OK. K+ Y) P u" L' s
7 A) s" A2 ~0 Z) F services:2 h- o- P, t6 @0 g% I# o% [
mon: 1 daemons, quorum cluster9
6 ?' n' P) a; U) n5 e mgr: cluster9(active)% k. g, o2 j% E0 Y5 h( E( `, x
osd: 3 osds: 3 up, 3 in
2 k) q! k" Y9 v. }
% n" o- V8 h* Y data:
; E/ o4 P: `' T, q0 s1 C" M pools: 1 pools, 128 pgs
0 o) c+ T% ~' l) G% l objects: 0 objects, 0B
; O3 v3 A* C/ C/ K( W0 R7 ~ usage: 3.06GiB used, 10.9TiB / 10.9TiB avail6 {/ \; n! Y0 P/ L5 R+ M; _
pgs: 128 active+clean; ~3 W# p: j d! f( `" ~+ F8 W% E
复制代码 |
|