Volume Snapshot Classes
Volume snapshot class selection
Volume Snapshot Classes are cluster scoped resources used while creating CSI snapshots. Since CloudCasa creates CSI snapshots of PVCs for backups (except when LIVE backup option is selected), it needs to pick a volume snapshot class for a given storage driver.
CloudCasa provides two ways in which users can explicitly configure volume snapshot classes:
Configure volume snapshot classes in the Cluster Edit page in UI. To do this, go to Clusters/Overview, choose Actions/Edit for the cluster, then open Advanced Options => Configure volume snapshot classes.
Set the label
cloudcasa.io/csi-volumesnapshot-class: "true".
The first option is preferred as it is simpler and can be done from the UI.
When there is no such explicit configuration done but if there is only one volume snapshot class present for a given
driver, CloudCasa proceeds to use it. If none of these options are possible, CloudCasa automatically creates a volume
snapshot class resource with the naming pattern:
cloudcasa-<DRIVER-NAME-WITH-DASHES>. E.g. cloudcasa-driver-longhorn-io.
However, there is an exception for drivers such as Ceph, HPE, and Nutanix for which volume snapshot classes require
custom fields configured in the “parameters” section. For example, a typical volume snapshot class for the driver
openshift-storage.rbd.csi.ceph.com may look like this (some fields are not shown for the sake of brevity):
apiVersion: snapshot.storage.k8s.io/v1
deletionPolicy: Delete
driver: openshift-storage.rbd.csi.ceph.com
kind: VolumeSnapshotClass
metadata:
labels:
storageclass.ocs.openshift.io/is-external: "true"
manager: ocs-operator
operation: Update
name: ocs-external-storagecluster-rbdplugin-snapclass
parameters:
clusterID: openshift-storage
csi.storage.k8s.io/snapshotter-secret-name: rook-csi-rbd-provisioner
csi.storage.k8s.io/snapshotter-secret-namespace: openshift-storage
Note the fields in the “parameters” section.
For drivers that need such custom parameters, CloudCasa requires that users explicitly configure volume snapshot class by following the steps above. If no such explicit configuration is done, snapshot operation fails with a clear error. The following is the list of drivers which require explicit volume snapshot configuration:
csi.hpe.com
csi.nutanix.com
rbd.csi.ceph.com
openshift-storage.cephfs.csi.ceph.com
openshift-storage.rbd.csi.ceph.com