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