1CRUSHDIFF(8)                         Ceph                         CRUSHDIFF(8)
2
3
4

NAME

6       crushdiff - ceph crush map test tool
7

SYNOPSIS

9       crushdiff [ --osdmap osdmap ] [ --pg-dump pg-dump ]
10       [ --compiled ] [ --verbose ] command crushmap
11
12

DESCRIPTION

14       crushdiff  is  a  utility  that  lets you test the effect of a crushmap
15       change: number of pgs, objects, bytes moved. This is a  wrapper  around
16       osdmaptool(8),  relying  on  its  --test-map-pgs-dump option to get the
17       list of changed pgs. Additionally it uses pg  stats  to  calculate  the
18       numbers of objects and bytes moved.
19
20       By default, crushdiff will use the cluster current osdmap and pg stats,
21       which requires access to the cluster. Though one can use  the  --osdmap
22       and --pg-dump options to test against previously obtained data.
23

OPTIONS

25       --compiled
26              The  input/output  crushmap  is  compiled. If the options is not
27              specified the expected/returned crushmap is in txt  (decompiled)
28              format.
29
30       --pg-dump <pg-dump>
31              JSON output of ceph pg dump. If not specified crushdiff will try
32              to get data running the command itself.
33
34       --osdmap <osdmap>
35              The cluster osdmap, obtained with ceph osd  getmap  command.  If
36              not specified crushdiff will try to get data running the command
37              itself.
38
39       --verbose
40              Produce diagnostic output.
41

COMMANDS

43       compare crushmap
44              Compare the crushmap from crushmap file with the  crushmap  from
45              the  cluster osdmap. The output will show the expected number of
46              pgs, objects, bytes moved when the new crushmap is installed.
47
48       export crushmap
49              Export crushmap to crushmap file from the cluster osdmap.
50
51       import crushmap
52              Import crushmap from crushmap file to the cluster osdmap.
53

EXAMPLE

55       Get the current crushmap:
56
57          crushdiff export cm.txt
58
59       Edit the map:
60
61          $EDITOR cm.txt
62
63       Check the result:
64
65          crushdiff compare cm.txt
66
67          79/416 (18.99%) pgs affected
68          281/1392 (20.19%) objects affected
69          80/1248 (6.41%) pg shards to move
70          281/4176 (6.73%) pg object shards to move
71          730.52Mi/10.55Gi (6.76%) bytes to move
72
73       When running with --verbose option the output  will  also  contain  de‐
74       tailed information about the affected pgs, like below:
75
76          4.3     [0, 2, 1] -> [1, 4, 2]
77          4.b     [0, 1, 3] -> [2, 1, 3]
78          4.c     [4, 0, 1] -> [4, 1, 2]
79
80       i.e. a pg number, and its old and the new osd active sets.
81
82       If the result is satisfactory install the updated map:
83
84          crushdiff import cm.txt
85

AVAILABILITY

87       crushdiff  is part of Ceph, a massively scalable, open-source, distrib‐
88       uted storage  system.   Please  refer  to  the  Ceph  documentation  at
89       https://docs.ceph.com for more information.
90

SEE ALSO

92       ceph(8), crushtool(8), osdmaptool(8),
93
95       2010-2023,  Inktank Storage, Inc. and contributors. Licensed under Cre‐
96       ative Commons Attribution Share Alike 3.0 (CC-BY-SA-3.0)
97
98
99
100
101dev                              Nov 15, 2023                     CRUSHDIFF(8)
Impressum