1 $ osdmaptool --createsimple 3 myosdmap
2 osdmaptool: osdmap file 'myosdmap'
3 osdmaptool: writing epoch 1 to myosdmap
5 $ ORIG_FSID="$(osdmaptool --print myosdmap|grep ^fsid)"
6 osdmaptool: osdmap file 'myosdmap'
8 $ osdmaptool --createsimple 3 myosdmap
9 osdmaptool: osdmap file 'myosdmap'
10 osdmaptool: myosdmap exists, --clobber to overwrite
15 $ osdmaptool --print myosdmap
16 osdmaptool: osdmap file 'myosdmap'
18 fsid [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} (re)
19 created \d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d+ (re)
20 modified \d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d+ (re)
25 min_compat_client hammer 0.94
27 pool 0 'rbd' replicated size 3 min_size 2 crush_ruleset 0 object_hash rjenkins pg_num 192 pgp_num 192 last_change 0 flags hashpspool stripe_width 0
32 $ NEW_FSID="$(osdmaptool --print myosdmap|grep ^fsid)"
33 osdmaptool: osdmap file 'myosdmap'
34 $ [ "$ORIG_FSID" = "$NEW_FSID" ]
36 $ osdmaptool --createsimple 1 --clobber myosdmap
37 osdmaptool: osdmap file 'myosdmap'
38 osdmaptool: writing epoch 1 to myosdmap
40 $ osdmaptool --print myosdmap
41 osdmaptool: osdmap file 'myosdmap'
43 fsid [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} (re)
44 created \d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d+ (re)
45 modified \d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d+ (re)
50 min_compat_client hammer 0.94
52 pool 0 'rbd' replicated size 3 min_size 2 crush_ruleset 0 object_hash rjenkins pg_num 64 pgp_num 64 last_change 0 flags hashpspool stripe_width 0
57 $ NEW_FSID="$(osdmaptool --print myosdmap|grep ^fsid)"
58 osdmaptool: osdmap file 'myosdmap'
59 #TODO --clobber should probably set new fsid, remove the [1]
60 $ [ "$ORIG_FSID" != "$NEW_FSID" ]