Block Device Guide | Basic Ceph Administration

A block is a set length of bytes in a sequence, for example, a 512-byte block of data. Combining many blocks together into a single file can be used as a storage device that you can read from and write to. Block-based storage interfaces are the most common way to store data with rotating media such as:

  • Hard drives
  • CD/DVD discs
  • Floppy disks
  • Traditional 9-track tapes

Ceph block devices are thin-provisioned, resizable and store data striped over multiple Object Storage Devices (OSD) in a Ceph storage cluster. Ceph block devices are also known as Reliable Autonomic Distributed Object Store (RADOS) Block Devices (RBDs).
Ceph block devices deliver high performance with infinite scalability to Kernel Virtual Machines (KVMs), such as Quick Emulator (QEMU), and cloud-based computing systems, like OpenStack, that rely on the libvirt and QEMU utilities to integrate with Ceph block devices. You can use the same storage cluster to operate the Ceph Object Gateway and Ceph block devices simultaneously. As a storage administrator, being familiar with Ceph’s block device commands can help you effectively manage the Ceph cluster.


  • A running Ceph cluster.
  • Root-level access to the client node.

Basic Administration:

1. Creating a block device pool

Use the rbd help command to display help for a particular rbd command and its subcommand. Storage administrators must create a pool first before you can specify it as a source. To create an rbd pool, execute the following:

2. Creating a block device image

Before adding a block device to a node, create an image for it in the Ceph storage cluster. To create a block device image, execute the following command:

Retrieve information from an image within a pool, execute the following but replace IMAGE_NAME with the name of the image and replace POOL_NAME with the name of the pool:

3. Resizing a block device image

Ceph block device images are thin provisioned. They do not actually use any physical storage until you begin saving data to them. However, they do have a maximum capacity that you set with the --size option. To increase or decrease the maximum size of a Ceph block device image:

4. Map and mount a Ceph Block Device on client host

On the Ceph client node, install required packages:

Copy the required file from a cluster node to the Client node:

Map the image:

Format the partition with XFS:

Mount the file system and verify that the file system is mounted and showing the correct size:

Try to write files on /mnt

5. Removing a block device image

To delete Block devices or Pools, follow these steps. First, unmount /mnton Client node.

Displaying mapped block devices then unmap the block device image

To remove a block device from a pool, execute the following, but replace IMAGE_NAME with the name of the image to remove and replace POOL_NAME with the name of the pool:

See other content

References :

#CEPH #Storage #CentOS8 #SDS



Cloud Consultant | RHCSA | RHCE in Red Hat OpenStack | Google Cloud ACE | AWS SAA | LinkedIn:

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store