Skip to content

Commit

Permalink
Add doc for fallback to host-assisted cloning (kubevirt#2970)
Browse files Browse the repository at this point in the history
Signed-off-by: Arnon Gilboa <agilboa@redhat.com>
Co-authored-by: Arnon Gilboa <agilboa@redhat.com>
  • Loading branch information
kubevirt-bot and arnongilboa committed Nov 7, 2023
1 parent 668ba71 commit 5ab49da
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions doc/efficient-cloning.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,26 @@ _The required prerequisites in order to trigger efficient cloning methods_

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

### Fallback to Host-Assisted Cloning
Whenever the above cloning prerequisites are not met, we fallback to host-assisted cloning (`cloneType: copy`), which is the least efficient method of cloning. It uses a source pod and a target pod to copy data from the source volume to the target volume. In that case, the target PVC is annotated with the fallback reason and an event is emitted.

E.g. in the PVC:
```yaml
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
annotations:
cdi.kubevirt.io/cloneFallbackReason: The volume modes of source and target are incompatible
cdi.kubevirt.io/clonePhase: Succeeded
cdi.kubevirt.io/cloneType: copy
```

And in the events:
```
NAMESPACE LAST SEEN TYPE REASON OBJECT MESSAGE
test-ns 0s Warning IncompatibleVolumeModes persistentvolumeclaim/test-target The volume modes of source and target are incompatible
```

### Additional Documentation
* DataVolumes: [datavolumes](./datavolumes.md)
* DataVolume Cloning: [clone-datavolumes](./clone-datavolume.md)
Expand Down

0 comments on commit 5ab49da

Please sign in to comment.