Skip to content

Commit

Permalink
docs: add guide doc for flex migration
Browse files Browse the repository at this point in the history
Adding guide doc for flex migration steps.

Signed-off-by: subhamkrai <srai@redhat.com>
  • Loading branch information
subhamkrai committed Nov 22, 2021
1 parent 0368098 commit e6c3a7d
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions Documentation/flexMigration/flex-to-csi-migration.md
@@ -0,0 +1,35 @@
---
title: Migration
weight: 4100
indent: true
---

# Flex to CSI Migration

The tool [persistent-volume-migrator](https://github.com/ceph/persistent-volume-migrator) aims to help migrate Flex rbd Volumes to Ceph-Csi.

## Prerquisite

This guide assumes you have created a Rook cluster with Flex
1) Minimum ceph version should be Ceph-CSI supported.
2) Volume should be in BOUND state and should **not** be in use.
3) CSI storageClass should be created in which you want to migrate.
1) Example: CSI [storageclass](https://github.com/rook/rook/blob/master/cluster/examples/kubernetes/ceph/csi/rbd/storageclass.yaml).

**NOTE**: The Migration procedure will come with a downtime; As we need to scale down the applications using the Volumes before migration.

## Steps
1) Create rbac required to run migrator pod
1) `kubectl create -f cluster/examples/kubernetes/ceph/flex-migration/rbac.yaml`
2) Create migrator pod
1) `kubectl create -f cluster/examples/kubernetes/ceph/flex-migration/migrator.yaml`
3) Run command to start migration:
### To migrate single PVC:
1) `<binary_name> --pvc=<pvc-name> --pvc-namespace=<pvc-namespace> --destinationstorageclass=<storageclass-name-to-migrate-in> --rook-namespace=<rook-ceph> --ceph-cluster-namespace=<ceph-cluster-namespace>`
1) `--pvc` :**required**: reads name of the pvc to migrate
2) `--pvc-namespace` :**required**: reads the namespace of the PVC which is going to migrate
3) `--destinationstorageclass` :**required**: read the name of the storageclass in which you want mirgrate.
4) `-rook-namespace`: reads namespace where rook operator is running. **Defalult** rook-ceph.
5) `--ceph-cluster-namespace`: namespace where ceph cluster is created. **Defalult** rook-ceph.
### To mirage all the pvc in storageclass:
1) WIP

0 comments on commit e6c3a7d

Please sign in to comment.