Skills2026年4月15日·1 分钟阅读

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.

Agent 就绪

先审查再安装

这个资产需要先审查。复制的指令会要求 Agent dry-run、列出写入项,确认后再继续。

Needs Confirmation · 64/100策略:需确认
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
Ceph Storage
先审查命令
npx -y tokrepo@latest install 609469f1-38fa-11f1-9bc6-00163e2b0d79 --target codex

先 dry-run,确认写入项后再运行此命令。

TL;DR
Ceph provides block, object, and file storage from a single cluster with no single point of failure.
§01

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.

§02

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.

§03

How to use

  1. 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
  1. 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
  1. Enable S3-compatible object storage:
ceph orch apply rgw mystore
# Access via S3 API at http://node:80
§04

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
§05

Related on TokRepo

§06

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.

常见问题

What storage types does Ceph support?+

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.

How does Ceph handle disk failures?+

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.

Can Ceph run on Kubernetes?+

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.

What is the CRUSH algorithm?+

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.

What is the minimum hardware for Ceph?+

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.

引用来源 (3)

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产