惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

P
Privacy International News Feed
I
Intezer
T
Tenable Blog
S
Schneier on Security
Project Zero
Project Zero
G
GRAHAM CLULEY
酷 壳 – CoolShell
酷 壳 – CoolShell
小众软件
小众软件
Know Your Adversary
Know Your Adversary
博客园 - 司徒正美
The Cloudflare Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
N
News and Events Feed by Topic
博客园 - 叶小钗
宝玉的分享
宝玉的分享
L
LINUX DO - 热门话题
aimingoo的专栏
aimingoo的专栏
S
Secure Thoughts
Forbes - Security
Forbes - Security
T
The Exploit Database - CXSecurity.com
D
Darknet – Hacking Tools, Hacker News & Cyber Security
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 【当耐特】
罗磊的独立博客
IT之家
IT之家
H
Hacker News: Front Page
I
InfoQ
云风的 BLOG
云风的 BLOG
S
Security Affairs
M
MIT News - Artificial intelligence
GbyAI
GbyAI
Jina AI
Jina AI
Help Net Security
Help Net Security
Engineering at Meta
Engineering at Meta
大猫的无限游戏
大猫的无限游戏
Webroot Blog
Webroot Blog
L
Lohrmann on Cybersecurity
A
About on SuperTechFans
Attack and Defense Labs
Attack and Defense Labs
The Register - Security
The Register - Security
V
V2EX
G
Google Developers Blog
D
DataBreaches.Net
Apple Machine Learning Research
Apple Machine Learning Research
C
Cybersecurity and Infrastructure Security Agency CISA
J
Java Code Geeks
W
WeLiveSecurity
Cloudbric
Cloudbric
T
Tor Project blog

OneUptime Blog

How to Monitor Azure App Services (PaaS) with OpenTelemetry Grafana Stack vs OneUptime: DIY Observability or Unified Platform? Your AI Workloads Are About to Blow Up Your Observability Bill The Great Observability Consolidation Is Here How to Write Custom Object Classes for Ceph How to Write Custom Ceph Manager Modules How to Write a ceph.conf Configuration File How to Use Rook-Ceph with OpenShift How to Use Rook-Ceph with Longhorn for Comparison How to Configure Volume Snapshot Class for RBD in Rook How to Configure VolumeReplicationClass Scheduling Intervals in Rook How to Create Volume Group Snapshots with Rook CSI How to Visualize Ceph Network Performance in Grafana How to Enable Virtual Host-Style Bucket Access in Rook How to View Runtime Configuration via Admin Socket How to View Quota Settings and Update Stats in Ceph RGW How to View PG Scaling Recommendations with autoscale-status How to View PG Distribution via Admin Socket How to View Performance Metrics in the Ceph Dashboard How to View OSD Performance Counters in Ceph How to View Connection Status via Admin Socket How to View Ceph Cluster Summary Dashboard via CLI How to Version Control Rook-Ceph Configuration How to Version Control Ceph Infrastructure with Terraform How to Verify Kubernetes Node Requirements for Rook-Ceph Deployment How to Verify Health Before and After Rook Upgrades How to Verify Data Integrity with Deep Scrubbing How to Verify Complete Rook-Ceph Cleanup How to Verify Backup Integrity from Ceph Snapshots How to Use Rook-Ceph with Velero for Kubernetes Backup How to Integrate HashiCorp Vault with Rook-Ceph (Token Auth) How to Configure TLS for Vault Integration in Rook How to Integrate HashiCorp Vault with Rook-Ceph (Kubernetes Auth) How to Validate Ceph Cluster Configuration After Deployment How to Understand User Type and ID Notation (TYPE.ID) in Ceph How to Configure User Management in the Ceph Dashboard How to Use Rook-Ceph with Kubernetes Operators How to Use Rook-Ceph with Helm Chart Deployments How to Use the Swift API with Ceph RGW How to Use SQLite Databases Stored on Ceph How to Use s3cmd with Ceph RGW How to Use the S3 API with Ceph RGW How to Use Red Hat Ceph with RHEL Virtualization How to Use RBD with QEMU How to Use RBD with Nomad How to Use RBD with CloudStack How to Use RBD Snapshot Rollback How to Use rados bench for Object Storage Benchmarking How to Secure Rook-Ceph with Pod Security Admission How to Use pg-upmap for PG Mapping in Ceph How to Use Multipath Devices with Ceph OSDs How to Use MinIO Client (mc) with Ceph RGW How to Use fs swap for CephFS How to Use fio for Ceph Block Storage Benchmarking How to Use the CephFS Shell How to Use Ceph RGW for Media Asset Management How to Use Ceph RGW for Log Storage and Archival How to Use Ceph RGW for Data Lake Storage How to Use Ceph RGW for Backup Repository Storage How to Use the ceph-authtool Utility How to Use boto3 (Python) with Ceph RGW S3 How to Use AWS CLI with Ceph RGW S3 How to Use the Admin Ops API with Ceph RGW How to Configure Usage Log Key Transition in Ceph RGW How to Handle Rook-Ceph Upgrades in GitOps Pipelines How to Upgrade Rook-Ceph with Zero Downtime How to Create a Ceph Upgrade Runbook How to Upgrade the Rook Operator from v1.18 to v1.19 How to Upgrade the Rook Operator on Kubernetes How to Upgrade External Cluster Connections in Rook How to Upgrade the Ceph Version in Rook How to Upgrade from Ceph Reef to Squid How to Upgrade from Ceph Quincy to Reef How to Upgrade Ceph Clusters in Stretch Mode How to Update Kernel for CephFS Feature Compatibility How to Update Ceph Configuration on a Running Rook Cluster How to Create Unique Kubernetes Services per NFS Server in Rook How to Understand When Compression Helps vs Hurts in Ceph How to Understand User Types (Individual vs System) in Ceph How to Understand the undersized PG State in Ceph How to Understand the stale PG State in Ceph How to Understand the repair PG State in Ceph How to Understand the remapped PG State in Ceph How to Understand Red Hat Ceph Storage vs Upstream Ceph How to Understand Placement Groups in Ceph How to Understand PG Splitting in Ceph How to Understand the peering PG State in Ceph How to Understand OSD Recovery Process in Ceph How to Understand the OSD Map in Ceph How to Understand New Features in Each Ceph Release How to Understand Monitor Leadership in Ceph How to Understand MDS States in CephFS How to Understand Deprecated Features in Ceph Reef How to Understand the degraded PG State in Ceph How to Understand D3N in Ceph How to Understand the creating PG State in Ceph How to Understand the clean PG State in Ceph How to Understand CephX Authentication Protocol How to Understand CephX Authentication Flow How to Understand What Data Ceph Telemetry Collects
How to Set Up Volume Replication with Rook-Ceph
Nawaz Dhandala · 2026-03-31 · via OneUptime Blog

How RBD Mirroring Works

Rook-Ceph supports asynchronous RBD mirroring, which replicates RBD images from a primary cluster to a secondary cluster. This enables disaster recovery: if the primary cluster fails, applications can be failed over to the secondary cluster with minimal data loss. Mirroring works at the pool level (pool mirroring mode) or image level (image mirroring mode).

graph LR
    A[Primary Cluster] --> B[RBD Mirror Daemon]
    B --> C[Async Replication]
    C --> D[Secondary Cluster RBD Mirror]
    D --> E[Secondary Cluster]
    F[Application writes] --> A
    G[Failover] --> E
    E --> H[Application reads after failover]

Prerequisites

  • Two separate Rook-Ceph clusters (primary and secondary)
  • Network connectivity between the two clusters on Ceph OSD ports
  • The rook-ceph-operator in both clusters must be version 1.8 or later

Step 1 - Enable RBD Mirroring Pool Mode on Primary

First, configure the pool on the primary cluster to support mirroring:

# On the primary cluster
kubectl -n rook-ceph exec deploy/rook-ceph-tools -- bash -c "
  # Enable mirroring on the pool
  ceph osd pool application enable replicapool rbd
  rbd mirror pool enable replicapool pool

  # Get the bootstrap peer token for the secondary cluster
  rbd mirror pool peer bootstrap create \
    --site-name primary replicapool
"

Save the bootstrap token output - you will need it for the secondary cluster.

Step 2 - Deploy CephRBDMirror on Both Clusters

Create a CephRBDMirror resource on the primary cluster:

apiVersion: ceph.rook.io/v1
kind: CephRBDMirror
metadata:
  name: my-rbd-mirror
  namespace: rook-ceph
spec:
  # Number of mirror daemon instances
  count: 1
  peers:
    secretNames:
      # Secret containing the peer cluster bootstrap token
      - rbd-primary-site-secret

Create the same on the secondary cluster (with the secondary site secret).

Step 3 - Create the Peer Bootstrap Secret

On the secondary cluster, create a secret with the bootstrap token from step 1:

# Create the secret on the secondary cluster
kubectl -n rook-ceph create secret generic rbd-primary-site-secret \
  --from-literal=token='<bootstrap-token-from-step-1>' \
  --from-literal=pool=replicapool

Create the corresponding secret on the primary cluster with the secondary bootstrap token.

Step 4 - Configure Pool Mirroring

Update the CephBlockPool on both clusters to enable mirroring:

# Primary cluster CephBlockPool
apiVersion: ceph.rook.io/v1
kind: CephBlockPool
metadata:
  name: replicapool
  namespace: rook-ceph
spec:
  failureDomain: host
  replicated:
    size: 3
  mirroring:
    enabled: true
    mode: image
    # Schedule snapshot-based mirroring
    snapshotSchedules:
      - interval: 24h
        startTime: "14:00:00-05:00"

Step 5 - Enable Replication on Specific PVCs

Use the VolumeReplication CR (from the Kubernetes Volume Replication Operator) to mark specific PVCs for replication:

# Install the Volume Replication Operator
kubectl apply -f https://raw.githubusercontent.com/csi-addons/kubernetes-csi-addons/main/deploy/controller/crds.yaml
kubectl apply -f https://raw.githubusercontent.com/csi-addons/kubernetes-csi-addons/main/deploy/controller/rbac.yaml
kubectl apply -f https://raw.githubusercontent.com/csi-addons/kubernetes-csi-addons/main/deploy/controller/setup-controller.yaml

Create a VolumeReplicationClass:

apiVersion: replication.storage.openshift.io/v1alpha1
kind: VolumeReplicationClass
metadata:
  name: rook-ceph-rbd-replicationclass
spec:
  provisioner: rook-ceph.rbd.csi.ceph.com
  parameters:
    mirroringMode: snapshot
    schedulingInterval: "1h"
    replication.storage.openshift.io/replication-secret-name: rook-csi-rbd-provisioner
    replication.storage.openshift.io/replication-secret-namespace: rook-ceph

Create a VolumeReplication to enable replication on a PVC:

apiVersion: replication.storage.openshift.io/v1alpha1
kind: VolumeReplication
metadata:
  name: pvc-replication
  namespace: default
spec:
  volumeReplicationClass: rook-ceph-rbd-replicationclass
  replicationState: primary
  dataSource:
    kind: PersistentVolumeClaim
    name: my-critical-data

Step 6 - Monitor Mirroring Status

Check the mirroring status from the primary cluster toolbox:

kubectl -n rook-ceph exec deploy/rook-ceph-tools -- \
  rbd mirror pool status replicapool
health: OK
images: 3 total
    3 replaying

Check individual image mirroring status:

kubectl -n rook-ceph exec deploy/rook-ceph-tools -- \
  rbd mirror image status replicapool/csi-vol-xxxx
csi-vol-xxxx:
  global_id:   xxxx-xxxx
  state:       up+replaying
  description: replaying, master_position=[object_number=45, tag_tid=2, entry_tid=4], mirror_position=[object_number=45, tag_tid=2, entry_tid=4], entries_behind_master=0
  last_update:  2026-03-31 10:00:00

entries_behind_master=0 means the secondary is fully in sync.

Step 7 - Failover to Secondary

During a disaster, promote the secondary cluster to primary:

# On the secondary cluster - demote primary (if accessible) and promote secondary
kubectl -n rook-ceph exec deploy/rook-ceph-tools -- bash -c "
  # Force promote the image on secondary
  rbd mirror image promote --force replicapool/csi-vol-xxxx
"

Update the VolumeReplication on the secondary cluster to mark it as the new primary:

spec:
  replicationState: primary

Summary

Rook-Ceph RBD mirroring enables disaster recovery by asynchronously replicating RBD images to a secondary cluster. Set up CephRBDMirror daemons on both clusters, exchange bootstrap peer secrets, enable mirroring.mode: image on the CephBlockPool, and use VolumeReplication CRs to control replication state per PVC. Monitor mirror lag with rbd mirror pool status and rbd mirror image status. During failover, force-promote images on the secondary cluster and redirect applications to the secondary cluster's endpoint.