|
|
[root@compute01 ~]# ceph osd tree0 x7 l! W+ b/ r; c! v
ID CLASS WEIGHT TYPE NAME STATUS REWEIGHT PRI-AFF ) d% v; k& ]6 ~+ W2 y4 i @$ @
-7 2.00000 root hdd-bigdata " T6 ]2 V4 T# m l6 J4 |0 {* ^
-14 1.00000 host hdd-bigdata-compute01
; C) A% E. m9 [. @6 O" t5 ^0 ] 12 hdd 1.00000 osd.12 up 1.00000 1.00000 & B$ g' F" ?" z8 f! y
-15 1.00000 host hdd-bigdata-compute02
" |1 @: z9 }4 k, n- \/ A f 13 hdd 1.00000 osd.13 up 1.00000 1.00000 ( c0 A4 _. g2 Y# R) a
-16 0 host hdd-bigdata-compute03 5 v4 J. H' t+ S/ X$ Y+ t- o' P
-6 3.00000 root hdd-smalldata / f$ I# g4 T% o+ ?( p' t( R: s
-17 1.00000 host hdd-smalldata-compute01
4 {7 h2 W' S" W- U8 z7 Q; K$ Z 9 hdd 1.00000 osd.9 up 1.00000 1.00000 ( ]/ c- y$ C! l8 y* v' C
-18 1.00000 host hdd-smalldata-compute02 & _7 K; ?/ t! F$ T
10 hdd 1.00000 osd.10 up 1.00000 1.00000
) J1 B9 q" p! ]* o) m4 U9 @* Z6 y& R0 x-19 1.00000 host hdd-smalldata-compute03
* ]! `# @ Q3 t! Z! x0 K 11 hdd 1.00000 osd.11 up 1.00000 1.00000
' v# m u7 v! N- F -5 3.00000 root ssd-smalldata
F9 z, P+ j! \+ I) }; W3 h-11 1.00000 host ssd-smalldata-compute01
1 w e, T/ P' y5 j0 ? 6 ssd 1.00000 osd.6 up 1.00000 1.00000
, \! d1 q% j& Y* _1 m+ C-12 1.00000 host ssd-smalldata-compute02
3 m' q; i1 `* P6 n. [3 c9 Z 7 ssd 1.00000 osd.7 up 1.00000 1.00000
, U' \% h" j7 ~7 E-13 1.00000 host ssd-smalldata-compute03 3 Q7 t0 ]) |5 S7 t2 ?. B0 d4 }; q; N* |
8 ssd 1.00000 osd.8 up 1.00000 1.00000
4 A: r+ ]! s- Q& R -4 6.00000 root ssd-bigdata
* v/ r1 |; U# L! I! C& d. G -8 2.00000 host ssd-bigdata-compute01 # t) Q1 R5 u: H8 y
0 ssd 1.00000 osd.0 up 1.00000 1.00000 ! P2 W0 t$ b3 |: A0 X: t1 n# P
1 ssd 1.00000 osd.1 up 1.00000 1.00000
% [$ m/ P% H5 M6 p& G9 x; i/ Y$ C -9 2.00000 host ssd-bigdata-compute02
) \. C. g! o% f; w 2 ssd 1.00000 osd.2 up 1.00000 1.00000 ! {7 V) [$ Z, X* X
3 ssd 1.00000 osd.3 up 1.00000 1.00000
+ X, Y+ }- z& G-10 2.00000 host ssd-bigdata-compute03
- B& V# q+ `/ Y, j( y 4 ssd 1.00000 osd.4 up 1.00000 1.00000 ! w- F y6 h; V7 r1 T) `2 y
5 ssd 1.00000 osd.5 up 1.00000 1.00000
6 v& Q$ F' l* a- `3 I -1 0 root default
4 n9 X6 m5 i4 k8 r
1 s6 {5 I+ O& T6 S
$ a2 z L! e. T9 g" [0 b1 z( D9 J8 [/ {
[root@compute01 ~]# ceph osd crush rename-bucket ssd-bigdata ssd0 c, ~" j1 U1 s- I, s; z
renamed bucket ssd-bigdata into ssd
1 C# m9 [' @3 ~9 G1 {1 ] S5 B[root@compute01 ~]# ceph -s
5 t6 }! Z9 v5 \. o7 K( k cluster:% W5 s9 J, D' D* I8 J" A
id: 2af51d38-db90-4a57-a43d-ea9f6ebd7482
# H( r2 d8 P8 [( Y# p& v# T health: HEALTH_OK0 B2 Q0 N( z" a3 m; o2 @
. ^) E7 L3 W' z4 T4 T& m- \
services:6 F( K/ p# d& O) m+ r
mon: 3 daemons, quorum compute01,compute02,compute03 (age 17h)
! F- k5 v2 W: E. E mgr: compute01(active, since 17h), standbys: compute02, compute03
' @' V" |" u$ U6 Q6 K osd: 14 osds: 14 up (since 16h), 14 in (since 16h)" n& L5 G2 z# p( ^
( Y5 _7 c. d p. m; ?! r* b/ Q
data:
8 P0 x2 O! z8 p pools: 0 pools, 0 pgs
9 o; O; W7 P h5 ^) b! ^ c8 m objects: 0 objects, 0 B
. C5 e- M' O1 Q usage: 14 GiB used, 13 TiB / 13 TiB avail; k7 I1 ^* B9 s
pgs: 5 {4 ]! S+ X7 t! e! p5 ~
1 k' c! Y- O/ O2 c) [' I
[root@compute01 ~]# ceph osd tree
0 H+ ~ A+ _5 Z, J, k* ~. kID CLASS WEIGHT TYPE NAME STATUS REWEIGHT PRI-AFF # w! b8 n3 F! U: g4 B
-7 2.00000 root hdd-bigdata ' O9 L7 ?4 I" t5 J! x
-14 1.00000 host hdd-bigdata-compute01 6 ^ z" m0 t& L p
12 hdd 1.00000 osd.12 up 1.00000 1.00000 % R# Y2 q& `$ d9 _- J' [
-15 1.00000 host hdd-bigdata-compute02
1 ]9 T/ }6 L) ^ s2 G6 ` 13 hdd 1.00000 osd.13 up 1.00000 1.00000 # j; b: }1 w8 C, m
-16 0 host hdd-bigdata-compute03
% q) O+ n; p% L m -6 3.00000 root hdd-smalldata , D/ {2 |1 X( ` _5 _
-17 1.00000 host hdd-smalldata-compute01
G' @" ~5 o# p+ s9 _, R0 Z% [9 a6 \ 9 hdd 1.00000 osd.9 up 1.00000 1.00000 ' [. E! N1 Y9 t7 \9 Q& o
-18 1.00000 host hdd-smalldata-compute02 5 w: `8 Z* k+ p! p0 C
10 hdd 1.00000 osd.10 up 1.00000 1.00000
+ U1 F5 V6 D" e; _-19 1.00000 host hdd-smalldata-compute03
3 i+ H& z1 j/ T7 D- h4 K( e! n) _ 11 hdd 1.00000 osd.11 up 1.00000 1.00000
5 G$ f* C4 S1 Y -5 3.00000 root ssd-smalldata
8 L3 r" f) e. w/ H-11 1.00000 host ssd-smalldata-compute01
) }4 G8 i8 b& e W* m5 u6 ? 6 ssd 1.00000 osd.6 up 1.00000 1.00000
& Z; h5 e0 K6 \' h$ t& j% v4 ]-12 1.00000 host ssd-smalldata-compute02
/ m/ x2 b" {% h# w* u 7 ssd 1.00000 osd.7 up 1.00000 1.00000
. o2 T7 l1 f# C5 u% q% V" l7 U9 v-13 1.00000 host ssd-smalldata-compute03 * Q: e) u4 N* T; n/ n
8 ssd 1.00000 osd.8 up 1.00000 1.00000
# ]! e A2 Z+ o+ S1 H. A# e -4 6.00000 root ssd 7 X; f5 y3 Q0 T* F0 O3 ^' i) g
-8 2.00000 host ssd-bigdata-compute01 Z4 \" g9 f$ T" z9 C6 [
0 ssd 1.00000 osd.0 up 1.00000 1.00000
8 o8 d% c% w, _- N* k6 P 1 ssd 1.00000 osd.1 up 1.00000 1.00000 6 E9 T) W6 ^4 d4 L4 H* I4 Q% x
-9 2.00000 host ssd-bigdata-compute02
5 i& l4 X1 d, z% F+ U1 \+ o5 D- O 2 ssd 1.00000 osd.2 up 1.00000 1.00000
" Q0 m& L7 ?4 A5 Z: r1 }* b 3 ssd 1.00000 osd.3 up 1.00000 1.00000 3 B$ Z; |/ {) P
-10 2.00000 host ssd-bigdata-compute03
" O# K W: O4 L& H# S8 | 4 ssd 1.00000 osd.4 up 1.00000 1.00000 * a5 L: p0 r3 j' w6 \" S/ ]
5 ssd 1.00000 osd.5 up 1.00000 1.00000
, t3 r& ^' I# Z" Q -1 0 root default
5 H7 z1 d- V7 m3 D4 j* ?9 Y: C0 b" }4 D
7 T: K! B3 Y' c
^1 S# b) E% N
[root@compute01 ~]# ceph osd crush --help
% h ]; s$ c" Y7 z5 K General usage: 5 G# k' I5 u2 L4 }
==============
. i% @, U; Y4 }$ ~; X$ busage: ceph [-h] [-c CEPHCONF] [-i INPUT_FILE] [-o OUTPUT_FILE]
6 a: T/ `4 r( i! P [--setuser SETUSER] [--setgroup SETGROUP] [--id CLIENT_ID]3 B7 I' ~2 ` A
[--name CLIENT_NAME] [--cluster CLUSTER]8 d" {. K3 V/ @/ C( E
[--admin-daemon ADMIN_SOCKET] [-s] [-w] [--watch-debug]
/ n* [" X$ d; ?0 {3 U4 S" L8 q [--watch-info] [--watch-sec] [--watch-warn] [--watch-error]
; c* l6 Q* n9 N5 g+ T0 `0 w [--watch-channel {cluster,audit,*}] [--version] [--verbose]: E# G+ R; ~( S+ s- S
[--concise] [-f {json,json-pretty,xml,xml-pretty,plain}]0 ]. W; ~+ i# V1 ~
[--connect-timeout CLUSTER_TIMEOUT] [--block] [--period PERIOD] u5 x( H7 v' C @! ^# w/ m3 H% f
Ceph administration tool
6 N8 G, ], x& i: noptional arguments:; P% W- p1 Q {; b
-h, --help request mon help
( f7 N( ^! ^6 L -c CEPHCONF, --conf CEPHCONF6 S, d; _% i0 i2 Q+ ]
ceph configuration file& r' l9 ?! Y5 \! g% \; S+ S
-i INPUT_FILE, --in-file INPUT_FILE
: _) Q0 l+ P" e* h: v& Q4 c- T input file, or "-" for stdin/ S) X' v6 o m* b" D( W9 R
-o OUTPUT_FILE, --out-file OUTPUT_FILE
" h( U7 I2 i# P# _ output file, or "-" for stdout
+ ^4 t8 u) D2 U2 x* o4 ]4 B --setuser SETUSER set user file permission$ w0 g. d. M" ^* {% ]* l3 E
--setgroup SETGROUP set group file permission' }+ n: z! y3 u7 }7 Q& b# E6 a
--id CLIENT_ID, --user CLIENT_ID0 D h# N# P. V! d: `
client id for authentication
; D5 Q' N8 R- { b7 T --name CLIENT_NAME, -n CLIENT_NAME" C; d. t2 _, n1 a# F' k: P
client name for authentication/ V; V. G4 R4 g
--cluster CLUSTER cluster name: \% U4 ^" i, b2 W9 h
--admin-daemon ADMIN_SOCKET k& i4 X n% X. H: R
submit admin-socket commands ("help" for help
+ H. Y9 z- n6 B) G -s, --status show cluster status
7 r6 [" z8 v4 w \ -w, --watch watch live cluster changes
3 e8 l4 J( ]# } --watch-debug watch debug events
b# q- }* n2 n' Q+ H --watch-info watch info events7 y G+ D* b, w* d
--watch-sec watch security events
9 l3 P$ Q1 A) d) `. C- W --watch-warn watch warn events
( h! ?1 l* I3 a. n* p --watch-error watch error events
* m& |2 N: D7 F --watch-channel {cluster,audit,*}$ f1 C6 }* S; r" S
which log channel to follow when using -w/--watch. One& r( M# Q) y# h" r* s; s! t
of ['cluster', 'audit', '*']& ]) M& A) B. q9 c6 M1 I9 l
--version, -v display version
, b# m$ B3 O% Q! V! F8 ] --verbose make verbose
% l6 _1 ^# d- \5 w --concise make less verbose m& Z3 K/ Z7 M; [
-f {json,json-pretty,xml,xml-pretty,plain}, --format {json,json-pretty,xml,xml-pretty,plain}; f3 o) I: B" G* C2 o
--connect-timeout CLUSTER_TIMEOUT
# U6 Q) m! {; X. \ set a timeout for connecting to the cluster
& b! R" n( M) V --block block until completion (scrub and deep-scrub only)- s( u0 {7 g8 z9 e* ~( R
--period PERIOD, -p PERIOD
3 g/ z1 p, K$ t$ b! }) ~' v; A polling period, default 1.0 second (for polling4 Z5 y$ _( m3 z9 ^+ K O# p9 m
commands only): B+ W6 U: Q% D- C
Local commands:
- B+ H: |0 J8 k( h$ l ===============
1 J- [, l. {/ }& L2 S6 T2 {ping <mon.id> Send simple presence/life test to a mon& C2 K* n0 G( H7 o
<mon.id> may be 'mon.*' for all mons
9 Y4 K, E. \9 O* x9 L, |* O% xdaemon {type.id|path} <cmd>
! x& o$ k' v8 |' j. ` Same as --admin-daemon, but auto-find admin socket
4 }! V3 C5 W7 O+ D' Z* a: N$ Jdaemonperf {type.id | path} [stat-pats] [priority] [<interval>] [<count>]
9 ~9 S* p; {+ ~+ X0 D0 A4 j- gdaemonperf {type.id | path} list|ls [stat-pats] [priority]
0 |: r! X% _: @" U" L/ J Get selected perf stats from daemon/admin socket
k' s: l* w" P, r3 O& O' u6 N Optional shell-glob comma-delim match string stat-pats8 `, K L$ Y! }+ G0 f
Optional selection priority (can abbreviate name):- V6 H2 I& f; {! R
critical, interesting, useful, noninteresting, debug0 H8 v: c' U7 s4 i3 ^/ H' ]
List shows a table of all available stats9 V/ [1 q0 v' B1 r
Run <count> times (default forever),
7 T4 U/ C' R8 Q1 t once per <interval> seconds (default 1)
, H! ~3 ?: F9 O$ p + [8 u+ _% g. k: b
Monitor commands:
9 d W% M5 f! \ =================. }) |8 A; c4 j! j. n; K" Q* p
osd crush add <osdname (id|osd.id)> <float[0.0-]> <args> [<args>...] add or update crus
* c# K$ u# [ L$ A0 Z5 _ <args>
, }# y+ ^( k8 w( Rosd crush add-bucket <name> <type> {<args> [<args>...]} add no-parent (pro7 C8 s# k% v5 k/ m' X2 \8 \
<args>$ }# o: ?7 p# l4 I) x; c
osd crush class create <class> create crush devic! [7 P; [, x( I8 V9 x+ M
osd crush class ls list all crush dev
; m6 ]/ Q8 C, ^$ m, q1 hosd crush class ls-osd <class> list all osds belo8 X, e7 A/ i4 m* X
osd crush class rename <srcname> <dstname> rename crush devic
h2 v- J6 w4 P+ }7 R- yosd crush class rm <class> remove crush devic
1 F; M. G2 ?+ J+ J% C0 D, I8 D) Kosd crush create-or-move <osdname (id|osd.id)> <float[0.0-]> <args> [<args>...] create entry or mo; U$ i0 L7 a: Z
osd crush dump dump crush map9 p) l# b( W H3 f3 V/ u7 s: d% G
osd crush get-device-class <ids> [<ids>...] get classes of spe
2 B- o( ~1 u0 D. P5 ?9 Gosd crush get-tunable straw_calc_version get crush tunable 7 _6 ~+ {2 I7 U4 l( `' T% q5 F# P8 x
osd crush link <name> <args> [<args>...] link existing entr
4 p3 v# p7 r1 b3 z# Posd crush ls <node> list items beneath, e* x; @" G0 [- w
osd crush move <name> <args> [<args>...] move existing entr3 @7 B2 x, f0 v* i
osd crush rename-bucket <srcname> <dstname> rename bucket <src* `' v* d- T) r# q# N3 _+ h
osd crush reweight <name> <float[0.0-]> change <name>'s we1 }7 n# _8 ]/ I' I; a6 l
osd crush reweight-all recalculate the we, j. C0 q7 j) A. Z6 @4 _6 K1 u% ?
osd crush reweight-subtree <name> <float[0.0-]> change all leaf it
, i6 T, G) o! ~1 W4 {osd crush rm <name> {<ancestor>} remove <name> from0 e$ D1 ?. c1 m3 z4 P9 |6 V
osd crush rm-device-class <ids> [<ids>...] remove class of th
8 h2 }" j! b7 s- Mosd crush rule create-erasure <name> {<profile>} create crush rule
4 f- ?6 l0 ~) A: W3 Z default). K+ C# H4 Q; |: o2 K
osd crush rule create-replicated <name> <root> <type> {<class>} create crush rule 7 Z$ [# B7 I: {3 T$ l; P
across buckets of
; L8 f2 y5 q0 `' | G( Posd crush rule create-simple <name> <root> <type> {firstn|indep} create crush rule , \- s% a7 I! N7 b$ J
<type>, using a c% o5 y* K+ @+ E$ R8 t
erasure pools)7 O$ P: Y% A( @" ?4 K* {
osd crush rule dump {<name>} dump crush rule <n
6 A7 @- r9 v) g( D$ A7 r, Kosd crush rule ls list crush rules) S2 a* T# r7 O6 V* j! x1 a
osd crush rule ls-by-class <class> list all crush rul
! q/ ^/ ~* `( k& q7 g% Z! [* g( g) C" Bosd crush rule rename <srcname> <dstname> rename crush rule
8 J+ h3 `5 s2 a* I7 k% Wosd crush rule rm <name> remove crush rule
' L* L! Y+ r( p. y+ i/ ~' i2 U/ Vosd crush set <osdname (id|osd.id)> <float[0.0-]> <args> [<args>...] update crushmap po+ u) v# @+ q1 [" A8 e
osd crush set {<int>} set crush map from$ M: o- \3 x+ q1 W' I. |3 f0 `
osd crush set-all-straw-buckets-to-straw2 convert all CRUSH
# I# Q; s, D+ j) i0 w* \" n2 Losd crush set-device-class <class> <ids> [<ids>...] set the <class> of4 w, Z# `& j5 @/ @" B$ U. b, ^
osd crush set-tunable straw_calc_version <int> set crush tunable 6 F3 i. |+ m# Y9 m- f! K" X
osd crush show-tunables show current crush
; U) Z6 v3 D {3 i; V+ ^osd crush swap-bucket <source> <dest> {--yes-i-really-mean-it} swap existing buck
( i& K3 q" [8 Y8 G- uosd crush tree {--show-shadow} dump crush buckets
3 l) i }" R4 a3 Aosd crush tunables legacy|argonaut|bobtail|firefly|hammer|jewel|optimal|default set crush tunables
' ]5 @9 e, x8 C) L9 K1 ?osd crush unlink <name> {<ancestor>} unlink <name> from
1 ?0 T4 {5 n8 e4 I$ T# ~8 O4 ` nosd crush weight-set create <poolname> flat|positional create a weight-se
$ ?! T9 ?2 w1 p6 M+ w; josd crush weight-set create-compat create a default b
; F& K9 ]$ Q6 p8 ?osd crush weight-set dump dump crush weight # @1 x; M% D) C, o8 |. Z5 `
osd crush weight-set ls list crush weight
6 u" J. ~( m. s5 Zosd crush weight-set reweight <poolname> <item> <float[0.0-]> [<float[0.0-]>...] set weight for an
; ]# c, ]$ g1 o Nosd crush weight-set reweight-compat <item> <float[0.0-]> [<float[0.0-]>...] set weight for an 0 B& W- L7 ]1 l/ g: ?. N0 r
osd crush weight-set rm <poolname> remove the weight-
: Z( B, h% K* B: |+ Vosd crush weight-set rm-compat remove the backwar
5 _& D$ x! n$ j[root@compute01 ~]# ceph osd crush class
2 u3 _( H2 r( T* kcreate ls ls-osd rename rm ) k/ i* {) k+ J: ]: @4 G
[root@compute01 ~]# ceph osd crush class
3 c' C# l& B2 V% Y. A5 h5 Ycreate ls ls-osd rename rm * A5 H7 O6 O7 L; d3 F" O, n
[root@compute01 ~]# ceph osd crush class ls
5 r; F$ Y1 h n3 t4 c[6 Q+ x) {1 J& ^$ b- b
"ssd",' T; z% h1 L9 f. Q% m$ @9 ?
"hdd"7 [1 x3 u; z+ r; d
]7 a/ ?/ \) S/ C4 @# E, l
* L- Y- t4 @% F- L9 Z0 c8 s
[root@compute01 ~]# ceph osd crush rename-bucket
: S$ a. l! N" B #rename bucket <srcname> to <dstname>
: g* }/ p3 B' t0 b0 L& z; i! H
! R/ b" U5 L) c" W. ~[root@compute01 ~]# ceph osd crush rename-bucket ssd-bigdata-compute01 ssd-compute01/ v& I! o$ ` h+ M& l
renamed bucket ssd-bigdata-compute01 into ssd-compute01
1 m$ j0 Y: x- |. K; Y# R$ O[root@compute01 ~]# ceph osd crush rename-bucket ssd-bigdata-compute02 ssd-compute02
/ {* t0 ?$ q- q; x0 C1 c3 qrenamed bucket ssd-bigdata-compute02 into ssd-compute02 I1 [1 F6 G3 b/ @( L7 B9 B
[root@compute01 ~]# ceph osd crush rename-bucket ssd-bigdata-compute03 ssd-compute039 i9 O3 w# Z% F
renamed bucket ssd-bigdata-compute03 into ssd-compute033 ]7 W7 Y' Y% N; z! @
; ^. L7 ~& r4 o* n4 ^9 r* m; B, F[root@compute01 ~]# ceph osd tree
- e% v: o. D) E8 ]ID CLASS WEIGHT TYPE NAME STATUS REWEIGHT PRI-AFF . D, D3 @' ]4 n# Q* |
-7 2.00000 root hdd-bigdata
9 c8 [- [ }7 z: Z-14 1.00000 host hdd-bigdata-compute01 5 M2 [1 @- P2 `8 X1 ?" N1 E6 T N
12 hdd 1.00000 osd.12 up 1.00000 1.00000 9 q+ \0 g$ p( H
-15 1.00000 host hdd-bigdata-compute02
& U, H: s* l& L1 m! D 13 hdd 1.00000 osd.13 up 1.00000 1.00000 2 w, `' N& K7 }: d \
-16 0 host hdd-bigdata-compute03 3 _" x4 N" w& H j, f+ X
-6 3.00000 root hdd-smalldata
( G( b! N) Y! A! x# v-17 1.00000 host hdd-smalldata-compute01
1 i6 Q3 j, e0 ^ p$ V( X0 V 9 hdd 1.00000 osd.9 up 1.00000 1.00000
( _4 P8 H; X0 x4 M1 a% I- r6 B-18 1.00000 host hdd-smalldata-compute02 % [6 N$ w1 o& u& l9 z1 t, K
10 hdd 1.00000 osd.10 up 1.00000 1.00000 # p6 {' n* w" @2 v; g( G
-19 1.00000 host hdd-smalldata-compute03
3 X0 ]) W" M. m 11 hdd 1.00000 osd.11 up 1.00000 1.00000
( d' ]) w/ b" t# c/ q1 W" } -5 3.00000 root ssd-smalldata
' A9 M- f2 j6 ` N+ n; e7 d3 `-11 1.00000 host ssd-smalldata-compute01 4 J6 O3 j9 G% j+ i* L6 R
6 ssd 1.00000 osd.6 up 1.00000 1.00000
* F1 B4 W, @/ k( ^, x+ `. W. x g-12 1.00000 host ssd-smalldata-compute02 + v5 A( U# N7 R5 r. F+ D
7 ssd 1.00000 osd.7 up 1.00000 1.00000 9 }; |: q( L! W4 p2 e5 V) |5 v
-13 1.00000 host ssd-smalldata-compute03 : ^. K6 Z8 M0 Y; I# a+ \
8 ssd 1.00000 osd.8 up 1.00000 1.00000 # E1 @3 j' d/ E! P, w" M
-4 6.00000 root ssd
( O3 _6 X: y# l# X* g -8 2.00000 host ssd-compute01
) a5 K m! ]7 c/ `& W# p- l 0 ssd 1.00000 osd.0 up 1.00000 1.00000
4 X" }( ]: o+ h* f2 B 1 ssd 1.00000 osd.1 up 1.00000 1.00000 4 |# a2 ]$ g9 Q' {: k
-9 2.00000 host ssd-compute02
% ?$ W1 m! |" P 2 ssd 1.00000 osd.2 up 1.00000 1.00000 : p* X' U$ N& h$ X- y2 x! n7 J9 P
3 ssd 1.00000 osd.3 up 1.00000 1.00000 3 }; C) ~2 N5 M- x( |7 L' h
-10 2.00000 host ssd-compute03
* \" K' G- i. |! N0 e 4 ssd 1.00000 osd.4 up 1.00000 1.00000 1 S4 r5 N1 t1 q1 I6 D! ~1 S7 P g. c% e, c
5 ssd 1.00000 osd.5 up 1.00000 1.00000 : {0 I( e2 k% M
-1 0 root default 5 i/ n3 t: L7 o% _+ k+ e: I
[root@compute01 ~]# ceph osd crush rename-bucket ssd-smalldata-compute01 ssd-compute01& `; t; G8 o, P1 X. v- v4 {
Error EEXIST: dstname = 'ssd-compute01' already exists
. M$ R) P% f0 M$ l4 g$ ~9 r6 [[root@compute01 ~]# ceph osd tree
& @3 t& X9 l1 v# a% IID CLASS WEIGHT TYPE NAME STATUS REWEIGHT PRI-AFF ' g( W- }3 w M' q! a$ h1 ^ A
-7 2.00000 root hdd-bigdata $ Q+ S% Z: F7 L
-14 1.00000 host hdd-bigdata-compute01 5 e6 H r- J% o4 S) q
12 hdd 1.00000 osd.12 up 1.00000 1.00000
6 j1 S' @: h8 ^4 j! Y6 x1 k-15 1.00000 host hdd-bigdata-compute02
1 d! [! e3 K) t6 t 13 hdd 1.00000 osd.13 up 1.00000 1.00000 3 t: W D: `. Z3 j1 Z( q
-16 0 host hdd-bigdata-compute03
9 x- [0 ^- x& W2 d% v -6 3.00000 root hdd-smalldata + k3 [- p0 S1 [: R
-17 1.00000 host hdd-smalldata-compute01
# \* |( l' }0 [7 j+ s$ O: H 9 hdd 1.00000 osd.9 up 1.00000 1.00000 7 z$ W& ` i# p
-18 1.00000 host hdd-smalldata-compute02 3 g, Z3 x% }% Y
10 hdd 1.00000 osd.10 up 1.00000 1.00000 7 B w1 e$ _# K4 L
-19 1.00000 host hdd-smalldata-compute03 ! e. q) H& @# p$ E
11 hdd 1.00000 osd.11 up 1.00000 1.00000 - y9 b) V( H7 o7 D* U% [
-5 3.00000 root ssd-smalldata ( M3 Z: k: Y7 X! U# B. q
-11 1.00000 host ssd-smalldata-compute01 - s, [# z4 U+ o; G) u1 q$ G- \
6 ssd 1.00000 osd.6 up 1.00000 1.00000 / p" Y6 f' n# G8 N/ S* w/ T1 Y
-12 1.00000 host ssd-smalldata-compute02 5 n. i$ x0 c( ?
7 ssd 1.00000 osd.7 up 1.00000 1.00000 ; L N0 q1 h1 {; j' K( k
-13 1.00000 host ssd-smalldata-compute03 + t2 L5 `: y+ C0 g
8 ssd 1.00000 osd.8 up 1.00000 1.00000
5 u2 z+ s* U% Y- W/ E; q -4 6.00000 root ssd 1 P f4 K4 q6 P2 r2 |6 @
-8 2.00000 host ssd-compute01
9 }) D Y4 E' q) C 0 ssd 1.00000 osd.0 up 1.00000 1.00000
) g: }% o; G% }3 v& d 1 ssd 1.00000 osd.1 up 1.00000 1.00000 / P- g N- i4 v
-9 2.00000 host ssd-compute02
# l3 V+ \1 ^+ s; g6 w( w: n. w 2 ssd 1.00000 osd.2 up 1.00000 1.00000 0 y3 g! u7 k* m2 k
3 ssd 1.00000 osd.3 up 1.00000 1.00000
* R' U# e' \2 Y6 c6 N2 k3 b+ X' T( o-10 2.00000 host ssd-compute03
7 g) D% W- `; p7 U6 g2 z; Z 4 ssd 1.00000 osd.4 up 1.00000 1.00000 : E# j" Y( o' i+ H& a
5 ssd 1.00000 osd.5 up 1.00000 1.00000
+ C) P' W) @9 D9 g! m" g' J -1 0 root default . Z6 Z% z2 }; v
[root@compute01 ~]# ceph osd crush
) K; ?. {3 Z+ Xadd remove set-device-class6 N6 Z6 ^0 I7 j7 h
add-bucket rename-bucket set-tunable
0 U+ e3 ~. [0 v5 eclass reweight show-tunables
/ U% K9 a% o9 f2 A: w% B fcreate-or-move reweight-all swap-bucket5 r' q. I' x* S8 T1 g
dump reweight-subtree tree
+ p/ {" b7 U. Q% Y; l* [get-device-class rm tunables7 y& @& K% n1 N' v; D
get-tunable rm-device-class unlink8 K+ z5 H5 c( W2 p* t- a1 }2 M
link rule weight-set
% f V( Q+ t8 I" _9 g9 g% Gls set [( _+ p( s$ o4 f7 H$ y' \
move set-all-straw-buckets-to-straw2
- E9 n2 z. X2 N* P# S8 Z[root@compute01 ~]# ceph osd crush set osd.6 1.00000 host=ssd-compute01
* O, D$ O+ K4 r7 kset item id 6 name 'osd.6' weight 1 at location {host=ssd-compute01} to crush map! v7 z/ O, q; N- ]* A. z8 k0 g
[root@compute01 ~]# ceph osd crush set osd.7 1.00000 host=ssd-compute02
" S' u' q% Y5 e6 r& M- C- gset item id 7 name 'osd.7' weight 1 at location {host=ssd-compute02} to crush map
5 Y4 K, }1 f6 I4 U) J1 l# f[root@compute01 ~]# ceph osd crush set osd.8 1.00000 host=ssd-compute03
$ ^2 I+ @- [1 n( ?2 Sset item id 8 name 'osd.8' weight 1 at location {host=ssd-compute03} to crush map5 D; Z# k3 U. i9 g
[root@compute01 ~]# ceph osd tree: q& X+ M9 J2 q* R7 t& {
ID CLASS WEIGHT TYPE NAME STATUS REWEIGHT PRI-AFF
# R# t; v: g" d9 p -7 2.00000 root hdd-bigdata $ P! _% A9 a9 s0 t
-14 1.00000 host hdd-bigdata-compute01
# R9 q. X; e0 V; X+ W 12 hdd 1.00000 osd.12 up 1.00000 1.00000 # U% }3 H; t7 w: D: y
-15 1.00000 host hdd-bigdata-compute02 3 `8 r4 y( e- `1 G7 E
13 hdd 1.00000 osd.13 up 1.00000 1.00000 / a7 K2 y/ D: a) f: d/ t0 A1 y
-16 0 host hdd-bigdata-compute03
$ t8 _) n! R* H. s+ C% K" r% A6 @ -6 3.00000 root hdd-smalldata
5 o: z( A% U/ n, x-17 1.00000 host hdd-smalldata-compute01 , S9 o$ r; h! y0 W0 U; E8 h
9 hdd 1.00000 osd.9 up 1.00000 1.00000 # J4 b w7 d q6 } v3 J9 t
-18 1.00000 host hdd-smalldata-compute02 / d0 O/ I: ~" s9 Z6 u# B {
10 hdd 1.00000 osd.10 up 1.00000 1.00000
7 z6 F" L9 ?3 j6 {* C-19 1.00000 host hdd-smalldata-compute03
0 V. ~ H; h/ T& c: V% \2 } 11 hdd 1.00000 osd.11 up 1.00000 1.00000
, L% l4 V+ l0 J' z! j -5 0 root ssd-smalldata
9 u0 C6 |# U# R: [" k* p" r-11 0 host ssd-smalldata-compute01 ' q7 a+ X; t% P, X$ _
-12 0 host ssd-smalldata-compute02 + K* @* @8 n( f* m! s
-13 0 host ssd-smalldata-compute03
* a0 B, ?+ }1 t0 U7 e/ V4 y -4 9.00000 root ssd {8 B4 v' k3 E
-8 3.00000 host ssd-compute01
/ w( B3 R4 G9 W( C 0 ssd 1.00000 osd.0 up 1.00000 1.00000 8 S. k- b) K. a0 z& a4 s4 L4 q0 j
1 ssd 1.00000 osd.1 up 1.00000 1.00000
2 D; u- v' `. H0 s5 ~ 6 ssd 1.00000 osd.6 up 1.00000 1.00000
# O/ [3 u' w% u: u3 i, o -9 3.00000 host ssd-compute02
7 V$ ]! y9 f) E 2 ssd 1.00000 osd.2 up 1.00000 1.00000
) K# o+ |2 X# D% _. j4 A 3 ssd 1.00000 osd.3 up 1.00000 1.00000 # m2 D5 O, R- P- a
7 ssd 1.00000 osd.7 up 1.00000 1.00000
, i. s3 T) m% w% S( f0 E( \ A8 `. i-10 3.00000 host ssd-compute03 1 S) K) ?+ a* {( I
4 ssd 1.00000 osd.4 up 1.00000 1.00000
3 ], f( e/ j$ l& g! d 5 ssd 1.00000 osd.5 up 1.00000 1.00000
0 z4 x! d U2 i 8 ssd 1.00000 osd.8 up 1.00000 1.00000
' g/ p% Q& ~$ |/ P$ m l# e7 g -1 0 root default
1 f, F# y5 `# C' r! a+ \* I* |, h q[root@compute01 ~]# df -TH
2 c8 i l8 v$ h) [Filesystem Type Size Used Avail Use% Mounted on6 M$ P( W/ ^; Q" @3 R$ Y2 @
devtmpfs devtmpfs 68G 0 68G 0% /dev
5 |" B7 h e$ Ytmpfs tmpfs 68G 0 68G 0% /dev/shm
' a& A; l* A" e7 I Ftmpfs tmpfs 68G 9.8M 68G 1% /run
; U) a: q% B2 jtmpfs tmpfs 68G 0 68G 0% /sys/fs/cgroup0 c" {+ l6 ~8 _' v! a
/dev/mapper/centos-root xfs 582G 2.8G 579G 1% /
7 F0 S" i5 Q* E. w1 M/dev/sda1 xfs 1.1G 158M 907M 15% /boot# d& Y% H( ^1 R3 v
tmpfs tmpfs 14G 0 14G 0% /run/user/0. M$ l, V b! `; h6 o, G" s
tmpfs tmpfs 68G 54k 68G 1% /var/lib/ceph/osd/ceph-0
# K Y/ F$ j/ a7 K) z9 ktmpfs tmpfs 68G 54k 68G 1% /var/lib/ceph/osd/ceph-18 ^9 H; Z1 @0 W( w/ t+ u3 v; K
tmpfs tmpfs 68G 54k 68G 1% /var/lib/ceph/osd/ceph-66 T* U h- r. ?) x- p
tmpfs tmpfs 68G 54k 68G 1% /var/lib/ceph/osd/ceph-94 z5 H" n, v+ T# g
tmpfs tmpfs 68G 54k 68G 1% /var/lib/ceph/osd/ceph-128 v7 n7 Q) m" R/ B: c" e
[root@compute01 ~]# * l; Q6 y8 L! I) G5 d: c
[root@compute01 ~]#
' U, o" ~0 U! C) c3 q; z( B$ T% ^[root@compute01 ~]# , C s2 M* K2 p1 e
[root@compute01 ~]# ceph osd crush remove ssd-smalldata-compute02
% x! `# R& {* x. W6 R5 nremoved item id -12 name 'ssd-smalldata-compute02' from crush map2 K6 C: C" C; g% C/ E9 @1 B) |4 S2 k
[root@compute01 ~]# ceph osd crush remove ssd-smalldata-compute01
+ L# B$ Z1 _: B% n. m0 kremoved item id -11 name 'ssd-smalldata-compute01' from crush map% ]/ @; J+ `* C5 ~( L
[root@compute01 ~]# ceph osd crush remove ssd-smalldata-compute03 - g6 s* N6 v/ K3 E" p" N* g
removed item id -13 name 'ssd-smalldata-compute03' from crush map6 Q- x" s. M3 E t3 f
[root@compute01 ~]# ceph osd crush remove ssd-smalldata
4 f: j3 t& H7 K& `Error EBUSY: (16) Device or resource busy
* p/ Y4 [' I6 u0 b- |$ B, N[root@compute01 ~]# ceph osd tree
6 c$ Y; U) y* y9 Z: s% d: |+ ]7 F3 W7 \ID CLASS WEIGHT TYPE NAME STATUS REWEIGHT PRI-AFF 8 E4 {3 q5 t- f S. T4 B: Z7 T
-7 2.00000 root hdd-bigdata . u6 l3 g+ z. S5 j1 n, v
-14 1.00000 host hdd-bigdata-compute01
9 Z/ m" U6 ^4 g0 I l 12 hdd 1.00000 osd.12 up 1.00000 1.00000
) {1 X. p. |, _9 a& U-15 1.00000 host hdd-bigdata-compute02 0 C$ F5 C' Y6 L
13 hdd 1.00000 osd.13 up 1.00000 1.00000 $ }; w% j6 H m/ @8 c. f! G9 c
-16 0 host hdd-bigdata-compute03 2 w. o4 x0 m, `) h. Q, m9 f8 j
-6 3.00000 root hdd-smalldata
/ r( J( Y- P; g U, R-17 1.00000 host hdd-smalldata-compute01
$ ?: f1 l8 e6 B% F, M# h 9 hdd 1.00000 osd.9 up 1.00000 1.00000
4 m6 Z% f9 e1 m$ h- _3 ^-18 1.00000 host hdd-smalldata-compute02 2 B/ @. n- I% P( Z
10 hdd 1.00000 osd.10 up 1.00000 1.00000
& m4 O, I6 g; f. a5 l% Z) o# Z-19 1.00000 host hdd-smalldata-compute03
, L" r" Q( x) A 11 hdd 1.00000 osd.11 up 1.00000 1.00000
- J' H# R" q- F; v- Q( {0 w7 _" m -5 0 root ssd-smalldata
- T& X( z- g0 u! ~5 s0 a; [1 l( P -4 9.00000 root ssd
" p) J! H1 N' i; U) d& D \' g -8 3.00000 host ssd-compute01
/ b' I& E! U1 | ?( \ 0 ssd 1.00000 osd.0 up 1.00000 1.00000
- B/ j8 i( k2 W C) h% d; D 1 ssd 1.00000 osd.1 up 1.00000 1.00000
# e0 F/ N4 @# O \ 6 ssd 1.00000 osd.6 up 1.00000 1.00000
. E8 o$ ]0 E4 f -9 3.00000 host ssd-compute02
7 l) j& g' b D2 T3 T* x* o8 _ 2 ssd 1.00000 osd.2 up 1.00000 1.00000
0 L3 J5 R( R/ b% z$ u2 ~ 3 ssd 1.00000 osd.3 up 1.00000 1.00000 $ K9 J$ Z0 p- }' O+ e! r6 R
7 ssd 1.00000 osd.7 up 1.00000 1.00000 " T% l. t Y& N& R) _8 b9 A8 r
-10 3.00000 host ssd-compute03 : }; P c4 J/ y) \/ `
4 ssd 1.00000 osd.4 up 1.00000 1.00000
3 l" x# \: ^8 k, z# k 5 ssd 1.00000 osd.5 up 1.00000 1.00000 ; x4 y$ s: p; F1 ^' ^5 @
8 ssd 1.00000 osd.8 up 1.00000 1.00000
1 H0 L9 A5 J6 L. ^8 N' l -1 0 root default
: J* R# T7 ~* Z2 R( w D/ q% F[root@compute01 ~]# . u+ e7 D6 U& D; \% s/ m
|
|