2011-09-22 23:18:19 +00:00
|
|
|
.TH "CRUSHTOOL" "8" "September 22, 2011" "dev" "Ceph"
|
2009-03-11 03:38:47 +00:00
|
|
|
.SH NAME
|
|
|
|
crushtool \- CRUSH map manipulation tool
|
2011-09-09 23:25:14 +00:00
|
|
|
.
|
|
|
|
.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 reStructeredText.
|
|
|
|
.
|
2009-03-11 03:38:47 +00:00
|
|
|
.SH SYNOPSIS
|
2011-09-09 23:25:14 +00:00
|
|
|
.nf
|
|
|
|
\fBcrushtool\fP ( \-d \fImap\fP | \-c \fImap.txt\fP | \-\-build \fInumosds\fP
|
|
|
|
\fIlayer1\fP \fI...\fP ) [ \-o \fIoutfile\fP [ \-\-clobber ]]
|
|
|
|
.fi
|
|
|
|
.sp
|
2009-03-11 03:38:47 +00:00
|
|
|
.SH DESCRIPTION
|
2011-09-09 23:25:14 +00:00
|
|
|
.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
|
2009-03-11 03:38:47 +00:00
|
|
|
The tool has three modes of operation.
|
2011-09-09 23:25:14 +00:00
|
|
|
.INDENT 0.0
|
2009-03-11 03:38:47 +00:00
|
|
|
.TP
|
2011-09-09 23:25:14 +00:00
|
|
|
.B \-c map.txt
|
|
|
|
will compile a plaintext map.txt into a binary map file.
|
|
|
|
.UNINDENT
|
|
|
|
.INDENT 0.0
|
2009-03-11 03:38:47 +00:00
|
|
|
.TP
|
2011-09-09 23:25:14 +00:00
|
|
|
.B \-d map
|
|
|
|
will take the compiled map and decompile it into a plaintext source
|
|
|
|
file, suitable for editing.
|
|
|
|
.UNINDENT
|
|
|
|
.INDENT 0.0
|
2009-03-11 03:38:47 +00:00
|
|
|
.TP
|
2011-09-09 23:25:14 +00:00
|
|
|
.B \-\-build numosds layer1 ...
|
|
|
|
will create a relatively generic map with the given layer
|
|
|
|
structure. See below for examples.
|
|
|
|
.UNINDENT
|
2009-03-11 03:38:47 +00:00
|
|
|
.SH OPTIONS
|
2011-09-09 23:25:14 +00:00
|
|
|
.INDENT 0.0
|
2009-03-11 03:38:47 +00:00
|
|
|
.TP
|
2011-09-09 23:25:14 +00:00
|
|
|
.B \-o outfile
|
2009-03-11 03:38:47 +00:00
|
|
|
will specify the output file.
|
2011-09-09 23:25:14 +00:00
|
|
|
.UNINDENT
|
|
|
|
.INDENT 0.0
|
2009-03-11 03:38:47 +00:00
|
|
|
.TP
|
2011-09-09 23:25:14 +00:00
|
|
|
.B \-\-clobber
|
|
|
|
will allow the tool to overwrite an existing outfile (it will normally refuse).
|
|
|
|
.UNINDENT
|
2009-03-11 03:38:47 +00:00
|
|
|
.SH BUILDING A MAP
|
2011-09-09 23:25:14 +00:00
|
|
|
.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.
|
2009-03-11 03:38:47 +00:00
|
|
|
.SH EXAMPLE
|
2011-09-09 23:25:14 +00:00
|
|
|
.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
|
2009-03-11 03:38:47 +00:00
|
|
|
.SH AVAILABILITY
|
2011-09-09 23:25:14 +00:00
|
|
|
.sp
|
|
|
|
\fBcrushtool\fP is part of the Ceph distributed file system. Please
|
|
|
|
refer to the Ceph wiki at \fI\%http://ceph.newdream.net/wiki\fP for more
|
|
|
|
information.
|
2009-03-11 03:38:47 +00:00
|
|
|
.SH SEE ALSO
|
2011-09-09 23:25:14 +00:00
|
|
|
.sp
|
|
|
|
\fBceph\fP(8),
|
|
|
|
\fBosdmaptool\fP(8),
|
|
|
|
\fBmkcephfs\fP(8)
|
|
|
|
.SH COPYRIGHT
|
|
|
|
2011, New Dream Network
|
|
|
|
.\" Generated by docutils manpage writer.
|
|
|
|
.\"
|
|
|
|
.
|