-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcrushtool.8
155 lines (153 loc) · 3.66 KB
/
crushtool.8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
.TH "CRUSHTOOL" "8" "September 27, 2012" "dev" "Ceph"
.SH NAME
crushtool \- CRUSH map manipulation tool
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.\" Man page generated from reStructuredText.
.
.SH SYNOPSIS
.nf
\fBcrushtool\fP ( \-d \fImap\fP | \-c \fImap.txt\fP | \-\-build \fInumosds\fP
\fIlayer1\fP \fI...\fP ) [ \-o \fIoutfile\fP [ \-\-clobber ]]
.fi
.sp
.SH DESCRIPTION
.sp
\fBcrushtool\fP is a utility that lets you create, compile, and
decompile CRUSH map files.
.sp
CRUSH is a pseudo\-random data distribution algorithm that efficiently
maps input values (typically data objects) across a heterogeneous,
hierarchically structured device map. The algorithm was originally
described in detail in the following paper (although it has evolved
some since then):
.INDENT 0.0
.INDENT 3.5
\fI\%http://www.ssrc.ucsc.edu/Papers/weil-sc06.pdf\fP
.UNINDENT
.UNINDENT
.sp
The tool has four modes of operation.
.INDENT 0.0
.TP
.B \-c map.txt
will compile a plaintext map.txt into a binary map file.
.UNINDENT
.INDENT 0.0
.TP
.B \-d map
will take the compiled map and decompile it into a plaintext source
file, suitable for editing.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-build numosds layer1 ...
will create a relatively generic map with the given layer
structure. See below for examples.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-test ...
.TP
.B will perform a dry run of a CRUSH mapping for a range of input object
.TP
.B \-\-help for more information.
.UNINDENT
.SH OPTIONS
.INDENT 0.0
.TP
.B \-o outfile
will specify the output file.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-clobber
will allow the tool to overwrite an existing outfile (it will normally refuse).
.UNINDENT
.SH BUILDING A MAP
.sp
The build mode will generate relatively generic hierarchical maps. The
first argument simply specifies the number of devices (leaves) in the
CRUSH hierarchy. Each layer describes how the layer (or raw devices)
preceding it should be grouped.
.sp
Each layer consists of:
.sp
.nf
.ft C
name ( uniform | list | tree | straw ) size
.ft P
.fi
.sp
The first element is the name for the elements in the layer
(e.g. "rack"). Each element\(aqs name will be append a number to the
provided name.
.sp
The second component is the type of CRUSH bucket.
.sp
The third component is the maximum size of the bucket. If the size is
0, a single bucket will be generated that includes everything in the
preceding layer.
.SH EXAMPLE
.sp
Suppose we have 128 devices, each grouped into shelves with 4 devices
each, and 8 shelves per rack. We could create a three level hierarchy
with:
.sp
.nf
.ft C
crushtool \-\-build 128 shelf uniform 4 rack straw 8 root straw 0 \-o map
.ft P
.fi
.sp
To adjust the default (generic) mapping rules, we can run:
.sp
.nf
.ft C
# decompile
crushtool \-d map \-o map.txt
# edit
vi map.txt
# recompile
crushtool \-c map.txt \-o map
.ft P
.fi
.SH AVAILABILITY
.sp
\fBcrushtool\fP is part of the Ceph distributed file system. Please
refer to the Ceph documentation at \fI\%http://ceph.com/docs\fP for more
information.
.SH SEE ALSO
.sp
\fBceph\fP(8),
\fBosdmaptool\fP(8),
\fBmkcephfs\fP(8)
.SH COPYRIGHT
2012, Inktank Storage, Inc.
.\" Generated by docutils manpage writer.
.