OS Manuals

/usr/bin/crushtool

Shared filesystem layout and plugins used by every Ceph daemon

From ceph-fips-19-base 19.2.7-r4 (enterprise-packages), captured 2026-11-08 by running crushtool --help (exit 0). permalink

usage: crushtool ...

Display, modify and test a crush map

There are five stages, running one after the other:

 - input/build
 - tunables adjustments
 - modifications
 - display/test
 - output

Options that are not specific to a stage.

   [--infn|-i infile]
                         read the crush map from infile

Options for the input/build stage

   --decompile|-d map    decompile a crush map to source
   [--outfn|-o outfile]
                         specify output for for (de)compilation
   --compile|-c map.txt  compile a map from source
   --enable-unsafe-tunables
                         compile with unsafe tunables
   --build --num_osds N layer1 ...
                         build a new map, where each 'layer' is
                         'name (uniform|straw2|straw|list|tree) size'

Options for the tunables adjustments stage

   --set-choose-local-tries N
                         set choose local retries before re-descent
   --set-choose-local-fallback-tries N
                         set choose local retries using fallback
                         permutation before re-descent
   --set-choose-total-tries N
                         set choose total descent attempts
   --set-chooseleaf-descend-once <0|1>
                         set chooseleaf to (not) retry the recursive descent
   --set-chooseleaf-vary-r <0|1>
                         set chooseleaf to (not) vary r based on parent
   --set-chooseleaf-stable <0|1>
                         set chooseleaf firstn to (not) return stable results

Options for the modifications stage

   -i mapfn --add-item id weight name [--loc type name ...]
                         insert an item into the hierarchy at the
                         given location
   -i mapfn --update-item id weight name [--loc type name ...]
                         insert or move an item into the hierarchy at the
                         given location
   -i mapfn --remove-item name
                         remove the given item
   -i mapfn --reweight-item name weight
                         reweight a given item (and adjust ancestor
                         weights as needed)
   -i mapfn --add-bucket name type [--loc type name ...]
                         insert a bucket into the hierarchy at the given
                         location
   -i mapfn --move       name --loc type name ...
                         move the given item to specified location
   -i mapfn --reweight   recalculate all bucket weights
   -i mapfn --rebuild-class-roots
                         rebuild the per-class shadow trees (normally a no-op)
   -i mapfn --create-simple-rule name root type mode
                         create crush rule <name> to start from <root>,
                         replicate across buckets of type <type>, using
                         a choose mode of <firstn|indep>
   -i mapfn --create-replicated-rule name root type
                         create crush rule <name> to start from <root>,
                         replicate across buckets of type <type>
   --device-class <class>
                         use device class <class> for new rule
   -i mapfn --remove-rule name
                         remove the specified crush rule

Options for the display/test stage

   -f --format           the format of --dump, defaults to json-pretty
                         can be one of json, json-pretty, xml, xml-pretty,
                         table, table-kv, html, html-pretty
   --dump                dump the crush map
   --tree                print map summary as a tree
   --bucket-tree         print bucket map summary as a tree
   --bucket-name         specify bucket bucket name for bucket-tree
   --check [max_id]      check if any item is referencing an unknown name/type
   -i mapfn --show-location id
                         show location for given device id
   -i mapfn --test       test a range of inputs on the map
      [--min-x x] [--max-x x] [--x x]
      [--min-rule r] [--max-rule r] [--rule r]
      [--min-rep n] [--max-rep n] [--num-rep n]
      [--pool-id n]      specifies pool id
      [--batches b]      split the CRUSH mapping into b > 1 rounds
      [--weight|-w devno weight]
                         where weight is 0 to 1.0
      [--simulate]       simulate placements using a random
                         number generator in place of the CRUSH
                         algorithm
   --show-utilization    show OSD usage
   --show-utilization-all
                         include zero weight items
   --show-statistics     show chi squared statistics
   --show-mappings       show mappings
   --show-bad-mappings   show bad mappings
   --show-choose-tries   show choose tries histogram
   --output-name name
                         prepend the data file(s) generated during the
                         testing routine with name
   --output-csv
                         export select data generated during testing routine
                         to CSV files for off-line post-processing
                         use --help-output for more information
   --reclassify          transform legacy CRUSH map buckets and rules
                         by adding classes
      --reclassify-bucket <bucket-match> <class> <default-parent>
      --reclassify-root <bucket-name> <class>
   --set-subtree-class <bucket-name> <class>
                         set class for all items beneath bucket-name
   --compare <otherfile> compare two maps using --test parameters

Options for the output stage

   [--outfn|-o outfile]
                         specify output for modified crush map
Options (26)
OptionDescriptionSource
--enable-unsafe-tunablescompile with unsafe tunableshelp
--set-choose-local-tries Nset choose local retries before re-descenthelp
--set-choose-local-fallback-tries Nset choose local retries using fallback permutation before re-descenthelp
--set-choose-total-tries Nset choose total descent attemptshelp
--set-chooseleaf-descend-once 0|1set chooseleaf to (not) retry the recursive descenthelp
--set-chooseleaf-vary-r 0|1set chooseleaf to (not) vary r based on parenthelp
--set-chooseleaf-stable 0|1set chooseleaf firstn to (not) return stable resultshelp
-i mapfnname --loc type name ...help
--device-class classuse device class <class> for new rulehelp
-f --formatthe format of --dump, defaults to json-pretty can be one of json, json-pretty, xml, xml-pretty, table, table-kv, html, html-prettyhelp
--dumpdump the crush maphelp
--treeprint map summary as a treehelp
--bucket-treeprint bucket map summary as a treehelp
--bucket-namespecify bucket bucket name for bucket-treehelp
--check max_idcheck if any item is referencing an unknown name/typehelp
--show-utilizationshow OSD usagehelp
--show-utilization-allinclude zero weight itemshelp
--show-statisticsshow chi squared statisticshelp
--show-mappingsshow mappingshelp
--show-bad-mappingsshow bad mappingshelp
--show-choose-triesshow choose tries histogramhelp
--output-name nameprepend the data file(s) generated during the testing routine with namehelp
--output-csvexport select data generated during testing routine to CSV files for off-line post-processing use --help-output for more informationhelp
--reclassifytransform legacy CRUSH map buckets and rules by adding classeshelp
--build --num_osdswill create map with the given layer structure. (in the manual page but not in --help)man
--testwill perform a dry run of a CRUSH mapping for a range of input values [--min-x,--max-x] (default [0,1023]) which can be thought of as simulated Placement Groups. (in the manual page but not in --help)man
Examples (2) from the manual page, untested

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.