Ceph — Unified Distributed Storage at Scale
Ceph is a massively scalable software-defined storage platform that presents a single cluster as block, object, and file storage, powering private clouds and petabyte-scale backups.
Installation avec revue préalable
Cet actif nécessite une revue. Le prompt copié demande un dry-run, affiche les écritures, puis continue seulement après confirmation.
npx -y tokrepo@latest install 609469f1-38fa-11f1-9bc6-00163e2b0d79 --target codexDry-run d'abord, confirmez les écritures, puis lancez cette commande.
What it is
Ceph is the reference open-source distributed storage system, originally developed at UC Santa Cruz and now stewarded by the Ceph Foundation (Linux Foundation). It presents a single cluster as block storage (RBD), S3/Swift-compatible object storage (RGW), and POSIX file access (CephFS).
Ceph powers OpenStack, Rook on Kubernetes, and thousands of private clouds. It scales from three nodes to exabytes with no single point of failure, self-healing through replication or erasure coding.
How it saves time or tokens
Ceph unifies three storage interfaces in one cluster. Instead of managing separate systems for VM block devices, object storage, and shared filesystems, you deploy Ceph once and expose all three. The CRUSH algorithm distributes data pseudo-randomly across OSDs without a central metadata server, eliminating bottlenecks. Self-healing means that when a disk or node fails, Ceph automatically re-replicates data to maintain the configured redundancy level.
How to use
- Bootstrap a cluster with cephadm:
curl --silent --remote-name --location \
https://github.com/ceph/ceph/raw/main/src/cephadm/cephadm
chmod +x cephadm
./cephadm add-repo --release reef
./cephadm install
cephadm bootstrap --mon-ip 192.168.1.10
- Create a block device and mount it:
ceph osd pool create rbd 32
rbd create demo --size 1G --pool rbd
rbd map demo -p rbd
mkfs.ext4 /dev/rbd0 && mount /dev/rbd0 /mnt/demo
- Enable S3-compatible object storage:
ceph orch apply rgw mystore
# Access via S3 API at http://node:80
Example
Using Ceph RBD as persistent volumes in Kubernetes via Rook:
apiVersion: ceph.rook.io/v1
kind: CephCluster
metadata:
name: rook-ceph
namespace: rook-ceph
spec:
dataDirHostPath: /var/lib/rook
mon:
count: 3
storage:
useAllNodes: true
useAllDevices: true
---
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: ceph-block
provisioner: rook-ceph.rbd.csi.ceph.com
parameters:
pool: replicapool
clusterID: rook-ceph
reclaimPolicy: Delete
Related on TokRepo
- Self-hosted tools — More self-hosted infrastructure tools on TokRepo.
- DevOps tools — Browse infrastructure and storage tools.
Common pitfalls
- Running fewer than 3 monitor daemons risks losing quorum. Always deploy an odd number of monitors (3 or 5).
- Not sizing OSD journals on SSDs causes poor write performance. Place OSD journals on fast NVMe drives for HDD-backed clusters.
- Enabling erasure coding without understanding the recovery overhead. Erasure coding saves storage space but increases CPU usage during recovery compared to replication.
Questions fréquentes
Ceph provides block storage (RBD for VMs and databases), object storage (RGW with S3 and Swift API compatibility), and file storage (CephFS with POSIX compliance). All three use the same underlying RADOS cluster.
When an OSD (disk) fails, Ceph detects the failure within seconds and begins re-replicating the affected data to other OSDs. The cluster maintains the configured redundancy level automatically without operator intervention.
Yes. Rook is the CNCF project that deploys and manages Ceph on Kubernetes. It provides a Kubernetes operator that handles cluster lifecycle, storage provisioning, and health monitoring.
CRUSH (Controlled Replication Under Scalable Hashing) is Ceph's data distribution algorithm. It maps data to storage devices pseudo-randomly based on a cluster map, eliminating the need for a central metadata lookup service.
Minimum production deployment: 3 nodes, each with at least 1 OSD (disk), 1 monitor, and 1 manager daemon. 8GB RAM per OSD is recommended. SSDs for OSD journals significantly improve write performance.
Sources citées (3)
- Ceph GitHub— Ceph is the reference open-source distributed storage system
- Ceph Documentation— Ceph architecture and CRUSH algorithm
- Rook Documentation— Rook Ceph operator for Kubernetes
En lien sur TokRepo
Fil de discussion
Actifs similaires
Rook — Cloud-Native Storage Orchestrator for Kubernetes
Rook turns Ceph into a first-class Kubernetes citizen by deploying, configuring, and healing distributed block, file, and object storage through an operator and a family of CRDs.
GreptimeDB — Unified Time-Series Database in Rust
GreptimeDB is an open-source, cloud-native time-series database built in Rust that handles metrics, logs, and events in a single platform. It uses a distributed architecture with SQL and PromQL support for querying time-series data at scale.
GlusterFS — Scalable Network-Attached Distributed File System
GlusterFS aggregates commodity storage servers into a single distributed file system, scaling to petabytes and thousands of clients without a centralized metadata server.
Apache Hive — Distributed Data Warehouse for Big Data Analytics
Apache Hive is a data warehouse system built on Hadoop that provides SQL-like querying (HiveQL) over large datasets stored in distributed storage. It translates SQL queries into MapReduce, Tez, or Spark jobs for scalable batch analytics.