2010-07-15 21:07:52 +00:00
.TH RBDTOOL 8
.SH NAME
rbd \- manage rados block device (RBD) images
.SH SYNOPSIS
.B rbd
[ \fB \- c\fI ceph.conf\fR ]
[ \fB \- m\fI monaddr\fR ]
[ \fB \- p\fP | \fB \- \- pool\fI pool\fR ]
[ \fB \- \- size\fI size\fR ]
[ \fB \- \- order\fI bits\fR ]
[ \fI command ...\fR ]
.SH DESCRIPTION
.B rbd
is a utility for manipulating rados block device (RBD) images, used by the Linux
rbd driver and the rbd storage driver for Qemu/KVM. RBD images are
simple block devices that are striped over objects and stored in a RADOS object store.
The size of the objects the image is striped over must be a power of two.
.SH OPTIONS
.TP
\fB \- c\fI ceph.conf\fR , \fB \- \- conf \fI ceph.conf\fR
Use \fI ceph.conf\fP configuration file instead of the default \fI /etc/ceph/ceph.conf\fP
to determine monitor addresses during startup.
.TP
\fB \- m\fI monaddress[:port]\fR
Connect to specified monitor (instead of looking through \fI ceph.conf\fR ).
.TP
\fB \- p\fI pool\fR , \fB \- \- pool \fI pool\fR
Interact with the given \fI pool\fP . Required by most commands.
.SH PARAMETERS
.TP
\fB \- \- size \fI size-in-mb\fP
Specifies the size (in megabytes) of the new rbd image.
.TP
\fB \- \- order \fI bits\fP
Specifies the object size expressed as a number of bits, such that the object size is 1 << \fI order\fR . The default is 22 (4 MB).
.TP
\fB \- \- snap \fI snap\fP
Specifies the snapshot name for the specific operation.
.SH COMMANDS
.TP
2010-07-15 21:34:11 +00:00
\fB ls \fR [ \fI pool-name\fP ]
2010-07-15 21:07:52 +00:00
Will list all rbd images listed in the \fI rbd_directory\fR object.
.TP
\fB info \fR [ \fI image-name\fP ]
Will dump information (such as size and order) about a specific rbd image.
.TP
\fB create \fR [ \fI image-name\fP ]
Will create a new rbd image. You must also specify the size via \fB \- \- size\fR .
.TP
\fB resize \fR [ \fI image-name\fP ]
Resizes rbd image. The size parameter also needs to be specified.
.TP
\fB rm \fR [ \fI image-name\fP ]
Deletes rbd image (including all data blocks)
.TP
\fB rm \fR [ \fI image-name\fP ]
Deletes rbd image (including all data blocks)
.TP
\fB export \fR [ \fI image-name\fP ] \fR [ \fI dest-path\fP ]
Exports image to dest path.
.TP
2010-07-15 21:34:11 +00:00
\fB import \fR [ \fI path\fP ] \fR [ \fI dest-image\fP ]
2010-07-15 21:07:52 +00:00
Creates a new image and imports its data from path.
.TP
2010-07-15 21:34:11 +00:00
\fB cp \fR [ \fI src-image\fP ] \fR [ \fI dest-image\fP ]
2010-07-15 21:07:52 +00:00
Copies the content of a src-image into the newly created dest-image.
.TP
2010-07-15 21:34:11 +00:00
\fB mv \fR [ \fI src-image\fP ] \fR [ \fI dest-image\fP ]
2010-07-15 21:07:52 +00:00
Renames an image.
.TP
2010-07-15 21:34:11 +00:00
\fB snap ls \fR [ \fI image-name\fP ]
2010-07-15 21:07:52 +00:00
Dumps the list of snapshots inside a specific image.
.TP
2010-07-15 21:34:11 +00:00
\fB snap create \fR [ \fI image-name\fP ]
2010-07-15 21:07:52 +00:00
Creates a new snapshot. Requires the snapshot name parameter specified.
.TP
2010-07-15 21:34:11 +00:00
\fB snap rollback \fR [ \fI image-name\fP ]
2010-07-15 21:07:52 +00:00
Rollback image content to snapshot. This will iterate through the entire blocks array and update the data head content to the snapshotted version.
2010-07-15 21:34:11 +00:00
.SH IMAGE NAME
In addition to using the \fB \- \- pool\fR and the \fB \- \- snap\fR options, the image name can include both the pool name and the snapshot name. The image name format is as follows:
.IP
[\fI pool\fP /]image-name[@\fI snap\fP ]
.PP
Thus an image name that contains a slash character ('/') requires specifying the pool name explicitly.
2010-07-15 21:07:52 +00:00
.SH EXAMPLES
To create a new rbd image that is 100 GB:
.IP
rbd -p mypool create myimage --size 102400
.PP
or alternatively
.IP
rbd create mypool/myimage --size 102400
.PP
To use a non-default object size (8 MB):
.IP
rbd create mypool/myimage --size 102400 --order 23
.PP
To delete an rbd image (be careful!):
.IP
rbd rm mypool/myimage
.PP
2010-07-15 21:34:11 +00:00
.IP
To create a new snapshot:
.PP
.IP
rbd create mypool/myimage@mysnap
.PP
2010-07-15 21:07:52 +00:00
.SH AVAILABILITY
.B rbd
is part of the Ceph distributed file system. Please refer to the Ceph wiki at
http://ceph.newdream.net/wiki for more information.
.SH SEE ALSO
.BR ceph (8), rados (8)