Snapshot Linked Clones
Storage Snapshot
Diamanti snapshot technology serves as the foundation of the Diamanti data protection solution. A snapshot represents a point-in-time image of data in a corresponding volume. Point-in-time images are useful with secondary applications such as analytics.
The Diamanti storage layer uses allocate-on-write I/O architecture. A volume and its snapshots share data blocks until the volume blocks are modified. Diamanti snapshots are internal objects.
Users need to create a volume from the snapshot to consume snapshot data.
What is a Linked Clone
Volumes created from Diamanti snapshots are called linked clones of the parent volume. Linked clones share data blocks with the corresponding snapshot until the linked clone blocks are modified. Linked clones can be attached to any node in the cluster for consumption. The Diamanti allocate-on-write architecture ensures that there is no performance impact on the original volume due to I/O on the snapshot and linked clones.
Features and Capabilities
This section describes features and capabilities of Diamanti snapshots.
Create Instant Snapshots and Linked Clones
Diamanti snapshot and linked clone creation is an instant operation and does not require a data copy.
Crash Consistent
Diamanti snapshots provide a crash-consistent image of volume data.
Create Multiple Linked Clones
Diamanti Snapshots are internal objects. To access snapshot data, users need to create linked clones from these snapshots. A linked clone is a regular volume, but shares blocks with the parent snapshot. Allocate-on-write I/O architecture ensures zero performance impact on the original volume.
You can create multiple linked clones from the same snapshot. These clones can be used simultaneously for different purposes, as needed. For example, a backup task can consume one linked clone and an analytics task can consume another linked clone from the same snapshot.
QoS
Linked clones support QoS configurations in the same manner as regular volumes. Each linked clone can be attached with a different QoS class depending on the use case. There is no performance impact on the original volume because of I/O operations on the linked clones.
Third-Party Backup Integration
Diamanti snapshots provide changed block APIs to return modified blocks between snapshots.
These APIs can be used by any third-party backup solution for policy-driven incremental backups.
Kubernetes Integration
Kubernetes allows on-demand snapshot creation for Persistent Volumes. Kubernetes also defines APIs for creating a snapshot and promoting a snapshot to a volume.
The Diamanti snapshot controller or provisioner provides integration with Kubernetes snapshot operations. The Diamanti system is responsible for the following operations:
The system creates a snapshot on the Diamanti platform when a VolumeSnapshot is created.
The VolumeSnapshot object references a Persistent Volume Claim that is bound to a Persistent Volume for which the snapshot is taken. The controller creates a volumeSnapshotContent object that represents the actual snapshot.
Use the following Kubernetes specification as an example for creating a snapshot:
apiVersion: snapshot.storage.k8s.io/v1 kind: VolumeSnapshot metadata: name: csi-pvc-filesystem-snapshot spec: volumeSnapshotClassName: csi-snapshotclass source: persistentVolumeClaimName: csi-pvc-filesystem-instant-provisioning
The system creates a volume from a snapshot on the Diamanti platform when a snapshot is promoted to a Persistent Volume.
The Persistent Volume Claim references a snapshot object in the annotation. The provisioner creates a Persistent Volume that is bound to the PVC.
Use the following Kubernetes specification for promoting a snapshot to a volume:
apiVersion: v1 kind: PersistentVolumeClaim metadata: name: csi-pvc-filesystem-lcv spec: storageClassName: csi-sc-static dataSource: name: csi-pvc-filesystem-snapshot kind: VolumeSnapshot apiGroup: snapshot.storage.k8s.io accessModes: - ReadWriteOnce resources: requests: storage: 5Gi
Backup Integration
Diamanti provides a Backup Controller to back up application data to an NFS target. The Backup Controller runs as a Kubernetes cron job, backing up volumes periodically. The controller takes a snapshot of the volume and creates a linked clone volume for the backup agent. The agent then backs up the data using the linked clone volume to the specified NFS target.
Volume Restore from Point-in-Time Snapshots
The volume restore operation enables the resetting of volume data to a specified snapshot. Volumes can be restored from any valid point-in-time snapshot. All snapshots created after the snapshot being used for the volume restore are deleted after the restore operation has successfully completed. Volumes retain their size, in case the volume size is different from the snapshot size due to a volume resize operation.
Current Release Details
This section describes specific details and limitations in the current release of the Diamanti storage snapshots and linked clones feature.
No Additional Mirrors
Users can create snapshots and linked clones with multiple mirrors. The maximum number of mirrors is limited by the number of mirrors in the parent object. After a snapshot or linked clone is created, adding additional mirrors is not allowed.
Number of Snapshots
Diamanti supports up to 16 snapshots per volume.
Snapshot Commands
This section describes the basic snapshot and volume commands related to Diamanti D-Series storage snapshots.
dctl snapshot
Manage snapshots, including listing and deleting snapshots, as well as displaying information about specific snapshots.
Syntax
dctl [global options] snapshot <command> [command options] [arguments...]
Commands
create Create a snapshot.
delete Delete a snapshot
get Display information about a specific snapshot.
list Display a summary of all snapshots.
describe Describe a snapshot
Options
--help, -h Show help.
dctl snapshot create
Create a snapshot.
Syntax
dctl [global options] snapshot create <snapshot-name> [command options]
[arguments...]
Options
--source <volume>, --src <volume> The source volume for the snapshot.
--mirror-count <value>, -m <value> The mirror count. The default is 1.
--prefix <prefix>, -p <prefix> The prefix to add to the snapshot name.
--selectors <value>, --sel <value> The selectors to constrain the node
selection, using the following format:
[key|key=val][,key|key=val]*
Example
dctl snapshot create [snap1 | --prefix snap1] --src vol-01
dctl volume create
Create a volume/Linked clone.
Syntax
dctl [global options] volume create <volume-name> [command options]
[arguments...]
Options
--size <size>, -s <size> The size of the storage volume,
notated as nnM or nnG. For
example, 500M or 1G.
--labels <labels>, -l <labels> The labels associated with the
volume, using the following
format: key=value.
--selectors <label>, --sel <label> The node on which to create the
volume, selected by label using
the following format: key=value.
--mirror-count <new-mirror-count>, The new mirror count when adding
-m <new-mirror-count> a mirror to a volume (with one or
two mirrors). This value must be
one larger than the current mirror
count.
--perf-tier <perf-tier>, -p <perf-tier> The performance tier associated
with the volume.
--fs-type <filesystem-type>, The filesystem type for the volume.
-f <filesystem-type>
--source <snapshot-name>, The snapshot name to use to create
--src <snapshot-name> the volume. This option is only
applicable when creating a volume
from a snapshot.
--alloc-ratio value, -a value The allocation ratio for the
volume. This option is only
applicable when creating a volume
--read-only, --ro Create read only volume
--driver <driver>, -d <driver> The driver for volume life cycle
management.
--block, -b Specifies the volume export mode is
block.
--volumeuser <user>, -u <user> The volume user, for example, 'kvm'.
--secure, --sec Securing volume data at rest using
encryption method
Example
dctl volume create vol1 --source snap01 -m 3
dctl volume restore
Restore a volume from a valid point-in-time snapshot.
Syntax
dctl [global options] volume restore [command options] [arguments...]
Options
--latest-snapshot, -l Restore a volume from the latest
snapshot.
--source-snapshot <snapshot-name>, The source snapshot for the volume
-s <snapshot-name> restore.
--assume-yes, -y Assume yes for the confirmation prompt.
Example
dctl volume restore vol-1 --latest-snapshot
dctl volume restore vol-01 --source-snapshot snap-01
Note
Diamanti volumes need to be offline (detached) before restoring from any point-in-time snapshot. All snapshots created after the snapshot being used for the volume restore are deleted after the restore operation has successfully completed. Volumes retain their size, in case the volume size is different from the snapshot size due to a volume resize operation.