]>
Commit | Line | Data |
---|---|---|
224ce89b WB |
1 | $ crushtool -c $TESTDIR/rules.txt --create-replicated-rule foo default host -o one > /dev/null |
2 | $ crushtool -d one | |
3 | # begin crush map | |
4 | ||
5 | # devices | |
6 | device 0 osd.0 class ssd | |
7 | device 1 osd.1 class ssd | |
8 | device 2 osd.2 class ssd | |
9 | device 3 osd.3 class hdd | |
10 | device 4 osd.4 class hdd | |
11 | device 5 osd.5 class hdd | |
12 | ||
13 | # types | |
14 | type 0 osd | |
15 | type 1 host | |
16 | type 2 root | |
17 | ||
18 | # buckets | |
19 | host foo { | |
20 | \tid -3\t\t# do not change unnecessarily (esc) | |
21 | \tid -4 class ssd\t\t# do not change unnecessarily (esc) | |
22 | \tid -7 class hdd\t\t# do not change unnecessarily (esc) | |
23 | \t# weight 3.000 (esc) | |
24 | \talg straw2 (esc) | |
25 | \thash 0\t# rjenkins1 (esc) | |
26 | \titem osd.0 weight 1.000 (esc) | |
27 | \titem osd.1 weight 1.000 (esc) | |
28 | \titem osd.2 weight 1.000 (esc) | |
29 | } | |
30 | host bar { | |
31 | \tid -2\t\t# do not change unnecessarily (esc) | |
32 | \tid -5 class ssd\t\t# do not change unnecessarily (esc) | |
33 | \tid -8 class hdd\t\t# do not change unnecessarily (esc) | |
34 | \t# weight 3.000 (esc) | |
35 | \talg straw2 (esc) | |
36 | \thash 0\t# rjenkins1 (esc) | |
37 | \titem osd.3 weight 1.000 (esc) | |
38 | \titem osd.4 weight 1.000 (esc) | |
39 | \titem osd.5 weight 1.000 (esc) | |
40 | } | |
41 | root default { | |
42 | \tid -1\t\t# do not change unnecessarily (esc) | |
43 | \tid -6 class ssd\t\t# do not change unnecessarily (esc) | |
44 | \tid -9 class hdd\t\t# do not change unnecessarily (esc) | |
45 | \t# weight 6.000 (esc) | |
46 | \talg straw2 (esc) | |
47 | \thash 0\t# rjenkins1 (esc) | |
48 | \titem foo weight 3.000 (esc) | |
49 | \titem bar weight 3.000 (esc) | |
50 | } | |
51 | ||
52 | # rules | |
53 | rule data { | |
c07f9fc5 | 54 | \tid 0 (esc) |
224ce89b WB |
55 | \ttype replicated (esc) |
56 | \tmin_size 1 (esc) | |
57 | \tmax_size 10 (esc) | |
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 WB |
64 | \ttype replicated (esc) |
65 | \tmin_size 1 (esc) | |
66 | \tmax_size 10 (esc) | |
67 | \tstep take default (esc) | |
68 | \tstep chooseleaf firstn 0 type host (esc) | |
69 | \tstep emit (esc) | |
70 | } | |
71 | ||
72 | # end crush map | |
73 | ||
74 | ||
75 | ||
76 | ||
77 | ||
78 | ||
79 | ||
80 | ||
81 | ||
82 | ||
83 | $ crushtool -c $TESTDIR/rules.txt --create-replicated-rule foo-ssd default host -o two --device-class ssd > /dev/null | |
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) | |
105 | \t# weight 3.000 (esc) | |
106 | \talg straw2 (esc) | |
107 | \thash 0\t# rjenkins1 (esc) | |
108 | \titem osd.0 weight 1.000 (esc) | |
109 | \titem osd.1 weight 1.000 (esc) | |
110 | \titem osd.2 weight 1.000 (esc) | |
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) | |
116 | \t# weight 3.000 (esc) | |
117 | \talg straw2 (esc) | |
118 | \thash 0\t# rjenkins1 (esc) | |
119 | \titem osd.3 weight 1.000 (esc) | |
120 | \titem osd.4 weight 1.000 (esc) | |
121 | \titem osd.5 weight 1.000 (esc) | |
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) | |
127 | \t# weight 6.000 (esc) | |
128 | \talg straw2 (esc) | |
129 | \thash 0\t# rjenkins1 (esc) | |
130 | \titem foo weight 3.000 (esc) | |
131 | \titem bar weight 3.000 (esc) | |
132 | } | |
133 | ||
134 | # rules | |
135 | rule data { | |
c07f9fc5 | 136 | \tid 0 (esc) |
224ce89b WB |
137 | \ttype replicated (esc) |
138 | \tmin_size 1 (esc) | |
139 | \tmax_size 10 (esc) | |
140 | \tstep take default (esc) | |
141 | \tstep chooseleaf firstn 0 type host (esc) | |
142 | \tstep emit (esc) | |
143 | } | |
144 | rule foo-ssd { | |
c07f9fc5 | 145 | \tid 1 (esc) |
224ce89b WB |
146 | \ttype replicated (esc) |
147 | \tmin_size 1 (esc) | |
148 | \tmax_size 10 (esc) | |
149 | \tstep take default class ssd (esc) | |
150 | \tstep chooseleaf firstn 0 type host (esc) | |
151 | \tstep emit (esc) | |
152 | } | |
153 | ||
154 | # end crush map | |
155 | ||
156 | ||
157 | ||
158 | ||
159 |