Files
docs/doc/source/storage/kubernetes/dell-storage-snapshots-46916ac34bf0.rst
Suzana Fernandes 3fec5e77a0 Update Starlingx Dell PowerStore CSM/CSI support documentation
Story: 2011308
Task: 52533

Change-Id: Icb6a2ec38c0ff7d1b1a2f48780895a415f6b2087
Signed-off-by: Suzana Fernandes <Suzana.Fernandes@windriver.com>
2025-09-09 19:15:32 +00:00

3.8 KiB

Create Snapshots

A Volume Snapshot Class enables the creation of snapshots for , allowing efficient backups and data restoration. This functionality ensures data protection, facilitating point-in-time recovery, and minimizing the risk of data loss in Kubernetes clusters.

The procedure below demonstrates how to create a Volume Snapshot Class and Volume Snapshot for the Dell provisioner.

Note

It is necessary to have the controller running to be able to create and mount the .

Note

The dell-storage charts already create default snapshotclasses. You can list them by using the following command:

~(keystone_admin)$ kubectl get volumesnapshotclasses.snapshot.storage.k8s.io

-Powerstore is used in this example.

  1. Check if the dell-storage application is successfully applied.

    ~(keystone_admin)$ system application-list
    +--------------------------+-----------+-------------------------------------------+------------------+--------------+-----------+
    | application              | version   | manifest name                             | manifest file    | status       | progress  |
    +--------------------------+-----------+-------------------------------------------+------------------+--------------+-----------+
    | dell-storage             | 24.03-36  | dell-storage-fluxcd-manifests             | fluxcd-manifests | applied      | completed |
    +--------------------------+-----------+-------------------------------------------+------------------+--------------+-----------+
  2. Check if the is created and bound.

    ~(keystone_admin)$ kubectl -n dell-storage get pvc
    NAME    STATUS   VOLUME                          CAPACITY   ACCESS MODES   STORAGECLASS         AGE
    pvol0   Bound    csi-powerstore-vol-0fca78f7dd   8Gi        RWO            csi-powerstore-nfs   5m
  3. Check the available snapshot classes.

    ~(keystone_admin)$ kubectl get volumesnapshotclasses.snapshot.storage.k8s.io
    NAME                           DRIVER                       DELETIONPOLICY   AGE
    csi-powerstore-snapshot        csi-powerstore.dellemc.com   Delete           5m
  4. Create the snapshot file.

    ~(keystone_admin)$ cat << EOF > ~/powerstore-volume-snapshot.yaml
    apiVersion: snapshot.storage.k8s.io/v1
    kind: VolumeSnapshot
    metadata:
      name: csi-powerstore-pvc-snapshot
      namespace: dell-storage
    spec:
      volumeSnapshotClassName: csi-powerstore-snapshot
      source:
       persistentVolumeClaimName: pvol0
    EOF
  5. Apply the snapshot file.

    ~(keystone_admin)$ kubectl apply -f ~/powerstore-volume-snapshot.yaml
    volumesnapshot.snapshot.storage.k8s.io/csi-powerstore-pvc-snapshot created
  6. Confirm that the snapshot file was created successfully.

    ~(keystone_admin)$ kubectl get volumesnapshots.snapshot.storage.k8s.io
    NAME                         READYTOUSE  SOURCEPVC  SOURCESNAPSHOTCONTENT RESTORESIZE SNAPSHOTCLASS             SNAPSHOTCONTENT             CREATIONTIME  AGE
    csi-powerstore-pvc-snapshot  true        pvol0                            8Gi         csi-powerstore-snapshot   snapcontent-dcfdbb32-       13s           21s
                                                                                                                     c936-469e-aa01-abe59f574fd1