Skip to content

Commit 26ea196

Browse files
authored
Merge pull request #38095 from apinnick/mig834-more-pv-in-migplan
MIG-834: More PV values to edit in MigPlan
2 parents c272589 + 86f1f48 commit 26ea196

File tree

4 files changed

+49
-9
lines changed

4 files changed

+49
-9
lines changed

migrating_from_ocp_3_to_4/advanced-migration-options-3-4.adoc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,15 @@ include::modules/migration-mapping-destination-namespaces-in-the-migplan-cr.adoc
4242
include::modules/migration-excluding-pvcs.adoc[leveloffset=+2]
4343
include::modules/migration-mapping-pvcs.adoc[leveloffset=+2]
4444
include::modules/migration-editing-pvs-in-migplan.adoc[leveloffset=+2]
45+
46+
[id="additional-resources-for-editing-pv-attributes_{context}"]
47+
[discrete]
48+
==== Additional resources for editing PV attributes
49+
50+
* For details about the `move` and `copy` actions, see xref:../migrating_from_ocp_3_to_4/about-mtc-3-4.adoc#migration-mtc-workflow_about-mtc-3-4[MTC workflow].
51+
* For details about the `skip` action, see xref:../migrating_from_ocp_3_to_4/advanced-migration-options-3-4.adoc#migration-excluding-pvcs_advanced-migration-options-3-4[Excluding PVCs from migration].
52+
* For details about the file system and snapshot copy methods, see xref:../migrating_from_ocp_3_to_4/about-mtc-3-4.adoc#migration-understanding-data-copy-methods_about-mtc-3-4[About data copy methods].
53+
4554
include::modules/migration-kubernetes-objects.adoc[leveloffset=+2]
4655

4756
[id="migration-controller-options_{context}"]

migration_toolkit_for_containers/advanced-migration-options-mtc.adoc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,15 @@ include::modules/migration-mapping-destination-namespaces-in-the-migplan-cr.adoc
4141
include::modules/migration-excluding-pvcs.adoc[leveloffset=+2]
4242
include::modules/migration-mapping-pvcs.adoc[leveloffset=+2]
4343
include::modules/migration-editing-pvs-in-migplan.adoc[leveloffset=+2]
44+
45+
[id="additional-resources-for-editing-pv-attributes_{context}"]
46+
[discrete]
47+
==== Additional resources for editing PV attributes
48+
49+
* For details about the `move` and `copy` actions, see xref:../migration_toolkit_for_containers/about-mtc.adoc#migration-mtc-workflow_about-mtc[MTC workflow].
50+
* For details about the `skip` action, see xref:../migration_toolkit_for_containers/advanced-migration-options-mtc.adoc#migration-excluding-pvcs_advanced-migration-options-mtc[Excluding PVCs from migration].
51+
* For details about the file system and snapshot copy methods, see xref:../migration_toolkit_for_containers/about-mtc.adoc#migration-understanding-data-copy-methods_about-mtc[About data copy methods].
52+
4453
include::modules/migration-kubernetes-objects.adoc[leveloffset=+2]
4554

4655
[id="migration-controller-options_{context}"]

modules/migration-editing-pvs-in-migplan.adoc

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,31 @@
66
[id="migration-editing-pvs-in-migplan_{context}"]
77
= Editing persistent volume attributes
88

9-
You can edit the storage class and the access mode of persistent volumes (PVs) in the `MigPlan` custom resource (CR) after the PVs have been discovered by the `MigrationController` CR.
9+
After you create a `MigPlan` custom resource (CR), the `MigrationController` CR discovers the persistent volumes (PVs). The `spec.persistentVolumes` block and the `status.destStorageClasses` block are added to the `MigPlan` CR.
10+
11+
You can edit the values in the `spec.persistentVolumes.selection` block. If you change values outside the `spec.persistentVolumes.selection` block, the values are overwritten when the `MigPlan` CR is reconciled by the `MigrationController` CR.
12+
13+
[NOTE]
14+
====
15+
The default value for the `spec.persistentVolumes.selection.storageClass` parameter is determined by the following logic:
16+
17+
. If the source cluster PV is Gluster or NFS, the default is either `cephfs`, for `accessMode: ReadWriteMany`, or `cephrbd`, for `accessMode: ReadWriteOnce`.
18+
. If the PV is neither Gluster nor NFS _or_ if `cephfs` or `cephrbd` are not available, the default is a storage class for the same provisioner.
19+
. If a storage class for the same provisioner is not available, the default is the default storage class of the destination cluster.
20+
21+
You can change the `storageClass` value to the value of any `name` parameter in the `status.destStorageClasses` block of the `MigPlan` CR.
22+
23+
If the `storageClass` value is empty, the PV will have no storage class after migration. This option is appropriate if, for example, you want to move the PV to an NFS volume on the destination cluster.
24+
====
25+
1026

1127
.Prerequisites
1228

1329
* `MigPlan` CR is in a `Ready` state.
1430

1531
.Procedure
1632

17-
* Edit the values of `spec.persistentVolumes.selection.storageClass` and `spec.persistentVolumes.selection.accessMode` in the `MigPlan` CR:
33+
* Edit the `spec.persistentVolumes.selection` values in the `MigPlan` CR:
1834
+
1935
[source,yaml]
2036
----
@@ -35,11 +51,15 @@ spec:
3551
name: mysql
3652
namespace: mysql-persistent
3753
selection:
38-
action: copy
39-
copyMethod: filesystem
40-
storageClass: cephrbd <1>
41-
accessMode: ReadWriteMany <2>
54+
action: <copy> <1>
55+
copyMethod: <filesystem> <2>
56+
verify: true <3>
57+
storageClass: <gp2> <4>
58+
accessMode: <ReadWriteMany> <5>
4259
storageClass: cephfs
4360
----
44-
<1> Destination storage class.
45-
<2> Destination access mode.
61+
<1> Allowed values are `move`, `copy`, and `skip`. If only one action is supported, the default value is the supported action. If multiple actions are supported, the default value is `copy`.
62+
<2> Allowed values are `snapshot` and `filesystem`. Default value is `filesystem`.
63+
<3> The `verify` parameter is displayed if you select the verification option for file system copy in the {mtc-short} web console. You can set it to `false`.
64+
<4> You can change the default value to the value of any `name` parameter in the `status.destStorageClasses` block of the `MigPlan` CR. If no value is specified, the PV will have no storage class after migration.
65+
<5> Allowed values are `ReadWriteOnce` and `ReadWriteMany`. If this value is not specified, the default is the access mode of the source cluster PVC. You can only edit the access mode in the `MigPlan` CR. You cannot edit it by using the {mtc-short} web console.

modules/migration-understanding-data-copy-methods.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ The {mtc-full} ({mtc-short}) supports the file system and snapshot data copy met
1313

1414
{mtc-short} copies data files from the source cluster to the replication repository, and from there to the target cluster.
1515

16+
The file system copy method uses Restic for indirect migration or Rsync for direct volume migration.
17+
1618
[cols="1,1", options="header"]
1719
.File system copy method summary
1820
|===
@@ -30,7 +32,7 @@ a|* Slower than the snapshot copy method.
3032

3133
{mtc-short} copies a snapshot of the source cluster data to the replication repository of a cloud provider. The data is restored on the target cluster.
3234

33-
AWS, Google Cloud Provider, and Microsoft Azure support the snapshot copy method.
35+
The snapshot copy method can be used with Amazon Web Services, Google Cloud Provider, and Microsoft Azure.
3436

3537
[cols="1,1", options="header"]
3638
.Snapshot copy method summary

0 commit comments

Comments
 (0)