Ubuntu

Deploy Ceph Storage Cluster on Ubuntu 26.04 / 24.04

Ceph runs fine on Ubuntu 26.04, just not with the package-only install older guides describe. The archive cephadm needs one extra Python package before it starts, and the archive Ceph client can’t read the keys a new Tentacle cluster creates. Both broke on our first try, and both fixes are below.

Original content from computingforgeeks.com - post 4185

We deploy Ceph on Ubuntu with cephadm, the official orchestrator: three nodes, three monitors, three OSDs, a CephFS file system, an RBD block device, an S3 endpoint on the RADOS Gateway and the web dashboard. Each step shows what differs between 26.04 and 24.04. We rebuilt both clusters from scratch in November 2026 on Google Cloud, a Ceph Ubuntu 26.04 cluster and a 24.04 one, both on Ceph Tentacle 20.2.5, and checked an Ubuntu 26.10 client against them.

How the cluster fits together

All three nodes run the same building blocks. Cephadm decides where the extra daemons land, and the diagram shows the placement it chose in our lab:

Ceph cluster architecture diagram: ceph01 10.0.1.11, ceph02 10.0.1.12 and ceph03 10.0.1.13 each run a monitor and one OSD on one data disk; clients get the map on 3300/6789, metadata from the active MDS on ceph03, data straight from the OSDs on 6800-7568, S3 through RGW 8080 on ceph01 and ceph02, dashboard on ceph01:8443

Clients ask a monitor for the cluster map once, then read and write straight to the OSDs. Data never funnels through one node. CephFS metadata goes through the active MDS, and S3 traffic goes through RGW. With three monitors and three copies of every object, the cluster keeps quorum and keeps serving I/O when any one node dies. The drill at the end of this guide proves it.

HostIPDaemons placed by cephadm
ceph0110.0.1.11mon, mgr (active), osd.2, mds (standby), rgw, Prometheus, Grafana, Alertmanager
ceph0210.0.1.12mon, mgr (standby), osd.1, rgw
ceph0310.0.1.13mon, osd.0, mds (active)

The two MDS daemons swap roles on failover, so expect the active one on a different host after a node goes down. Every node also runs crash, node-exporter and ceph-exporter.

What you need to deploy Ceph on Ubuntu

Cephadm runs every Ceph daemon in a container, so the host list is short:

  • Three Ubuntu 26.04 or 24.04 servers
  • A sudo user that can SSH between them
  • One empty disk per node for the OSD
  • Podman, LVM2, Python 3 and working time sync

Size the cluster from the workload, not from our lab. Each OSD targets 4 GiB of RAM by default (osd_memory_target), monitors aim for 2 GiB (mon_memory_target), and the monitoring stack adds Prometheus, Grafana and Alertmanager on the first node. Raw disk is your data times three, plus headroom: Ceph warns at 85% full and stops writes at 95%. In production, run identical nodes on a 10 GbE or faster network, because recovery runs at the pace of the slowest member. The OS disk on ceph01 held 5.9 GB after the full deploy, container images included, so 50 GB leaves room for logs and upgrades.

Our lab nodes were Google Cloud e2-standard-2 instances: 2 vCPUs, 8 GB RAM, a 50 GB OS disk and a 40 GB data disk that Ubuntu saw as /dev/sdb. That’s a floor for following along, not a production recommendation.

The two Ubuntu releases behave differently in a handful of places. The table sums up what we measured, so you can skip the rows that don’t apply to your release.

ItemUbuntu 26.04Ubuntu 24.04
cephadm sourceUbuntu archive (20.2.0 package) plus python3-ceph-commondownload.ceph.com Tentacle repo (20.2.5)
Ceph repo for the codenamenone, resolute has no Release filenoble available
Host ceph CLI on new keysfails to parse the keyring, use cephadm shellworks with the Tentacle repo packages
Kernel CephFS and RBD on new keysworks (kernel 7.0)fails on stock 6.8, works on a 7.0 kernel
Podman version5.7.04.9.3
AWS CLI for S3 testsapt install awsclisnap install aws-cli --classic

What about Ubuntu 26.10? We kept the servers on the two LTS releases, since a storage cluster should not sit on a nine-month release. As a client, though, 26.10 is the easy case: its archive ceph-common already carries the key fix, and plain sudo ceph -s from a 26.10 machine reached the 26.04 cluster without cephadm shell:

ceph version 20.2.4 (7f793731f1b39eb4f465e960113d2363c311b964) tentacle (stable)

That build is what fixes the “Malformed input” error covered further down for 26.04.

Prepare every node

Run this section on all three nodes. The variables hold the only values you’ll need to change, so swap in your own IPs and subnet before you paste them.

export CEPH01_IP="10.0.1.11"
export CEPH02_IP="10.0.1.12"
export CEPH03_IP="10.0.1.13"
export CEPH_NET="10.0.1.0/24"

They last for the current shell only, so re-run the block after you reconnect. Cephadm requires the real hostname of each host to match the name you register it under. Set it now, using ceph02 and ceph03 on the other two nodes:

sudo hostnamectl set-hostname ceph01

Then make every node resolve the others by short name, because cephadm and the monitors refer to hosts by the names you register.

echo "${CEPH01_IP} ceph01
${CEPH02_IP} ceph02
${CEPH03_IP} ceph03" | sudo tee -a /etc/hosts

On cloud images where cloud-init manages /etc/hosts (manage_etc_hosts: true), put these entries in the cloud-init template too, or a reboot wipes them. Install Podman and LVM2. Both Ubuntu releases already ship Python 3 and a time sync service that cephadm accepts:

sudo apt update
sudo apt install -y podman lvm2

Confirm the data disk is empty. Cephadm only uses a disk with no partitions, no filesystem and no LVM signature. On Google Cloud and most SCSI setups it shows up as /dev/sdb, while a Proxmox or KVM guest with VirtIO disks calls it /dev/vdb. Substitute your own device name:

lsblk -f /dev/sdb

An empty disk prints a single line with no FSTYPE, no label and no mount point.

Install cephadm on Ubuntu 26.04 or 24.04

Do this on ceph01 only. The other nodes get their daemons over SSH.

Ubuntu 26.04

The Ubuntu archive carries a Tentacle build of cephadm. Install it together with python3-ceph-common, and skip the recommended packages, otherwise apt also pulls in Docker next to Podman:

sudo apt install -y --no-install-recommends cephadm python3-ceph-common

Do not add the download.ceph.com repo on 26.04. It still has no build for this codename (the Tentacle repo lists bookworm, jammy and noble only), and apt stops with:

E: The repository 'https://download.ceph.com/debian-tentacle resolute Release' does not have a Release file.

Check that cephadm runs before you go further.

sudo cephadm version

The archive package reports its own version oddly.

cephadm version UNKNOWN

That’s harmless. The cluster version comes from the container image, and the bootstrap prints it.

Error: “ModuleNotFoundError: No module named ‘ceph'” from cephadm

Install cephadm on its own, the way most guides show, and the first call dies with a Python traceback. The current archive package (20.2.0-0ubuntu2.1) imports ceph.cephadm.images from python3-ceph-common, but declares only lvm2 and python3 as dependencies, so a clean server never gets the module:

Ceph Ubuntu 26.04 install: cephadm from the archive failing with ModuleNotFoundError No module named ceph, fixed by installing python3-ceph-common

Adding python3-ceph-common fixes it with no other changes. It’s only the Python library, not the ceph command, so it doesn’t bring back the keyring problem described below.

Ubuntu 24.04

The 24.04 archive still ships cephadm from the older Squid release, which would bootstrap an older cluster than the one in this guide. Add the Tentacle repository first so you get the matching orchestrator.

curl -fsSL https://download.ceph.com/keys/release.asc | sudo gpg --dearmor -o /usr/share/keyrings/ceph.gpg
echo "deb [signed-by=/usr/share/keyrings/ceph.gpg] https://download.ceph.com/debian-tentacle/ $(. /etc/os-release; echo $VERSION_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ceph.list
sudo apt update
sudo apt install -y --no-install-recommends cephadm ceph-common

Check what you’ve got.

sudo cephadm version

The Tentacle build answers with its full version string.

cephadm version 20.2.5 (ed27c686770872022f4c1de04f6b0ac5d5384ded) tentacle (stable)

If you see a Squid version here instead, apt picked the archive package. Run apt policy cephadm and check that the download.ceph.com entry wins.

Bootstrap the first monitor

Bootstrap creates the cluster on ceph01: one monitor, one manager, the dashboard and the monitoring stack. It pulls the quay.io/ceph/ceph:v20 image, so both Ubuntu releases end up on the same Ceph build:

sudo cephadm bootstrap --mon-ip "${CEPH01_IP}"

It took 1 minute 55 seconds on 26.04 and 1 minute 44 seconds on 24.04. The first lines are the host check, and the end prints the dashboard login:

Verifying podman|docker is present...
Verifying lvm2 is present...
Verifying time synchronization is in place...
Unit chrony.service is enabled and running
Repeating the final host check...
podman (/usr/bin/podman) version 5.7.0 is present
systemctl is present
lvcreate is present
Unit chrony.service is enabled and running
Host looks OK
...
Pulling container image quay.io/ceph/ceph:v20...
Ceph version: ceph version 20.2.5 (ed27c686770872022f4c1de04f6b0ac5d5384ded) tentacle (stable)
...
Ceph Dashboard is now available at:

	     URL: https://ceph01:8443/
	    User: admin
	Password: <random-password>

...
Bootstrap complete.

Save that password for later. The cluster network is optional: pass --cluster-network with a second subnet if your nodes have a dedicated replication NIC. Without it, replication shares the public network, which is what our lab did.

Error: “mgr not available after 15 tries” on Google Cloud

Our first 26.04 bootstrap on Google Cloud hung at mgr not available, waiting (1/15) and gave up with this error. Compute Engine hands each VM a /32 address, so cephadm saw no real subnet and stored the gateway’s /32 as public_network. The mgr then logged unable to find any IP address in networks '10.0.1.1/32' and never started. Passing the subnet in a config file does not help either: bootstrap refuses with None of the public CIDR network(s) {'10.0.1.0/24'} ... is configured locally.

What worked was giving each node an on-link route for the subnet, plus a /32 route to each peer through the VPC gateway so traffic still takes the path Google expects. On ceph01 (swap the peer IPs on the other nodes; 10.0.1.1 stands for your subnet’s gateway):

sudo ip route add "${CEPH_NET}" dev ens4 scope link src "${CEPH01_IP}"
sudo ip route add "${CEPH02_IP}/32" via 10.0.1.1 dev ens4
sudo ip route add "${CEPH03_IP}/32" via 10.0.1.1 dev ens4

Remove the failed attempt with the cephadm rm-cluster --force --fsid <fsid> line the error prints, then bootstrap again. It now finds both networks and stores 10.0.1.0/24,10.0.1.1/32, so set the clean value once the shell aliases below are in place:

ceph config set global public_network "${CEPH_NET}"

These routes don’t survive a reboot, which we found out when a restarted node dropped them. A netplan drop-in makes them permanent. This is the file for ceph03, where the two peers are the other nodes; list your own subnet, node IP and peers:

sudo vim /etc/netplan/60-ceph-routes.yaml

The cloud-init file already names the interface ens4, so netplan merges these routes into it:

network:
  version: 2
  ethernets:
    ens4:
      routes:
        - to: 10.0.1.0/24
          scope: link
          from: 10.0.1.13
        - to: 10.0.1.11/32
          via: 10.0.1.1
          on-link: true
        - to: 10.0.1.12/32
          via: 10.0.1.1
          on-link: true

Netplan warns about a world-readable file, so lock it down and apply it:

sudo chmod 600 /etc/netplan/60-ceph-routes.yaml
sudo netplan apply
ip route

We rebooted ceph03 with this file in place and the routes came back on their own:

default via 10.0.1.1 dev ens4 proto dhcp src 10.0.1.13 metric 100
10.0.1.0/24 dev ens4 proto static scope link src 10.0.1.13
10.0.1.1 dev ens4 proto dhcp scope link src 10.0.1.13 metric 100
10.0.1.11 via 10.0.1.1 dev ens4 proto static onlink
10.0.1.12 via 10.0.1.1 dev ens4 proto static onlink
169.254.169.254 via 10.0.1.1 dev ens4 proto dhcp src 10.0.1.13 metric 100

We kept on-link: true on the peer routes so the kernel accepts the gateway even if netplan adds them before DHCP has installed its own gateway route. If your clients run on separate VMs in the same subnet, add a /32 route for each client to every node as well; we did that for our 26.10 client. Servers on a normal LAN or a Proxmox bridge never need any of this.

Run ceph commands through cephadm shell

New clusters create every key with the aes256k cipher, added to fix CVE-2025-30156, and refuse the old cipher outright. Clients without that fix (anything before Tentacle 20.2.4 or Squid 19.2.6) can’t read those keys, and you’ll hit the error below the first time you run ceph on the host. On Ubuntu 26.04 that includes ceph-common from the archive, which is why the install step above leaves it out.

Error: “auth: error parsing file /etc/ceph/ceph.client.admin.keyring … Malformed input”

We installed the archive ceph-common on ceph01 anyway to show what happens. The first sudo ceph -s fails on the admin keyring, while the client inside the Ceph container reads the same cluster without trouble:

Ubuntu 26.04 archive ceph-common failing with Malformed input on the aes256k admin keyring, next to HEALTH_OK from sudo cephadm shell -- ceph -s

The container client always matches the cluster, so that’s the fix. Point the usual command names at it and you can type commands as if the client were installed locally.

alias ceph='sudo cephadm shell -- ceph'
alias rbd='sudo cephadm shell -- rbd'
alias radosgw-admin='sudo cephadm shell -- radosgw-admin'

Each call starts a short-lived container, so expect a few seconds per command and a few log lines on stderr. Add the three lines to ~/.bash_aliases to keep them after you log out. The aliases also work on 24.04, where the Tentacle ceph-common reads the new keys fine, and using them on both releases keeps the commands below identical. One catch: cephadm shell reads stdin, so a script that loops over these aliases needs < /dev/null on its own invocation or the first call swallows the rest of the script. Check the cluster:

ceph -s

You’ll see one monitor, one manager and no OSDs yet.

  cluster:
    id:     07b0a610-e680-11f1-9159-42010a840005
    health: HEALTH_WARN
            OSD count 0 < osd_pool_default_size 3

  services:
    mon: 1 daemons, quorum ceph01 (age 110s) [leader: ceph01]
    mgr: ceph01.dbucce(active, since 64s)
    osd: 0 osds: 0 up, 0 in

  data:
    pools:   0 pools, 0 pgs
    objects: 0 objects, 0 B
    usage:   0 B used, 0 B / 0 B avail
    pgs:

The fsid on the id: line is your cluster’s identity. The systemd units (ceph-<fsid>@...) and the data directory under /var/lib/ceph/ carry it, and you’ll need it for cephadm rm-cluster.

HEALTH_WARN: OSD count 0 < osd_pool_default_size 3

This warning is expected at this point and needs no fix. Pools keep three copies by default (osd_pool_default_size 3), and the cluster has zero OSDs to hold them. It clears by itself once the OSD section below gives the cluster three OSDs on three hosts. Don’t lower the pool size to silence it on a three-node cluster; that throws away the redundancy you are building.

Add the other two hosts

Cephadm manages the other nodes as root over SSH, with the key it created during bootstrap. Ubuntu blocks root password logins, so copy the key with your sudo user instead of ssh-copy-id root@:

for host in ceph02 ceph03; do
  scp /etc/ceph/ceph.pub ${USER}@${host}: && ssh -t ${USER}@${host} "sudo install -d -m 700 /root/.ssh && sudo tee -a /root/.ssh/authorized_keys < ceph.pub && rm ceph.pub"
done

The loop needs your user on ceph01 to reach the other nodes by SSH key. Our cloud VMs only trusted a key on the admin laptop, so the loop failed with Permission denied (publickey). If that happens to you, relay the key through the laptop instead:

scp ${USER}@ceph01:/etc/ceph/ceph.pub .
for host in ceph02 ceph03; do
  ssh ${USER}@${host} "sudo install -d -m 700 /root/.ssh && sudo tee -a /root/.ssh/authorized_keys" < ceph.pub
done

The relay sends the key on stdin, so it needs passwordless sudo on the nodes (the default on cloud images); use your remote login name if it differs from your laptop user. Either way, tee prints the key back as it stores it. Now register both hosts with the orchestrator:

ceph orch host add ceph02 "${CEPH02_IP}"
ceph orch host add ceph03 "${CEPH03_IP}"

Only ceph01 carries the _admin label so far, which means only that host gets /etc/ceph/ceph.conf and the admin keyring. If ceph01 dies, you lose your management host along with it. Label a second node so the cluster can still be managed from there:

ceph orch host label add ceph02 _admin
ceph orch host ls

All three hosts are in, two of them with admin rights.

Added label _admin to host ceph02
HOST    ADDR       LABELS  STATUS
ceph01  10.0.1.11  _admin
ceph02  10.0.1.12  _admin
ceph03  10.0.1.13
3 hosts in cluster

Cephadm now deploys a monitor on each host and a standby manager on one of them. That took three minutes on both labs, so don’t worry if you check the quorum too early and see one monitor.

ceph mon stat

All three monitors should be in quorum. If one is missing, it’s usually still pulling the image, so give it another minute.

e3: 3 mons at {ceph01=[v2:10.0.1.11:3300/0,v1:10.0.1.11:6789/0],ceph02=[v2:10.0.1.12:3300/0,v1:10.0.1.12:6789/0],ceph03=[v2:10.0.1.13:3300/0,v1:10.0.1.13:6789/0]} removed_ranks: {} disallowed_leaders: {}, election epoch 14, leader 0 ceph01, quorum 0,1,2 ceph01,ceph02,ceph03

Each monitor listens on both 3300 (msgr2) and 6789 (the legacy protocol), which is why the firewall section later opens both.

Create the OSDs

Ask the orchestrator which disks it can use.

ceph orch device ls

Each node offers its empty 40 GB disk. Google’s persistent disks report as ssd, so you won’t see the hdd class a spinning disk gets.

HOST    PATH      TYPE  DEVICE ID                          SIZE  AVAILABLE  REFRESHED  REJECT REASONS
ceph01  /dev/sdb  ssd   PersistentDisk_persistent-disk-1  40.0G  Yes        15m ago
ceph02  /dev/sdb  ssd   PersistentDisk_persistent-disk-1  40.0G  Yes        2m ago
ceph03  /dev/sdb  ssd   PersistentDisk_persistent-disk-1  40.0G  Yes        49s ago

A disk listed as unavailable usually has an old partition table or LVM signature. Clear it with ceph orch device zap ceph02 /dev/sdb --force (this destroys the data on it). Then turn every available disk into an OSD:

ceph orch apply osd --all-available-devices

This is a standing rule, not a one-off. Any blank disk you add to these hosts later becomes an OSD on its own. If you need control over which disks become OSDs (a separate DB device on NVMe, say), write an OSD service spec instead. The three OSDs were up within a minute on both labs:

ceph osd tree

You want one OSD per host, all up. That layout matters because the default CRUSH rule puts each copy on a different host.

ID  CLASS  WEIGHT   TYPE NAME        STATUS  REWEIGHT  PRI-AFF
-1         0.11728  root default
-7         0.03909      host ceph01
 2    ssd  0.03909          osd.2        up   1.00000  1.00000
-5         0.03909      host ceph02
 1    ssd  0.03909          osd.1        up   1.00000  1.00000
-3         0.03909      host ceph03
 0    ssd  0.03909          osd.0        up   1.00000  1.00000

With three OSDs on three hosts, ceph -s now reports HEALTH_OK. Run ceph orch device ls again and the same disks read No with “Has a FileSystem, Insufficient space (<10 extents) on vgs, LVM detected”, which is how a disk in use looks, not a fault. You don’t need to pick placement group counts: the PG autoscaler is on for every pool.

Create a CephFS file system

One command creates the data and metadata pools and deploys two MDS daemons, so you don’t have to size pools by hand.

ceph fs volume create cephfs

Give it a minute before you check it.

ceph fs status

One MDS is active and the other waits on standby.

cephfs - 0 clients
======
RANK  STATE           MDS              ACTIVITY     DNS    INOS   DIRS   CAPS
 0    active  cephfs.ceph03.pvhyal  Reqs:    0 /s    10     13     12      0
       POOL           TYPE     USED  AVAIL
cephfs.cephfs.meta  metadata   155k  37.9G
cephfs.cephfs.data    data       0   37.9G
    STANDBY MDS
cephfs.ceph01.xueneo
MDS version: ceph version 20.2.5 (ed27c686770872022f4c1de04f6b0ac5d5384ded) tentacle (stable - RelWithDebInfo)

If you script this, wait on ceph mds stat rather than grepping ceph fs status: the latter colours its output, so a plain grep " active " never matches. Don’t mount with the admin key. Create a client that can only read and write this file system, and save its secret to a file:

ceph fs authorize cephfs client.fsuser / rw
ceph auth get-key client.fsuser > fsuser.secret
chmod 600 fsuser.secret

Copy fsuser.secret to the client machine with scp. Our lab mounted from a cluster node to save a VM, but in production keep kernel CephFS and RBD clients off the OSD hosts, where memory pressure can deadlock them. On the client, export the same four variables from the preparation step, then mount with the kernel driver:

sudo mkdir -p /mnt/cephfs
sudo mount -t ceph "${CEPH01_IP}:6789,${CEPH02_IP}:6789,${CEPH03_IP}:6789:/" /mnt/cephfs -o name=fsuser,secret="$(cat fsuser.secret)",mds_namespace=cephfs
df -h /mnt/cephfs

The kernel client needs no packages, so this works on a bare Ubuntu 26.04 host. Use mds_namespace= here: without the mount.ceph helper the kernel rejects fs= with ceph: Unknown parameter 'fs'. The mount shows the full pool size:

Filesystem                                       Size  Used Avail Use% Mounted on
10.0.1.11:6789,10.0.1.12:6789,10.0.1.13:6789:/   38G     0   38G   0% /mnt/cephfs

The same command worked on our 24.04 nodes, but only because Google’s 24.04 image boots a 7.0 kernel (7.0.0-1017-gcp). A 24.04 server on the stock kernel is a different story.

Error: “adding ceph secret key to kernel failed: Invalid argument” on Ubuntu 24.04

We booted one 24.04 node into the stock 6.8.0-151-generic kernel and ran the same mount, then an RBD map. Both fail, and the kernel log gives the reason:

Ubuntu 24.04 kernel 6.8 CephFS mount failing with adding ceph secret key to kernel failed Invalid argument, rbd map error 22, dmesg libceph secret too big 32, and ceph-fuse mounting fine

libceph: secret too big 32 means kernel 6.8 predates the aes256k key type, which arrived in kernel 7.0. With the Tentacle mount.ceph helper installed the mount reports couldn't append secret option: -22; in an earlier lab without the helper, the same key failure showed up as mount(2) system call failed: Unknown error 524 and libceph: Failed to parse secret: -524. There are two fixes. The cleaner one is the 24.04 hardware enablement kernel, which is now 7.0:

sudo apt install -y linux-generic-hwe-24.04
sudo reboot

After the reboot, uname -r should report a 7.0 kernel. We didn’t rerun the mount on the HWE kernel in this rebuild, but the identical command worked on our other 24.04 nodes, which boot Google’s 7.0 kernel, and kernel key support starts at 7.0. If you can’t change the kernel, use the FUSE client from the Tentacle repository, which the screenshot shows mounting on that very 6.8 node. Add that repo with the same commands as in the 24.04 install section, then:

sudo apt install -y ceph-fuse

The FUSE client reads /etc/ceph, so give it a minimal config and the client key. Generate both on ceph01:

ceph config generate-minimal-conf > ceph.conf
ceph auth get client.fsuser > ceph.client.fsuser.keyring

Installing ceph-fuse doesn’t create /etc/ceph. On the client, create it, copy the two files in from your home directory after you scp them over, lock down the keyring and mount:

sudo mkdir -p /etc/ceph
sudo cp ceph.conf ceph.client.fsuser.keyring /etc/ceph/
sudo chmod 600 /etc/ceph/ceph.client.fsuser.keyring
sudo mkdir -p /mnt/cephfs
sudo ceph-fuse -n client.fsuser --client_fs=cephfs /mnt/cephfs

Right after an MDS failover, the first attempt can fail with probably no MDS server is up?, so retry once the standby is active. The mount appears in df as ceph-fuse with the same 38G.

Create an RBD block device

RBD images behave like disks, which is what VM platforms and the Kubernetes RBD driver consume. Create a pool, initialise it and add a 10 GB image:

ceph osd pool create rbd
rbd pool init rbd
rbd create --size 10G rbd/disk01
rbd info rbd/disk01

The image uses the default feature set. The kernel client on both releases mapped it with these features, so you don’t need to strip any of them.

rbd image 'disk01':
	size 10 GiB in 2560 objects
	order 22 (4 MiB objects)
	snapshot_count: 0
	id: 3b283ac208d5
	block_name_prefix: rbd_data.3b283ac208d5
	format: 2
	features: layering, exclusive-lock, object-map, fast-diff, deep-flatten
	op_features:
	flags:
	create_timestamp: Sun Nov 22 14:51:22 2026
	access_timestamp: Sun Nov 22 14:51:22 2026
	modify_timestamp: Sun Nov 22 14:51:22 2026

Create a client limited to that pool, then save its keyring and its bare key. You need both because the 24.04 and 26.04 map methods below read different formats.

ceph auth get-or-create client.rbduser mon 'profile rbd' osd 'profile rbd pool=rbd' > ceph.client.rbduser.keyring
ceph auth get-key client.rbduser > rbduser.secret
chmod 600 ceph.client.rbduser.keyring rbduser.secret

Treat both files like passwords. Anyone holding them can read and overwrite every image in the rbd pool.

Map the image on Ubuntu 24.04

The rbd tool and the kernel both need to understand the new key. On 24.04 that means a 7.0 kernel (HWE, or the image’s own as on Google Cloud) plus ceph-common from the Tentacle repo (add it as in the 24.04 install section):

sudo apt install -y --no-install-recommends ceph-common

Generate a config on ceph01 with ceph config generate-minimal-conf > ceph.conf if you skipped the FUSE step, then copy ceph.conf and ceph.client.rbduser.keyring to the client:

sudo mkdir -p /etc/ceph
sudo cp ceph.conf ceph.client.rbduser.keyring /etc/ceph/
sudo chmod 600 /etc/ceph/ceph.client.rbduser.keyring

Now you can map the image.

sudo rbd map rbd/disk01 --id rbduser

It prints /dev/rbd0. On the stock 6.8 kernel the same command fails with rbd: failed to add secret 'client.rbduser' to kernel and rbd: map failed: (22) Invalid argument, as the screenshot in the CephFS section shows.

Map the image on Ubuntu 26.04

Here the kernel is fine, but the rbd tool from the archive ceph-common can’t read the keyring and fails with the same “Malformed input” error. The kernel sysfs interface doesn’t need the tool at all. Copy rbduser.secret to the client, export the four IP variables, and map the image:

sudo modprobe rbd
echo "${CEPH01_IP}:6789,${CEPH02_IP}:6789,${CEPH03_IP}:6789 name=rbduser,secret=$(cat rbduser.secret) rbd disk01" | sudo tee /sys/bus/rbd/add_single_major > /dev/null
ls -l /dev/rbd0

Write to add_single_major, not add. Current kernels load the rbd module in single-major mode, and the plain add file returns “Invalid argument”. Once the device exists, the steps are the same on both releases:

sudo mkfs.ext4 /dev/rbd0
sudo mkdir -p /mnt/rbd
sudo mount /dev/rbd0 /mnt/rbd
df -h /mnt/rbd

The new filesystem is ready.

Filesystem      Size  Used Avail Use% Mounted on
/dev/rbd0       9.8G  2.1M  9.3G   1% /mnt/rbd

To detach it on 26.04, unmount and write the device ID back to sysfs: echo 0 | sudo tee /sys/bus/rbd/remove_single_major. On 24.04 use sudo rbd unmap /dev/rbd0.

Deploy RGW for S3 object storage

The RADOS Gateway speaks the S3 API. Run two instances on port 8080 so that one node can fail:

ceph orch apply rgw s3 --placement="2 ceph01 ceph02" --port=8080

Both daemons were running 21 seconds later on 26.04 and 25 seconds later on 24.04. You can confirm it from the orchestrator.

ceph orch ls --service-type rgw

The service shows two of two running. If it sticks at 1/2, check that port 8080 is free on both hosts, because a second web server there stops the gateway from binding.

NAME    PORTS   RUNNING  REFRESHED  AGE  PLACEMENT
rgw.s3  ?:8080      2/2  5s ago     8s   ceph01;ceph02;count:2

A single-site gateway needs no realm or zone setup, so you can go straight to creating an S3 user.

radosgw-admin user create --uid=s3admin --display-name="S3 admin"

The JSON output contains the new access_key and secret_key. On the S3 client, export the IP variables from the preparation step plus both keys, then create a bucket and upload a file. Install the AWS CLI with sudo apt install -y awscli on 26.04, or sudo snap install aws-cli --classic on 24.04, where apt has no package:

export AWS_ACCESS_KEY_ID="your-access-key"
export AWS_SECRET_ACCESS_KEY="your-secret-key"
export AWS_DEFAULT_REGION="us-east-1"
aws --endpoint-url "http://${CEPH01_IP}:8080" s3 mb s3://backups
echo hello-ceph > /tmp/hello.txt
aws --endpoint-url "http://${CEPH02_IP}:8080" s3 cp /tmp/hello.txt s3://backups/
aws --endpoint-url "http://${CEPH01_IP}:8080" s3 ls s3://backups/

The object went in through one gateway and lists through the other.

make_bucket: backups
upload: ../../tmp/hello.txt to s3://backups/hello.txt
2026-11-22 14:55:03         11 hello.txt

Clients only move between the two gateways if you put a load balancer or a keepalived VIP in front of them. The AWS CLI guide for the Ceph Object Gateway covers profiles and more S3 operations.

Log in to the Ceph dashboard

The dashboard runs inside the active manager, so its address moves if the manager fails over. Ask the cluster where it is right now.

ceph mgr services

The output lists the dashboard and the Prometheus metrics endpoint.

{
    "dashboard": "https://10.0.1.11:8443/",
    "prometheus": "http://10.0.1.11:9283/"
}

Replace the bootstrap password with your own. read -rs prompts without echoing, and -i - reads the value from stdin, so it lands in neither a file nor your shell history. The dashboard password policy rejects short or dictionary passwords, so pick a long one:

read -rsp 'New dashboard password: ' DASH_PASS; echo
echo "${DASH_PASS}" | ceph dashboard ac-user-set-password admin -i -
unset DASH_PASS

Open https://ceph01:8443 and accept the self-signed certificate. Our nodes had no public dashboard port, so we reached it from a laptop through an SSH tunnel to ceph01 (ssh -N -L 18443:127.0.0.1:8443 -L 13000:127.0.0.1:3000 ${USER}@ceph01, then https://127.0.0.1:18443, with Grafana on https://127.0.0.1:13000). The first login offers to add storage. Skip it and click Overview:

Ceph Dashboard overview on Ubuntu 26.04 showing Ceph 20.2.5 Tentacle, the cephadm orchestrator, 3 hosts, 3 monitors and 3 OSDs

The one alert, CephNodeDiskspaceWarning, came from Prometheus. It projects recent disk growth days ahead, and the image pulls on a brand new OS disk were enough to trip it even at 13% used. It clears once growth flattens. Cluster > Hosts lists the three nodes, with the _admin label on the two hosts we gave it:

Ceph Dashboard Hosts page with ceph01, ceph02 and ceph03, the _admin label on ceph01 and ceph02, and 90 GiB raw capacity per host

Services sits inside the collapsed Administration menu, the one entry people miss. It shows every service cephadm deployed, with placement and ports, so it’s the quickest place to see what bootstrap added on top of the core daemons:

Ceph Dashboard Administration menu with Services open, listing the mds, mgr, mon, osd and monitoring services cephadm deployed

The Grafana panels inside the dashboard load straight from port 3000 on ceph01, with a separate Grafana self-signed certificate. Open https://ceph01:3000 once and accept it, or the panels stay blank. Behind a tunnel your browser can’t reach that address. You can point the dashboard at the forwarded port with ceph dashboard set-grafana-frontend-api-url https://127.0.0.1:13000, but the setting is cluster-wide and cephadm never resets it, so set it back to https://ceph01:3000 when you’re done or the panels go blank for everyone else. For long-term metrics outside the dashboard, see monitoring Ceph with Prometheus and Grafana.

Open the firewall

UFW is inactive on a fresh Ubuntu install. If you turn it on, the nodes need these ports open to each other and to your clients:

ServicePort(s)Who connects
Monitor (msgr2 and legacy)3300, 6789all daemons and clients
OSD, MGR, MDS6800-7568daemons and clients
Dashboard, mgr service discovery, mgr metrics8443, 8765, 9283admins, Prometheus
RGW8080S3 clients
Grafana, Prometheus, Alertmanager3000, 9095, 9093, 9094admins, the dashboard
node-exporter, ceph-exporter9100, 9926Prometheus on ceph01

The OSD range ends at 7568 (ms_bind_port_max), not the 7300 that older guides list. Run this on all three nodes. The block is wrapped in an if so that nothing runs when CEPH_NET is empty (after a reconnect, for example). Without it, UFW would come up with only SSH open and split the cluster. ufw allow OpenSSH opens port 22 only, so if sshd listens on another port, open that port first (for example sudo ufw allow 2222/tcp) before this block or you lock yourself out:

if [ -z "${CEPH_NET}" ]; then echo "Export CEPH_NET first"; else
sudo ufw allow OpenSSH
sudo ufw allow from "${CEPH_NET}" to any port 3300,6789 proto tcp comment "ceph mon"
sudo ufw allow from "${CEPH_NET}" to any port 6800:7568 proto tcp comment "ceph osd mgr mds"
sudo ufw allow from "${CEPH_NET}" to any port 8443,8765,9283 proto tcp comment "ceph mgr"
sudo ufw allow from "${CEPH_NET}" to any port 8080 proto tcp comment "ceph rgw"
sudo ufw allow from "${CEPH_NET}" to any port 3000,9093,9094,9095,9100,9926 proto tcp comment "ceph monitoring"
sudo ufw --force enable
fi

These rules trust the whole cluster subnet. If your clients or admin workstation sit on another network, you’ll need rules for that network too, or mounts from it hang once UFW is on:

  • 8443 and 3000 for the dashboard and its Grafana panels
  • 3300, 6789 and 6800:7568 for CephFS and RBD clients
  • 8080 for S3 clients

With UFW active on all three 26.04 nodes, the cluster stayed at HEALTH_OK. The Rocky Linux and AlmaLinux version of this guide opens the same ports with firewalld.

Failover drill: pull the plug on one node

A three-node cluster is only worth the hardware if it survives losing a node. On the 26.04 cluster we cut power to ceph03 with a kernel SysRq power-off, no clean shutdown. That node held the active MDS, a monitor and osd.0, while ceph02 kept writing to CephFS and to the RBD image every half second. Here is the cluster a minute and a half in:

ceph -s with ceph03 powered off: 1/3 mons down, 1 osds down, 33.333% objects degraded and every PG active+undersized

Every PG is active+undersized, a third of the objects are degraded, and nothing went read-only. The cluster log and the two writers gave this timeline:

Time after power-offEvent
+14 sMonitors re-form quorum on ceph01 and ceph02
+27 sosd.0 marked down (2 reporters after the 20 s heartbeat grace)
+28 sThe stalled RBD write completes (28 s pause)
+33 sAll placement groups active again
+78 sStandby MDS on ceph01 takes over rank 0
+81 sThe stalled CephFS write completes (81 s pause)
power-on +75 sBack to HEALTH_OK, the old MDS rejoins as standby

The cluster cannot rebuild the third copy while only two hosts remain, so the data stays degraded until the node returns. After 10 minutes (mon_osd_down_out_interval) the OSD is marked out, which changes nothing on a three-host cluster but triggers rebalancing on a bigger one. When we powered ceph03 back on, recovery finished in seconds because only the writes made during the outage needed copying.

Two lessons from the timeline. Block storage rode through with a 28 second pause, but CephFS clients hung for 81 seconds because the MDS failover runs well behind the OSD failover. Size application timeouts for the slower one: a 30 second timeout would have fired here, a 120 second one would not. And a second failure while the data is degraded is the one that hurts. A fourth host gives recovery somewhere to rebuild the third copy, which is why we wouldn’t run production on fewer than four. The homelab Ceph build works through the hardware side, and Ceph built into Proxmox VE is the shortcut if your nodes also run VMs. The cephadm installation reference covers the bootstrap flags this guide did not need.

Keep reading

Upgrade Ubuntu 24.04 to Ubuntu 26.04 LTS (Step by Step) Ubuntu Upgrade Ubuntu 24.04 to Ubuntu 26.04 LTS (Step by Step) UFW Firewall Commands with Examples on Ubuntu 26.04 / 24.04 Security UFW Firewall Commands with Examples on Ubuntu 26.04 / 24.04 Install Samba on Debian 13 / 12 and Create a File Share Debian Install Samba on Debian 13 / 12 and Create a File Share Time Machine SMB Backups to a Linux NAS on macOS 27 macos Time Machine SMB Backups to a Linux NAS on macOS 27 Mac System Data Taking Up Space? Find and Clear It macos Mac System Data Taking Up Space? Find and Clear It How To Install FreeScout Help Desk on Debian | Ubuntu Debian How To Install FreeScout Help Desk on Debian | Ubuntu

5 thoughts on “Deploy Ceph Storage Cluster on Ubuntu 26.04 / 24.04”

  1. Question for you …

    Can I perform this same installation in Centos 7 ? Also in your ceph status command, I can’t see mds …but you installed that …it’s not appearing in status … anything needs to be done specifically?

    Reply
    • Yes, you can install Ceph storage on CentOS 7. However on our site, we have a guide for CentOS 8.
      The mds is a Ceph Metadata Server, in the guide, we have used it to create the three metadata servers mon01 mon02 & mon03.

      Reply
  2. thanks for your reply …but you know I need to use Ceph 13.2.2 with Centos …

    the other Centos 8 guide used Ceph 15, which will not work for me I hope …

    I am planning to install 1 st time Ceph 13.2.2 with Centos …

    Reply

Leave a Comment

Press ESC to close