]> git.proxmox.com Git - ceph.git/blame - ceph/src/test/cli/crushtool/rules.t
import quincy beta 17.1.0
[ceph.git] / ceph / src / test / cli / crushtool / rules.t
CommitLineData
224ce89b 1 $ crushtool -c $TESTDIR/rules.txt --create-replicated-rule foo default host -o one > /dev/null
20effc67
TL
2 WARNING: min_size is no longer supported, ignoring
3 WARNING: max_size is no longer supported, ignoring
224ce89b
WB
4 $ crushtool -d one
5 # begin crush map
6
7 # devices
8 device 0 osd.0 class ssd
9 device 1 osd.1 class ssd
10 device 2 osd.2 class ssd
11 device 3 osd.3 class hdd
12 device 4 osd.4 class hdd
13 device 5 osd.5 class hdd
14
15 # types
16 type 0 osd
17 type 1 host
18 type 2 root
19
20 # buckets
21 host foo {
22 \tid -3\t\t# do not change unnecessarily (esc)
23 \tid -4 class ssd\t\t# do not change unnecessarily (esc)
24 \tid -7 class hdd\t\t# do not change unnecessarily (esc)
20effc67 25 \t# weight 3.00000 (esc)
224ce89b
WB
26 \talg straw2 (esc)
27 \thash 0\t# rjenkins1 (esc)
20effc67
TL
28 \titem osd.0 weight 1.00000 (esc)
29 \titem osd.1 weight 1.00000 (esc)
30 \titem osd.2 weight 1.00000 (esc)
224ce89b
WB
31 }
32 host bar {
33 \tid -2\t\t# do not change unnecessarily (esc)
34 \tid -5 class ssd\t\t# do not change unnecessarily (esc)
35 \tid -8 class hdd\t\t# do not change unnecessarily (esc)
20effc67 36 \t# weight 3.00000 (esc)
224ce89b
WB
37 \talg straw2 (esc)
38 \thash 0\t# rjenkins1 (esc)
20effc67
TL
39 \titem osd.3 weight 1.00000 (esc)
40 \titem osd.4 weight 1.00000 (esc)
41 \titem osd.5 weight 1.00000 (esc)
224ce89b
WB
42 }
43 root default {
44 \tid -1\t\t# do not change unnecessarily (esc)
45 \tid -6 class ssd\t\t# do not change unnecessarily (esc)
46 \tid -9 class hdd\t\t# do not change unnecessarily (esc)
20effc67 47 \t# weight 6.00000 (esc)
224ce89b
WB
48 \talg straw2 (esc)
49 \thash 0\t# rjenkins1 (esc)
20effc67
TL
50 \titem foo weight 3.00000 (esc)
51 \titem bar weight 3.00000 (esc)
224ce89b
WB
52 }
53
54 # rules
55 rule data {
c07f9fc5 56 \tid 0 (esc)
224ce89b 57 \ttype replicated (esc)
224ce89b
WB
58 \tstep take default (esc)
59 \tstep chooseleaf firstn 0 type host (esc)
60 \tstep emit (esc)
61 }
62 rule foo {
c07f9fc5 63 \tid 1 (esc)
224ce89b 64 \ttype replicated (esc)
224ce89b
WB
65 \tstep take default (esc)
66 \tstep chooseleaf firstn 0 type host (esc)
67 \tstep emit (esc)
68 }
69
70 # end crush map
71
72
73
74
75
76
77
78
79
80
81 $ crushtool -c $TESTDIR/rules.txt --create-replicated-rule foo-ssd default host -o two --device-class ssd > /dev/null
20effc67
TL
82 WARNING: min_size is no longer supported, ignoring
83 WARNING: max_size is no longer supported, ignoring
224ce89b
WB
84 $ crushtool -d two
85 # begin crush map
86
87 # devices
88 device 0 osd.0 class ssd
89 device 1 osd.1 class ssd
90 device 2 osd.2 class ssd
91 device 3 osd.3 class hdd
92 device 4 osd.4 class hdd
93 device 5 osd.5 class hdd
94
95 # types
96 type 0 osd
97 type 1 host
98 type 2 root
99
100 # buckets
101 host foo {
102 \tid -3\t\t# do not change unnecessarily (esc)
103 \tid -4 class ssd\t\t# do not change unnecessarily (esc)
104 \tid -7 class hdd\t\t# do not change unnecessarily (esc)
20effc67 105 \t# weight 3.00000 (esc)
224ce89b
WB
106 \talg straw2 (esc)
107 \thash 0\t# rjenkins1 (esc)
20effc67
TL
108 \titem osd.0 weight 1.00000 (esc)
109 \titem osd.1 weight 1.00000 (esc)
110 \titem osd.2 weight 1.00000 (esc)
224ce89b
WB
111 }
112 host bar {
113 \tid -2\t\t# do not change unnecessarily (esc)
114 \tid -5 class ssd\t\t# do not change unnecessarily (esc)
115 \tid -8 class hdd\t\t# do not change unnecessarily (esc)
20effc67 116 \t# weight 3.00000 (esc)
224ce89b
WB
117 \talg straw2 (esc)
118 \thash 0\t# rjenkins1 (esc)
20effc67
TL
119 \titem osd.3 weight 1.00000 (esc)
120 \titem osd.4 weight 1.00000 (esc)
121 \titem osd.5 weight 1.00000 (esc)
224ce89b
WB
122 }
123 root default {
124 \tid -1\t\t# do not change unnecessarily (esc)
125 \tid -6 class ssd\t\t# do not change unnecessarily (esc)
126 \tid -9 class hdd\t\t# do not change unnecessarily (esc)
20effc67 127 \t# weight 6.00000 (esc)
224ce89b
WB
128 \talg straw2 (esc)
129 \thash 0\t# rjenkins1 (esc)
20effc67
TL
130 \titem foo weight 3.00000 (esc)
131 \titem bar weight 3.00000 (esc)
224ce89b
WB
132 }
133
134 # rules
135 rule data {
c07f9fc5 136 \tid 0 (esc)
224ce89b 137 \ttype replicated (esc)
224ce89b
WB
138 \tstep take default (esc)
139 \tstep chooseleaf firstn 0 type host (esc)
140 \tstep emit (esc)
141 }
142 rule foo-ssd {
c07f9fc5 143 \tid 1 (esc)
224ce89b 144 \ttype replicated (esc)
224ce89b
WB
145 \tstep take default class ssd (esc)
146 \tstep chooseleaf firstn 0 type host (esc)
147 \tstep emit (esc)
148 }
149
150 # end crush map
151
152
153
154
155