Skip to content

Commit 8fb02f2

Browse files
author
Bob Gaydos
committed
CNV-9235: Modify smart-cloning topic to use storage API
1 parent cec0f8d commit 8fb02f2

File tree

1 file changed

+7
-14
lines changed

1 file changed

+7
-14
lines changed

modules/virt-cloning-a-datavolume.adoc

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,18 @@
77

88
.Prerequisites
99

10-
For smart-cloning to occur, the following conditions are required.
10+
For smart-cloning to occur, the following conditions are required:
1111

1212
* Your storage provider must support snapshots.
13-
* The source and target PVCs must be defined to the same namespace.
1413
* The source and target PVCs must be defined to the same storage class.
1514
* The `VolumeSnapshotClass` object must reference the storage class defined to both the source and target PVCs.
1615

17-
If any of these prerequisites are not met, host-assisted cloning automatically occurs when you create a data volume with a PVC source.
18-
1916
.Procedure
2017

2118
To initiate cloning of a data volume:
2219

2320
. Create a YAML file for a `DataVolume` object that specifies the name of the
24-
new data volume, the name and namespace of the source PVC, and the size of the new data volume. This example clones a source PVC in block mode, so `volumeMode: Block` is used:
21+
new data volume and the name and namespace of the source PVC. In this example, because you specify the *storage* API, there is no need to specify *accessModes* or *volumeMode*. The optimal values will be calculated for you automatically.
2522
+
2623
[source,yaml]
2724
----
@@ -33,21 +30,17 @@ spec:
3330
source:
3431
pvc:
3532
namespace: "<source-namespace>" <2>
36-
name: "<my-favorite-vm-disk>" <3>
37-
pvc:
38-
accessModes:
39-
- ReadWriteMany
33+
name: "<my-favorite-vm-disk>" <3>)
34+
storage: <4>
4035
resources:
4136
requests:
42-
storage: <2Gi> <4>
43-
volumeMode: Block <5>
37+
storage: <2Gi> <5>
4438
----
4539
<1> The name of the new data volume.
4640
<2> The namespace where the source PVC exists.
4741
<3> The name of the source PVC.
48-
<4> The size of the new data volume. You must allocate enough space, or the
49-
cloning operation fails. The size must be the same as or larger than the source PVC.
50-
<5> Specifies that the destination is a block PV.
42+
<4> Specifies allocation with the *storage* API
43+
<5> The size of the new data volume.
5144

5245
. Start cloning the PVC by creating the data volume:
5346
+

0 commit comments

Comments
 (0)