mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
38 lines
1.4 KiB
Plaintext
38 lines
1.4 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * migrating_from_ocp_3_to_4/advanced-migration-options-3-4.adoc
|
|
// * migration_toolkit_for_containers/advanced-migration-options-mtc.adoc
|
|
|
|
:_mod-docs-content-type: PROCEDURE
|
|
[id="migration-mapping-pvcs_{context}"]
|
|
= Mapping persistent volume claims
|
|
|
|
You can migrate persistent volume (PV) data from the source cluster to persistent volume claims (PVCs) that are already provisioned in the destination cluster in the `MigPlan` CR by mapping the PVCs. This mapping ensures that the destination PVCs of migrated applications are synchronized with the source PVCs.
|
|
|
|
You map PVCs by updating the `spec.persistentVolumes.pvc.name` parameter in the `MigPlan` custom resource (CR) after the PVs have been discovered.
|
|
|
|
.Prerequisites
|
|
|
|
* `MigPlan` CR is in a `Ready` state.
|
|
|
|
.Procedure
|
|
|
|
* Update the `spec.persistentVolumes.pvc.name` parameter in the `MigPlan` CR:
|
|
+
|
|
[source,yaml]
|
|
----
|
|
apiVersion: migration.openshift.io/v1alpha1
|
|
kind: MigPlan
|
|
metadata:
|
|
name: <migplan>
|
|
namespace: openshift-migration
|
|
spec:
|
|
...
|
|
persistentVolumes:
|
|
- capacity: 10Gi
|
|
name: <pv_name>
|
|
pvc:
|
|
name: <source_pvc>:<destination_pvc> <1>
|
|
----
|
|
<1> Specify the PVC on the source cluster and the PVC on the destination cluster. If the destination PVC does not exist, it will be created. You can use this mapping to change the PVC name during migration.
|