You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/virt-cloning-a-datavolume.adoc
+7-14Lines changed: 7 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,21 +7,18 @@
7
7
8
8
.Prerequisites
9
9
10
-
For smart-cloning to occur, the following conditions are required.
10
+
For smart-cloning to occur, the following conditions are required:
11
11
12
12
* Your storage provider must support snapshots.
13
-
* The source and target PVCs must be defined to the same namespace.
14
13
* The source and target PVCs must be defined to the same storage class.
15
14
* The `VolumeSnapshotClass` object must reference the storage class defined to both the source and target PVCs.
16
15
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
-
19
16
.Procedure
20
17
21
18
To initiate cloning of a data volume:
22
19
23
20
. 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.
25
22
+
26
23
[source,yaml]
27
24
----
@@ -33,21 +30,17 @@ spec:
33
30
source:
34
31
pvc:
35
32
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>
40
35
resources:
41
36
requests:
42
-
storage: <2Gi> <4>
43
-
volumeMode: Block <5>
37
+
storage: <2Gi> <5>
44
38
----
45
39
<1> The name of the new data volume.
46
40
<2> The namespace where the source PVC exists.
47
41
<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.
51
44
52
45
. Start cloning the PVC by creating the data volume:
0 commit comments