containerized-data-importer/doc/efficient-cloning.md
Bartosz Rybacki d7ae7d4a37
Describe clone-strategy annotation (#2243)
Describes the possibility to configure preferred clone method on storageClass by using annotation.
The original change that introduced it https://github.com/kubevirt/containerized-data-importer/pull/2004

Signed-off-by: Bartosz Rybacki <brybacki@redhat.com>
2022-04-22 20:32:03 +02:00

2.1 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:

    1. 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)
    2. The source and target PVCs share the same Storage Class
    3. The source and target PVCs share the same Volume Mode
    4. The user creating the DataVolume has permission to create the datavolumes/source resource in the source namespace
    5. The source volume is not in use
  • Smart Cloning:

    1. A Snapshot Class associated with the Storage Class exists
    2. The source and target PVCs share the same Storage Class
    3. The source and target PVCs share the same Volume Mode
    4. The user creating the DataVolume has permission to create the datavolumes/source resource in the source namespace
    5. The source volume is not in use

Note: Data Volume Cloning can work together with namespace transfer and size expansion

Additional Documentation