Ceph Squid (v19) Installation on Ubuntu/Debian: Cephadm Guide

This guide will show you how to easily set up a modern Ceph storage cluster on Ubuntu or Debian using the official cephadm tool.

Ceph

Understanding Ceph Storage

Ubuntu/Debian

What is Ceph?

Ceph is a highly advanced software platform that transforms ordinary computer servers into a massive, single storage system. Instead of buying expensive, specialized storage hardware, you can use regular computers with standard hard drives or SSDs. Ceph groups all these drives together and presents them as one giant pool of storage that can hold a nearly limitless amount of data.

What makes Ceph special is its ability to protect your data automatically. When you save a file, Ceph chops it up into smaller pieces and saves copies of those pieces across different servers and drives. If a hard drive fails or a whole server goes offline, your data remains perfectly safe and accessible because Ceph can instantly rebuild the missing pieces from the other available copies in the network.

Finally, Ceph is extremely flexible because it provides three different ways to access your storage. You can use it as Block storage (acting like a virtual hard drive for your servers), File storage (acting like a shared folder for your network), or Object storage (acting like Amazon S3 for web applications). This makes it an ideal, all-in-one solution for almost any data storage need.

Prerequisites

  • Fresh Operating System: One or more servers running a clean installation of Ubuntu or Debian.
  • Empty Storage Drives: Completely raw, unformatted disks (no partitions or file systems) attached to your servers for Ceph to use as storage.
  • Root Privileges: Sudo or root access on all servers to run installation commands.
  • Internet Access: A stable connection to download the necessary Ceph packages and container images.
  • Time Synchronization: Accurate system time across all servers (we will install chrony for this).
  • Python and Containers: Python 3 and a container runtime like Podman or Docker (we will install these).

Step-by-Step Installation

1

Install Basic Requirements

Run on your primary node
Ceph relies on Python, a container engine, and strict time synchronization. Install these basic tools first:
BASH
sudo apt update
sudo apt install -y python3 podman chrony
2

Download the cephadm Script

Get the official deployment tool
Download the standalone cephadm tool directly from the official Ceph Squid repository and make it executable:
BASH
curl --silent --remote-name --location https://github.com/ceph/ceph/raw/squid/src/cephadm/cephadm
chmod +x cephadm
3

Add the Ceph Squid Repository

Crucial for version matching
This step ensures your operating system pulls the correct v19 Squid packages instead of older default versions. Add the repository and install the tool to your system:
BASH
sudo ./cephadm add-repo --release squid
sudo ./cephadm install
4

Bootstrap the First Node

Save your dashboard passwords
Initialize the cluster on your main server. Replace YOUR_NODE_IP with your server's actual IP address.
Bash
sudo cephadm bootstrap --mon-ip YOUR_NODE_IP
Important: When this command finishes, it will print a Ceph Dashboard URL, a username (admin), and an auto-generated password. Save this information immediately.
5

Install the Ceph CLI Tools:

Install the command-line tools using the cephadm wrapper so you can manage your cluster directly from the terminal.
BASH
sudo cephadm install ceph-common
Check that your cluster is running and healthy:
BASH
sudo ceph -s
6

Add More Servers (Optional)

Skip if using a single server
If you have multiple servers, you need to link them. Copy your primary node's SSH key to the new server, then tell Ceph to add it.
BASH
ssh-copy-id -f -i /etc/ceph/ceph.pub root@NEW_NODE_IP
sudo ceph orch host add NEW_NODE_HOSTNAME NEW_NODE_IP
7

Deploy Storage Drives (OSDs)

Requires empty, unformatted disks
Tell Ceph to scan all your connected servers and automatically turn any raw, empty disks into storage devices (OSDs).
BASH
sudo ceph orch apply osd --all-available-devices

Discover CTCservers Dedicated Server Locations

CTCservers servers are available around the world, providing diverse options for hosting websites. Each region offers unique advantages, making it easier to choose a location that best suits your specific hosting needs.