blob: f5e215be13f2d47a72c3011d95cf219eec865908 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
$ crushtool -i "$TESTDIR/simple.template" --add-bucket host0 host --loc cluster cluster0 -o map0 > /dev/null
$ crushtool -i map0 --add-bucket host1 host -o map1 > /dev/null
$ crushtool -i map1 --move host1 --loc cluster cluster0 -o map2 > /dev/null
$ crushtool -i map2 --add-item 1 1.0 device1 --loc cluster cluster0 -o map3 > /dev/null
$ crushtool -i map3 --move device1 --loc host host0 -o map4 > /dev/null
$ crushtool -d map4
# begin crush map
# devices
device 1 device1
# types
type 0 device
type 1 host
type 2 cluster
# buckets
host host0 {
\tid -2\t\t# do not change unnecessarily (esc)
\t# weight 1.00000 (esc)
\talg straw (esc)
\thash 0\t# rjenkins1 (esc)
\titem device1 weight 1.00000 (esc)
}
host host1 {
\tid -3\t\t# do not change unnecessarily (esc)
\t# weight 0.00000 (esc)
\talg straw (esc)
\thash 0\t# rjenkins1 (esc)
}
cluster cluster0 {
\tid -1\t\t# do not change unnecessarily (esc)
\t# weight 1.00000 (esc)
\talg straw (esc)
\thash 0\t# rjenkins1 (esc)
\titem host0 weight 1.00000 (esc)
\titem host1 weight 0.00000 (esc)
}
# rules
rule data {
\tid 0 (esc)
\ttype replicated (esc)
\tstep take cluster0 (esc)
\tstep chooseleaf firstn 0 type host (esc)
\tstep emit (esc)
}
rule metadata {
\tid 1 (esc)
\ttype replicated (esc)
\tstep take cluster0 (esc)
\tstep chooseleaf firstn 0 type host (esc)
\tstep emit (esc)
}
rule rbd {
\tid 2 (esc)
\ttype replicated (esc)
\tstep take cluster0 (esc)
\tstep chooseleaf firstn 0 type host (esc)
\tstep emit (esc)
}
# end crush map
|