diff --git a/migrating_from_ocp_3_to_4/advanced-migration-options-3-4.adoc b/migrating_from_ocp_3_to_4/advanced-migration-options-3-4.adoc index 3e137b76a545..765906d17cac 100644 --- a/migrating_from_ocp_3_to_4/advanced-migration-options-3-4.adoc +++ b/migrating_from_ocp_3_to_4/advanced-migration-options-3-4.adoc @@ -42,6 +42,15 @@ include::modules/migration-mapping-destination-namespaces-in-the-migplan-cr.adoc include::modules/migration-excluding-pvcs.adoc[leveloffset=+2] include::modules/migration-mapping-pvcs.adoc[leveloffset=+2] include::modules/migration-editing-pvs-in-migplan.adoc[leveloffset=+2] + +[id="additional-resources-for-editing-pv-attributes_{context}"] +[discrete] +==== Additional resources for editing PV attributes + +* 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]. +* 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]. +* 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]. + include::modules/migration-kubernetes-objects.adoc[leveloffset=+2] [id="migration-controller-options_{context}"] diff --git a/migration_toolkit_for_containers/advanced-migration-options-mtc.adoc b/migration_toolkit_for_containers/advanced-migration-options-mtc.adoc index 7134b7dbbcbf..60b2c0187589 100644 --- a/migration_toolkit_for_containers/advanced-migration-options-mtc.adoc +++ b/migration_toolkit_for_containers/advanced-migration-options-mtc.adoc @@ -41,6 +41,15 @@ include::modules/migration-mapping-destination-namespaces-in-the-migplan-cr.adoc include::modules/migration-excluding-pvcs.adoc[leveloffset=+2] include::modules/migration-mapping-pvcs.adoc[leveloffset=+2] include::modules/migration-editing-pvs-in-migplan.adoc[leveloffset=+2] + +[id="additional-resources-for-editing-pv-attributes_{context}"] +[discrete] +==== Additional resources for editing PV attributes + +* For details about the `move` and `copy` actions, see xref:../migration_toolkit_for_containers/about-mtc.adoc#migration-mtc-workflow_about-mtc[MTC workflow]. +* 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]. +* 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]. + include::modules/migration-kubernetes-objects.adoc[leveloffset=+2] [id="migration-controller-options_{context}"] diff --git a/modules/migration-editing-pvs-in-migplan.adoc b/modules/migration-editing-pvs-in-migplan.adoc index 40f558f77bb5..563d83cbce95 100644 --- a/modules/migration-editing-pvs-in-migplan.adoc +++ b/modules/migration-editing-pvs-in-migplan.adoc @@ -6,7 +6,23 @@ [id="migration-editing-pvs-in-migplan_{context}"] = Editing persistent volume attributes -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. +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. + +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. + +[NOTE] +==== +The default value for the `spec.persistentVolumes.selection.storageClass` parameter is determined by the following logic: + +. If the source cluster PV is Gluster or NFS, the default is either `cephfs`, for `accessMode: ReadWriteMany`, or `cephrbd`, for `accessMode: ReadWriteOnce`. +. 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. +. If a storage class for the same provisioner is not available, the default is the default storage class of the destination cluster. + +You can change the `storageClass` value to the value of any `name` parameter in the `status.destStorageClasses` block of the `MigPlan` CR. + +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. +==== + .Prerequisites @@ -14,7 +30,7 @@ You can edit the storage class and the access mode of persistent volumes (PVs) i .Procedure -* Edit the values of `spec.persistentVolumes.selection.storageClass` and `spec.persistentVolumes.selection.accessMode` in the `MigPlan` CR: +* Edit the `spec.persistentVolumes.selection` values in the `MigPlan` CR: + [source,yaml] ---- @@ -35,11 +51,15 @@ spec: name: mysql namespace: mysql-persistent selection: - action: copy - copyMethod: filesystem - storageClass: cephrbd <1> - accessMode: ReadWriteMany <2> + action: <1> + copyMethod: <2> + verify: true <3> + storageClass: <4> + accessMode: <5> storageClass: cephfs ---- -<1> Destination storage class. -<2> Destination access mode. +<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`. +<2> Allowed values are `snapshot` and `filesystem`. Default value is `filesystem`. +<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`. +<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. +<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. diff --git a/modules/migration-understanding-data-copy-methods.adoc b/modules/migration-understanding-data-copy-methods.adoc index bb1dd6cca7dc..56162760b0b4 100644 --- a/modules/migration-understanding-data-copy-methods.adoc +++ b/modules/migration-understanding-data-copy-methods.adoc @@ -13,6 +13,8 @@ The {mtc-full} ({mtc-short}) supports the file system and snapshot data copy met {mtc-short} copies data files from the source cluster to the replication repository, and from there to the target cluster. +The file system copy method uses Restic for indirect migration or Rsync for direct volume migration. + [cols="1,1", options="header"] .File system copy method summary |=== @@ -30,7 +32,7 @@ a|* Slower than the snapshot copy method. {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. -AWS, Google Cloud Provider, and Microsoft Azure support the snapshot copy method. +The snapshot copy method can be used with Amazon Web Services, Google Cloud Provider, and Microsoft Azure. [cols="1,1", options="header"] .Snapshot copy method summary