1 $ map="$TESTDIR/build.crushmap"
4 # display the crush tree by default
6 $ crushtool --outfn "$map" --build --num_osds 5 node straw 2 rack straw 1 root straw 0
9 # silence all messages with --debug-crush 0
11 $ CEPH_ARGS="--debug-crush 0" crushtool --outfn "$map" --build --num_osds 5 node straw 2 rack straw 1 root straw 0
14 # display a warning if there is more than one root
16 $ crushtool --outfn "$map" --build --num_osds 5 node straw 2 rack straw 1
17 The crush rulesets will use the root rack0 (re)
18 and ignore the others.
19 There are 3 roots, they can be
20 grouped into a single root by appending something like:
24 # crush rulesets are generated using the OSDMap helpers
26 $ CEPH_ARGS="--debug-crush 0" crushtool --outfn "$map" --set-straw-calc-version 0 --build --num_osds 1 root straw 0 --set-chooseleaf-stable 0
27 $ crushtool -o "$map.txt" -d "$map"
30 tunable choose_local_tries 0
31 tunable choose_local_fallback_tries 0
32 tunable choose_total_tries 50
33 tunable chooseleaf_descend_once 1
34 tunable chooseleaf_vary_r 1
35 tunable allowed_bucket_algs 54
46 \tid -1\t\t# do not change unnecessarily (esc)
47 \t# weight 1.000 (esc)
49 \thash 0\t# rjenkins1 (esc)
50 \titem osd.0 weight 1.000 (esc)
54 rule replicated_rule {
56 \ttype replicated (esc)
59 \tstep take root (esc)
60 \tstep chooseleaf firstn 0 type root (esc)
65 $ rm "$map" "$map.txt"
68 # Wrong number of arguments
70 $ crushtool --outfn "$map" --debug-crush 0 --build --num_osds 5 node straw 0
71 remaining args: [--debug-crush,0,node,straw,0]
72 layers must be specified with 3-tuples of (name, buckettype, size)
76 # compile-command: "cd ../../.. ; make crushtool && test/run-cli-tests"