mirror of
https://github.com/ceph/ceph
synced 2024-12-20 18:33:44 +00:00
574cb61efe
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
152 lines
3.8 KiB
Groff
152 lines
3.8 KiB
Groff
.TH "CRUSHTOOL" "8" "November 18, 2013" "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 \-\-num_osds \fInumosds\fP
|
|
\fIlayer1\fP \fI...\fP ) [ \-o \fIoutfile\fP ]
|
|
.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 \-\-num_osds {num\-osds} layer1 ...
|
|
will create a relatively generic map with the given layer
|
|
structure. See below for examples.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-test
|
|
will perform a dry run of a CRUSH mapping for a range of input object
|
|
names, see crushtool \-\-help for more information.
|
|
.UNINDENT
|
|
.SH OPTIONS
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-o outfile
|
|
will specify the output file.
|
|
.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 two rows with two racks each and 20 nodes per rack. Suppose
|
|
each node contains 4 storage devices for Ceph OSD Daemons. This configuration
|
|
allows us to deploy 320 Ceph OSD Daemons. Lets assume a 42U rack with 2U nodes,
|
|
leaving an extra 2U for a rack switch.
|
|
.sp
|
|
To reflect our hierarchy of devices, nodes, racks and rows, we would execute
|
|
the following:
|
|
.sp
|
|
.nf
|
|
.ft C
|
|
crushtool \-o crushmap \-\-build \-\-num_osds 320 node straw 4 rack straw 20 row straw 2
|
|
.ft P
|
|
.fi
|
|
.sp
|
|
To adjust the default (generic) mapping rules, we can run:
|
|
.sp
|
|
.nf
|
|
.ft C
|
|
# decompile
|
|
crushtool \-d crushmap \-o map.txt
|
|
|
|
# edit
|
|
vi map.txt
|
|
|
|
# recompile
|
|
crushtool \-c map.txt \-o crushmap
|
|
.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),
|
|
.SH COPYRIGHT
|
|
2010-2013, Inktank Storage, Inc. and contributors. Licensed under Creative Commons BY-SA
|
|
.\" Generated by docutils manpage writer.
|
|
.
|