Migrate container between regions using Pure Storage
In the case of very large systems, where downtime (due to a traditional migration) may be too long, we will use the following process
Requirement
An empty target VAP VM hardnode, in the new region.
| Term | Definition |
|---|---|
| CTIDS | The VAP container ID of the source container. The source being the container at its starting position. |
| CTIDT | The VAP container ID of the target container. The target being the now moved container at its destination. |
| CTIDD | The VAP container ID of the donar container. A donar being a temporary 'empty' container for VAP to move. |
Warning
Take a Pure snapshot of both the source and target hardnode volumes (on the pure storage array)
Step 1 - Donar Container
VAP GUI
We will need an empty donar container that is of the same type as the system to be moved.
Step 2 - Stop Source Container
VAP GUI
You must now stop the source container.
Step 3 - Drive files (root.hds)
VAP HARD NODE - SOURCE
We will now swop out the large root.hds file with the donar root.hds file.
Part A - Move source hds
We first want to rename our actual source data volume to something else, so that we can insert the donar data volume for migration.
UNKNOWN: Need to check if VAP tries to migrate the
root.hds.bkpfile as well.
Part B - Implement donar hds
We will now implement the donar hds device
Step 4 - Region migrate CT
VAP GUI
Initiate the migration of the source container from the source region to the target region
Step 5 - Hardnode migrate CT
VAP GUI
It is likely that the CT is not on the correct target Hardnode. You may need to move the CT to the desired hardnode in the region.
Step 6 - Stop CT
VAP GUI
Stop the environment/ct from the gui.
Step 7 - Backup new CT config
VAP HARD NODE - TARGET
You will now need to keep a copy of the newly modified config files for your CT.
Step 7 - Stop target hardnode
VAP HARD NODE - TARGET
You should now shut down the hardnode.
Warning
Use the VAP shutdown script to make sure it runs quickly.
Step 8 - Overwrite Pure Volume
PURE STORAGE
You will now need to copy (with overwrite) the volume on the source hardnode over the target hardnodes.
Step 9 - Start target hardnode
PROXMOX - HARD NODE VM- TARGET
You can now start the target hardnode.
Information
You can watch the VM console to see if the new disk mounts itself correctly.
Step 10 - Move old CTIDS priv to safety
VAP HARD NODE - TARGET
You will now need to rename the folder in which the migrated actual data volume resides, as we do not wish to overwrite it.
Step 11 - Restore the moved CT configs
VAP HARD NODE - TARGET
You can now restore the moved CT and it's relevant config files
Step 12 - Attach the actual data disk
VAP HARD NODE - TARGET
You can now move the actual data disk into it's correct location
mv /vz/private/<CTIDD>/root.hdd/root.hds /vz/private/<CTIDD>/root.hdd/root.hds.tmp
mv /vz/private/<CTIDS>_OLD/root.hdd/root.hds.bkp /vz/private/<CTIDT>/root.hdd/root.hds
Step 13 - Start container
VAP GUI
Now, hopefully, the you can start the container environment and the data should be moved.
Cleanups
Warning
Only do this once you confirm that everything is working
If everything is up and operational as requied, you can do the below.
Remove the config backup file
VAP HARD NODE - TARGET
This no longer required, but is taking up space on the boot drive.
Remove all other invalid private CTID folders
VAP HARD NODE - TARGET
Remove all folders referring to non-existant containers.
Remove the pure storage snapshots
PURE STORAGE
You can now destroy the manual snapshots created for the two volumes.
They will naturally be cleaned up after the recyclebin duration expires