Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
OsamaKhan220 committed Jan 20, 2025
1 parent d82e622 commit 4b28d37
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,28 @@ Use Cases
## How to Use

### Step-by-Step Process:
1. Identify the PV to Copy: Find the PersistentVolume (PV) you wish to copy.

2. Change PV Reclaim Policy: Update the persistentVolumeReclaimPolicy of the PV to Retain.
1. Clone the Repository: First, clone the repository that contains the pvc-copy-tool.

3. Get PV Name: Retrieve the name of the PV you want to copy.
```bash
git clone https://github.com/stakater/pvc-copy-tool.git
```

2. Identify the PV to Copy: Find the PersistentVolume (PV) you wish to copy.

3. Change PV Reclaim Policy: Update the persistentVolumeReclaimPolicy of the PV to Retain.

4. Get PV Name: Retrieve the name of the PV you want to copy.

4. Deploy the Helm Chart: Apply the provided Helm chart, specifying:
5. Deploy the Helm Chart: Apply the provided Helm chart, specifying:
- The name of the PV in the values.yaml file.
- The name, storage class, and size of the new PVC.

5. Delete the Original PVC: Delete the old PVC and remove the claimRef from the source PV.
6. Delete the Original PVC: Delete the old PVC and remove the claimRef from the source PV.

6. Monitor the Job: The job will begin copying data from the original PV to the new PVC. The logs may show warnings about the inability to preserve the original file owners, but this is a known limitation due to OpenShift security settings and can be ignored.
7. Monitor the Job: The job will begin copying data from the original PV to the new PVC. The logs may show warnings about the inability to preserve the original file owners, but this is a known limitation due to OpenShift security settings and can be ignored.

7. Cleanup: After the data has been copied, the new PVC will be available, and you can remove the Helm chart.
8. Cleanup: After the data has been copied, the new PVC will be available, and you can remove the Helm chart.

## Rebinding the PV to the Original PVC
Once the data has been copied and the Job has been deleted, you can rebind the PV to the original PVC name. If you're using an inflexible operator, like openshift-image-operator, you may need to perform a "hot swap" with the PVC for the PV to be properly bound.
Expand Down

0 comments on commit 4b28d37

Please sign in to comment.