Skip to main content
RunBook Academy

CephXXXVI · RBD ImagesRBD Images

Creating RBD images with the right parameters

Foundation⏱ ~15 minrbd

What you'll learn

  • Create an image with appropriate parameters
  • Identify which parameters are fixed at creation
  • Set sensible cluster-wide defaults
  • Verify an image was created as intended

Prerequisites

None — start here.

Verified against Ceph Tentacle 20.2.x · Ceph Squid 19.2.x (supported previous) · cephadm matches the verified Ceph release · podman 4.x · csi-rbd and csi-cephfs current · RBD / CephFS / RGW current (matches Ceph release) · Linux kernel 5.15+ (5.10 minimum) · Ubuntu 24.04 LTS (Ceph host baseline) · Debian 12 (Bookworm) (Ceph host baseline) · Rocky Linux / RHEL / AlmaLinux 9.x (Ceph host baseline) · Proxmox VE 9.x (cross-course integration) · Kubernetes 1.31+ (cross-course integration) · 2026-08-18

Not yet marked complete on this device.

Why this matters in production

Some image parameters can be changed at any time and some are fixed forever. Getting the fixed ones wrong means creating a new image and copying the data, which on a multi-terabyte volume is a migration rather than a correction.

Creating an image

rbd create --size 100G rbd-vms/vm-disk-01
rbd info rbd-vms/vm-disk-01
rbd image 'vm-disk-01':
	size 100 GiB in 25600 objects
	order 22 (4 MiB objects)
	snapshot_count: 0
	id: 1f2a3b4c5d6e
	block_name_prefix: rbd_data.1f2a3b4c5d6e
	format: 2
	features: layering, exclusive-lock, object-map, fast-diff, deep-flatten
	op_features:
	flags:
	create_timestamp: Tue Aug 18 09:14:22 2026

Changeable versus fixed

ParameterChangeable?How
Sizeyesrbd resize
Featuresyesrbd feature enable/disable
Image nameyesrbd rename
Poolnocopy to a new image
Object size (--object-size)nocopy to a new image
Stripe unit / countnocopy to a new image
Data pool (--data-pool)nocopy to a new image
Formatnoformat 2 is the only supported format

The four fixed parameters are the ones to think about before typing the command.

The full form

rbd create \
    --size 2T \
    --object-size 4M \
    --image-feature layering,exclusive-lock,object-map,fast-diff,deep-flatten \
    --data-pool rbd-bulk-data \
    rbd-bulk-meta/archive-vol-01

--data-pool places the data on a different pool from the image header — the mechanism for EC-backed images, and fixed once created.

Defaults

ceph config set global rbd_default_features 61
ceph config set global rbd_default_order 22
ceph config set global rbd_default_data_pool rbd-bulk-data
ceph config get global rbd_default_features

Setting defaults appropriate to your platform means the common case needs no flags and is consistently correct. The feature bitmask 61 is the standard set: layering, exclusive-lock, object-map, fast-diff, and deep-flatten.

Verifying

rbd info rbd-vms/vm-disk-01
rbd ls -l rbd-vms
rbd du rbd-vms/vm-disk-01

Check rbd info immediately after creation, particularly on the fixed parameters. Catching a wrong object size on an empty image costs one command; catching it later costs a data copy.

Quiz

Knowledge check · 4 questions

  1. Q1. Which RBD image parameter cannot be changed after creation?

  2. Q2. An image created with --data-pool depends on two pools staying available, even though one of them holds almost none of its bytes.

  3. Q3. Standardise image provisioning across a platform.

    An audit of 400 RBD images finds inconsistent feature sets, three different object sizes, and 30 images in pools that do not match their intended service tier. All were created by hand over several years.

  4. Q4. Why must the metadata pool remain available for an image whose data is in an EC pool?

Passing score: 75%. Answers are checked in this browser.

Production discipline

Provision images through tooling that encodes the correct fixed parameters per image class, and set cluster-wide defaults so the common case is right without flags. Verify rbd info immediately after creation — the fixed parameters are cheap to correct on an empty image and expensive afterwards.

Cross-course references

  • Kubernetes: StorageClass parameters serve exactly this standardising role
  • Linux: filesystem creation options such as block size are similarly permanent