Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions migrating_from_ocp_3_to_4/advanced-migration-options-3-4.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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}"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}"]
Expand Down
36 changes: 28 additions & 8 deletions modules/migration-editing-pvs-in-migplan.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,31 @@
[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

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

.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]
----
Expand All @@ -35,11 +51,15 @@ spec:
name: mysql
namespace: mysql-persistent
selection:
action: copy
copyMethod: filesystem
storageClass: cephrbd <1>
accessMode: ReadWriteMany <2>
action: <copy> <1>
copyMethod: <filesystem> <2>
verify: true <3>
storageClass: <gp2> <4>
accessMode: <ReadWriteMany> <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.
4 changes: 3 additions & 1 deletion modules/migration-understanding-data-copy-methods.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
|===
Expand All @@ -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
Expand Down