mirror of
https://github.com/kubevirt/containerized-data-importer.git
synced 2025-06-03 06:30:22 +00:00

* CSI Volume Clone for same namespace CSI Volume Cloning is available on the same namespace and also works with namespace transfer and volume expansion. Signed-off-by: Bartosz Rybacki <brybacki@redhat.com> * Update documentation for CSI Volume Clone Signed-off-by: Bartosz Rybacki <brybacki@redhat.com> * Cleanup and refactor - extract common code into functions Remove csi-clone-controller (only set cloneOf annotation) Signed-off-by: Bartosz Rybacki <brybacki@redhat.com> * Corrects reconcile results Do not requeue reconciliation loop when not needed. Mark DV as Failed when the PVC Claim is lost. Signed-off-by: Bartosz Rybacki <brybacki@redhat.com> * Handles PVC recovery from ClaimLost Make sure that CSI clone continues when target pvc recovers from ClaimLost to to Bound or Pending. Signed-off-by: Bartosz Rybacki <brybacki@redhat.com> * Code Review improvements Extracted common code for doCrossNamespaceClone and expandAfterClone, and some updates to comments/cleanups. Signed-off-by: Bartosz Rybacki <brybacki@redhat.com>
2.0 KiB
2.0 KiB
Efficient Data Volume cloning
Introduction
Data Volumes cloning a PVC source support multiple forms of cloning. Based on the prerequisites listed here, a cloning method will be utilized with varying degrees of efficiency. These forms are CSI volume cloning, smart cloning, and host-assisted cloning. CSI volume cloning and smart cloning employ CSI driver features in order to more efficiently clone a source PVC, but have certain limitations, while host-assited cloning provides a slower means with little limitation.
Prerequisites
The required prerequisites in order to trigger efficient cloning methods
-
CSI Volume Cloning:
- The csi driver backing the storage class of the PVC supports volume cloning, and corresponding StorageProfile has the cloneStrategy set to CSI Volume Cloning (see here for more details)
- The source and target PVCs share the same Storage Class
- The source and target PVCs share the same Volume Mode
- The user creating the DataVolume has permission to create the
datavolumes/source
resource in the source namespace - The source volume is not in use
-
Smart Cloning:
- A Snapshot Class associated with the Storage Class exists
- The source and target PVCs share the same Storage Class
- The source and target PVCs share the same Volume Mode
- The user creating the DataVolume has permission to create the
datavolumes/source
resource in the source namespace - The source volume is not in use
Note: Data Volume Cloning can work together with namespace transfer and size expansion
Additional Documentation
- DataVolumes: datavolumes
- DataVolume Cloning: clone-datavolumes
- CSI Volume Cloning: csi-cloning
- Smart Cloning: smart-clone
- Namespace Transfer: namespace-transfer