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

The CSI clone supports cross storage classes now. See https://github.com/kubernetes-csi/external-provisioner/pull/699 The limitation in CDI was removed in https://github.com/kubevirt/containerized-data-importer/pull/2750/files#diff-6a637cfe899a0436fa6e24865f2b9259f9b8504e40e080e03603830a5504a0c9L754 Signed-off-by: halfcrazy <hackzhuyan@gmail.com>
1.7 KiB
1.7 KiB
Data Volume cloning with CSI Volume Clone
Introduction
CSI Volume Cloning uses the Volume Cloning
feature of CSI drivers in order to perform a quick and efficient PVC clone.
The Volume Cloning
functionality is not universal to all CSI drivers in kubernetes, so care must be taken when defining
and choosing the source PVC storage class. In order to enable CSI Cloning for the selected storage class, the
storage profile of the respective DataVolume PVC will be checked for cloneStrategy (cloneStrategy=csi-clone
see Storage Profiles).
It is the responsibility of a user to configure the storage profile accordingly.
See volume-cloning for more information on discerning the capabilities of your csi driver.
Prerequisites
- 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 PVC share the same Volume Mode (see here for details)
- The user creating the DataVolume has permission to create the
datavolumes/source
resource in the source namespace - The source volume is not in use
Flow Description
- DataVolume is created with a PVC source
- Check if CSI Volume Cloning is possible (as described in Prerequisites):
- If CSI Volume Cloning is possible:
- Create the PVC
- Set the claim reference of the PV to point to the new target PVC
- If CSI Volume Cloning is not possible:
- Attempt Host Assisted Cloning host-assisted cloning