OSDMAPTOOL(8) | Ceph | OSDMAPTOOL(8) |
osdmaptool - ceph osd cluster map manipulation tool
osdmaptool mapfilename [--print] [--createsimple numosd [--pgbits bitsperosd ] ] [--clobber]
osdmaptool is a utility that lets you create, view, and manipulate OSD cluster maps from the Ceph distributed storage system. Notably, it lets you extract the embedded CRUSH map or import a new CRUSH map.
To create a simple map with 16 devices:
osdmaptool --createsimple 16 osdmap --clobber
To view the result:
osdmaptool --print osdmap
To view the mappings of placement groups for pool 0:
osdmaptool --test-map-pgs-dump rbd --pool 0 pool 0 pg_num 8 0.0 [0,2,1] 0 0.1 [2,0,1] 2 0.2 [0,1,2] 0 0.3 [2,0,1] 2 0.4 [0,2,1] 0 0.5 [0,2,1] 0 0.6 [0,1,2] 0 0.7 [1,0,2] 1 #osd count first primary c wt wt osd.0 8 5 5 1 1 osd.1 8 1 1 1 1 osd.2 8 2 2 1 1
in 3
avg 8 stddev 0 (0x) (expected 2.3094 0.288675x))
min osd.0 8
max osd.0 8 size 0 0 size 1 0 size 2 0 size 3 8
In a less-balanced cluster, we could have following output for the statistics of placement group distribution, whose standard deviation is 1.41421:
#osd count first primary c wt wt osd.0 8 5 5 1 1 osd.1 8 1 1 1 1 osd.2 8 2 2 1 1 #osd count first primary c wt wt osd.0 33 9 9 0.0145874 1 osd.1 34 14 14 0.0145874 1 osd.2 31 7 7 0.0145874 1 osd.3 31 13 13 0.0145874 1 osd.4 30 14 14 0.0145874 1 osd.5 33 7 7 0.0145874 1
in 6
avg 32 stddev 1.41421 (0.0441942x) (expected 5.16398 0.161374x))
min osd.4 30
max osd.1 34 size 00 size 10 size 20 size 364
osdmaptool is part of Ceph, a massively scalable, open-source, distributed storage system. Please refer to the Ceph documentation at http://ceph.com/docs for more information.
2010-2019, Inktank Storage, Inc. and contributors. Licensed under Creative Commons Attribution Share Alike 3.0 (CC-BY-SA-3.0)
August 28, 2019 | dev |