]> git.proxmox.com Git - ceph.git/blob - ceph/src/test/cli/osdmaptool/create-print.t
3fc5fe00b2c4bafaa612d300962e50db9ffb07fa
[ceph.git] / ceph / src / test / cli / osdmaptool / create-print.t
1 $ osdmaptool --createsimple 3 myosdmap
2 osdmaptool: osdmap file 'myosdmap'
3 osdmaptool: writing epoch 1 to myosdmap
4
5 $ osdmaptool --export-crush oc myosdmap
6 osdmaptool: osdmap file 'myosdmap'
7 osdmaptool: exported crush map to oc
8 $ crushtool --decompile oc
9 # begin crush map
10 tunable choose_local_tries 0
11 tunable choose_local_fallback_tries 0
12 tunable choose_total_tries 50
13 tunable chooseleaf_descend_once 1
14 tunable chooseleaf_vary_r 1
15 tunable chooseleaf_stable 1
16 tunable straw_calc_version 1
17 tunable allowed_bucket_algs 54
18
19 # devices
20 device 0 osd.0
21 device 1 osd.1
22 device 2 osd.2
23
24 # types
25 type 0 osd
26 type 1 host
27 type 2 chassis
28 type 3 rack
29 type 4 row
30 type 5 pdu
31 type 6 pod
32 type 7 room
33 type 8 datacenter
34 type 9 region
35 type 10 root
36
37 # buckets
38 host localhost {
39 \tid -2\t\t# do not change unnecessarily (esc)
40 \t# weight 3.000 (esc)
41 \talg straw2 (esc)
42 \thash 0\t# rjenkins1 (esc)
43 \titem osd.0 weight 1.000 (esc)
44 \titem osd.1 weight 1.000 (esc)
45 \titem osd.2 weight 1.000 (esc)
46 }
47 rack localrack {
48 \tid -3\t\t# do not change unnecessarily (esc)
49 \t# weight 3.000 (esc)
50 \talg straw2 (esc)
51 \thash 0\t# rjenkins1 (esc)
52 \titem localhost weight 3.000 (esc)
53 }
54 root default {
55 \tid -1\t\t# do not change unnecessarily (esc)
56 \t# weight 3.000 (esc)
57 \talg straw2 (esc)
58 \thash 0\t# rjenkins1 (esc)
59 \titem localrack weight 3.000 (esc)
60 }
61
62 # rules
63 rule replicated_rule {
64 \truleset 0 (esc)
65 \ttype replicated (esc)
66 \tmin_size 1 (esc)
67 \tmax_size 10 (esc)
68 \tstep take default (esc)
69 \tstep chooseleaf firstn 0 type host (esc)
70 \tstep emit (esc)
71 }
72
73 # end crush map
74 $ osdmaptool --print myosdmap
75 osdmaptool: osdmap file 'myosdmap'
76 epoch 1
77 fsid [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} (re)
78 created \d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d+ (re)
79 modified \d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d+ (re)
80 flags
81 crush_version 1
82 full_ratio 0
83 backfillfull_ratio 0
84 nearfull_ratio 0
85 min_compat_client jewel
86
87 pool 0 'rbd' replicated size 3 min_size 2 crush_rule 0 object_hash rjenkins pg_num 192 pgp_num 192 last_change 0 flags hashpspool stripe_width 0
88
89 max_osd 3
90
91 $ osdmaptool --clobber --createsimple 3 myosdmap
92 osdmaptool: osdmap file 'myosdmap'
93 osdmaptool: writing epoch 1 to myosdmap
94 $ osdmaptool --print myosdmap | grep 'pool 0'
95 osdmaptool: osdmap file 'myosdmap'
96 pool 0 'rbd' replicated size 3 min_size 2 crush_rule 0 object_hash rjenkins pg_num 192 pgp_num 192 last_change 0 flags hashpspool stripe_width 0
97 $ rm -f myosdmap