The module lifecycle stage: Generally available version

The module has requirements for installation

What happens to snapshots and restored volumes when one of them is deleted?

The module provisions volumes through NetApp Trident, which makes an ONTAP FlexVol for every volume and an ONTAP snapshot for every VolumeSnapshot.

  • A volume restored from a snapshot, like a clone of a PVC, is a FlexClone: it shares the data with the snapshot and depends on it.
  • Deleting the PVC of a volume that has snapshots succeeds at once, but Trident only marks the volume as deleted: the FlexVol and its space stay on the storage system until the last snapshot of the volume is deleted. The snapshots can still be restored.
  • Deleting a VolumeSnapshot while a volume restored from it exists is retried, because ONTAP does not delete a snapshot that a clone depends on. 24 hours after the first attempt Trident starts splitting the clone from the snapshot, and when the split is done the snapshot is deleted. A restart of the Trident controller starts the 24 hours over. After the split the restored volume takes its full size on the storage system.
  • To make a restored volume independent from the start, create its PVC with the trident.netapp.io/splitOnClone: "true" annotation. Such a volume takes its full size at once.
  • Trident splits one clone at a time, so snapshots with many clones are deleted one after another.
  • A restored volume can be snapshotted and restored in turn.

Setting how clones are split

The NetappStorageConnection has two optional fields for the clone behavior of the Trident backend it creates. Without them Trident’s defaults apply: clones are not split at creation, and the wait before splitting is 24 hours.

  • splitOnClone: true splits every volume restored from a snapshot or cloned from a PVC right after creation. Snapshots and source volumes can then be deleted at once, but every such volume takes its full size on the storage system. The PVC annotation trident.netapp.io/splitOnClone overrides the value for a single volume.
  • cloneSplitDelaySeconds is the wait, in seconds from 1 to 2592000, between the first attempt to delete a snapshot that a clone depends on and the start of the split. It matters when splitOnClone is not true.
apiVersion: storage.deckhouse.io/v1alpha1
kind: NetappStorageConnection
metadata:
  name: netapp-1
spec:
  controlPlane:
    address: 192.168.1.10
    username: admin
    password: password
    svm: svm1
  dataPlane:
    protocol: iscsi
  splitOnClone: false
  cloneSplitDelaySeconds: 3600

A change is written to the Trident backend config of the connection within a reconcile. splitOnClone applies to the volumes created after the change, while existing clones keep their state. cloneSplitDelaySeconds is read each time a snapshot deletion is attempted, so it applies to existing clones too; the wait is kept in memory of the Trident controller, and its restart starts it over.