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

推荐订阅源

D
DataBreaches.Net
MongoDB | Blog
MongoDB | Blog
GbyAI
GbyAI
L
LangChain Blog
B
Blog
博客园 - 三生石上(FineUI控件)
Martin Fowler
Martin Fowler
博客园 - 【当耐特】
Recent Announcements
Recent Announcements
P
Proofpoint News Feed
U
Unit 42
Last Week in AI
Last Week in AI
WordPress大学
WordPress大学
有赞技术团队
有赞技术团队
雷峰网
雷峰网
Microsoft Security Blog
Microsoft Security Blog
T
The Blog of Author Tim Ferriss
爱范儿
爱范儿
小众软件
小众软件
I
InfoQ
G
Google Developers Blog
大猫的无限游戏
大猫的无限游戏
人人都是产品经理
人人都是产品经理
C
Check Point 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 Set Up Volume Replication with Rook-Ceph 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 Create Volume Group Snapshots with Rook CSI
Nawaz Dhandala · 2026-03-31 · via OneUptime Blog

What are Volume Group Snapshots?

Volume Group Snapshots are a Kubernetes feature that allows multiple PersistentVolumeClaims to be snapshotted atomically at the same point in time. This is critical for stateful applications where consistency across multiple volumes is required - for example, a database with separate volumes for data and transaction logs.

Rook documents VolumeGroupSnapshot support for CephFS volumes through the groupsnapshot.storage.k8s.io API.

Prerequisites

  • Kubernetes 1.31 or later
  • The VolumeGroupSnapshot CRDs installed:
kubectl get crd | grep groupsnapshot
  • A recent Rook release running Ceph Squid (v19.0.0) or later with a Ceph CSI version that supports CephFS VolumeGroupSnapshots
  • The snapshot controller and external-snapshotter deployed with group snapshot support. With external-snapshotter v8.2 and later, enable --feature-gates=CSIVolumeGroupSnapshot=true

Install the group snapshot CRDs:

kubectl apply -f https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/v8.2.0/client/config/crd/groupsnapshot.storage.k8s.io_volumegroupsnapshotclasses.yaml
kubectl apply -f https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/v8.2.0/client/config/crd/groupsnapshot.storage.k8s.io_volumegroupsnapshotcontents.yaml
kubectl apply -f https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/v8.2.0/client/config/crd/groupsnapshot.storage.k8s.io_volumegroupsnapshots.yaml

Create a VolumeGroupSnapshotClass

apiVersion: groupsnapshot.storage.k8s.io/v1beta1
kind: VolumeGroupSnapshotClass
metadata:
  name: csi-cephfsplugin-groupsnapclass
driver: rook-ceph.cephfs.csi.ceph.com
parameters:
  clusterID: rook-ceph
  csi.storage.k8s.io/group-snapshotter-secret-name: rook-csi-cephfs-provisioner
  csi.storage.k8s.io/group-snapshotter-secret-namespace: rook-ceph
deletionPolicy: Delete
kubectl apply -f group-snapclass.yaml

Label PVCs for Group Snapshot

Label the PVCs you want to snapshot together:

kubectl label pvc db-data app=mydb-snapshot-group
kubectl label pvc db-logs app=mydb-snapshot-group

Create the VolumeGroupSnapshot

apiVersion: groupsnapshot.storage.k8s.io/v1beta1
kind: VolumeGroupSnapshot
metadata:
  name: mydb-group-snapshot
spec:
  volumeGroupSnapshotClassName: csi-cephfsplugin-groupsnapclass
  source:
    selector:
      matchLabels:
        app: mydb-snapshot-group
kubectl apply -f group-snapshot.yaml
kubectl get volumegroupsnapshot mydb-group-snapshot

Verify the Group Snapshot

kubectl describe volumegroupsnapshot mydb-group-snapshot
kubectl get volumesnapshot -o=jsonpath='{range .items[?(@.metadata.ownerReferences[0].name=="mydb-group-snapshot")]}{.metadata.name}{"\n"}{end}'

When the VolumeGroupSnapshot is ReadyToUse, the second command lists the individual VolumeSnapshot objects created for each PVC in the group. Each snapshot shares the same point-in-time capture.

Restore from a Group Snapshot

To restore each volume in the group, create individual PVCs referencing each snapshot from the group:

# List individual snapshots created by the group snapshot
kubectl get volumesnapshot -o=jsonpath='{range .items[?(@.metadata.ownerReferences[0].name=="mydb-group-snapshot")]}{.metadata.name}{"\n"}{end}'

Then create restore PVCs for each:

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: db-data-restored
spec:
  storageClassName: rook-cephfs
  dataSource:
    name: <individual-snapshot-name>
    kind: VolumeSnapshot
    apiGroup: snapshot.storage.k8s.io
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 20Gi

Summary

Volume Group Snapshots with Rook CSI provide crash-consistent backups across multiple CephFS volumes simultaneously. By labeling PVCs and creating a VolumeGroupSnapshot object, teams can ensure all related volumes are captured at the same instant, which is essential for multi-volume stateful applications like databases.