]> git.proxmox.com Git - ceph.git/blob - ceph/src/test/cli/osdmaptool/create-print.t
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / test / cli / osdmaptool / create-print.t
1 $ osdmaptool --createsimple 3 myosdmap --with-default-pool
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 zone
35 type 10 region
36 type 11 root
37
38 # buckets
39 host localhost {
40 \tid -2\t\t# do not change unnecessarily (esc)
41 \t# weight 3.000 (esc)
42 \talg straw2 (esc)
43 \thash 0\t# rjenkins1 (esc)
44 \titem osd.0 weight 1.000 (esc)
45 \titem osd.1 weight 1.000 (esc)
46 \titem osd.2 weight 1.000 (esc)
47 }
48 rack localrack {
49 \tid -3\t\t# do not change unnecessarily (esc)
50 \t# weight 3.000 (esc)
51 \talg straw2 (esc)
52 \thash 0\t# rjenkins1 (esc)
53 \titem localhost weight 3.000 (esc)
54 }
55 root default {
56 \tid -1\t\t# do not change unnecessarily (esc)
57 \t# weight 3.000 (esc)
58 \talg straw2 (esc)
59 \thash 0\t# rjenkins1 (esc)
60 \titem localrack weight 3.000 (esc)
61 }
62
63 # rules
64 rule replicated_rule {
65 \tid 0 (esc)
66 \ttype replicated (esc)
67 \tmin_size 1 (esc)
68 \tmax_size 10 (esc)
69 \tstep take default (esc)
70 \tstep chooseleaf firstn 0 type host (esc)
71 \tstep emit (esc)
72 }
73
74 # end crush map
75 $ osdmaptool --print myosdmap
76 osdmaptool: osdmap file 'myosdmap'
77 epoch 1
78 fsid [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} (re)
79 created \d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d+ (re)
80 modified \d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d+ (re)
81 flags
82 crush_version 1
83 full_ratio 0
84 backfillfull_ratio 0
85 nearfull_ratio 0
86 min_compat_client jewel
87
88 pool 1 'rbd' replicated size 3 min_size 2 crush_rule 0 object_hash rjenkins pg_num 192 pgp_num 192 autoscale_mode warn last_change 0 flags hashpspool stripe_width 0 application rbd
89
90 max_osd 3
91
92 $ osdmaptool --clobber --createsimple 3 --with-default-pool myosdmap
93 osdmaptool: osdmap file 'myosdmap'
94 osdmaptool: writing epoch 1 to myosdmap
95 $ osdmaptool --print myosdmap | grep 'pool 1'
96 osdmaptool: osdmap file 'myosdmap'
97 pool 1 'rbd' replicated size 3 min_size 2 crush_rule 0 object_hash rjenkins pg_num 192 pgp_num 192 autoscale_mode warn last_change 0 flags hashpspool stripe_width 0 application rbd
98 $ rm -f myosdmap