RBD(8) Ceph RBD(8)NAMErbd - manage rados block device (RBD) images
SYNOPSISrbd [ -c ceph.conf ] [ -m monaddr ] [ -p | --pool pool ] [
--size size ] [ --order bits ] [ command ... ]
DESCRIPTIONrbd 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.
OPTIONS-c ceph.conf, --conf ceph.conf
Use ceph.conf configuration file instead of the default
/etc/ceph/ceph.conf to determine monitor addresses during
startup.
-m monaddress[:port]
Connect to specified monitor (instead of looking through
ceph.conf).
-p pool, --pool pool
Interact with the given pool. Required by most commands.
PARAMETERS--size size-in-mb
Specifies the size (in megabytes) of the new rbd image.
--order bits
Specifies the object size expressed as a number of bits, such
that the object size is 1 << order. The default is 22 (4 MB).
--snap snap
Specifies the snapshot name for the specific operation.
--user username
Specifies the username to use with the map command.
--secret filename
Specifies a file containing the secret to use with the map com‐
mand.
COMMANDS
ls [pool-name]
Will list all rbd images listed in the rbd_directory object.
info [image-name]
Will dump information (such as size and order) about a specific
rbd image.
create [image-name]
Will create a new rbd image. You must also specify the size via
--size.
resize [image-name]
Resizes rbd image. The size parameter also needs to be speci‐
fied.
rm [image-name]
Deletes rbd image (including all data blocks)
export [image-name] [dest-path]
Exports image to dest path.
import [path] [dest-image]
Creates a new image and imports its data from path.
cp [src-image] [dest-image]
Copies the content of a src-image into the newly created
dest-image.
mv [src-image] [dest-image]
Renames an image.
snap ls [image-name]
Dumps the list of snapshots inside a specific image.
snap create [image-name]
Creates a new snapshot. Requires the snapshot name parameter
specified.
snap rollback [image-name]
Rollback image content to snapshot. This will iterate through
the entire blocks array and update the data head content to the
snapshotted version.
snap rm [image-name]
Removes the specified snapshot.
map [image-name]
Maps the specified image to a block device via the rbd kernel
module.
unmap [device-path]
Unmaps the block device that was mapped via the rbd kernel mod‐
ule.
showmapped
Show the rbd images that are mapped via the rbd kernel module.
IMAGE NAME
In addition to using the --pool and the --snap options, the image name
can include both the pool name and the snapshot name. The image name
format is as follows:
[pool/]image-name[@snap]
Thus an image name that contains a slash character ('/') requires spec‐
ifying the pool name explicitly.
EXAMPLES
To create a new rbd image that is 100 GB:
rbd-p mypool create myimage --size 102400
or alternatively:
rbd create mypool/myimage --size 102400
To use a non-default object size (8 MB):
rbd create mypool/myimage --size 102400 --order 23
To delete an rbd image (be careful!):
rbd rm mypool/myimage
To create a new snapshot:
rbd create mypool/myimage@mysnap
To map an image via the kernel with cephx enabled:
rbd map myimage --user admin --secret secretfile
To unmap an image:
rbd unmap /dev/rbd0
AVAILABILITYrbd is part of the Ceph distributed file system. Please refer to the
Ceph wiki at http://ceph.newdream.net/wiki for more information.
SEE ALSOceph(8), rados(8)COPYRIGHT
2011, New Dream Network
dev September 22, 2011 RBD(8)