cc_staff
12
edits
(Marked this version for translation) |
(Added dd instructions for large volumes) |
||
Line 120: | Line 120: | ||
# You should now be able to see the image under Compute -> Images in the Arbutus Cloud web UI. This image can now be used to launch instances on Arbutus. Make sure to create a new volume when launching the instance if you want the data to be persistent. | # You should now be able to see the image under Compute -> Images in the Arbutus Cloud web UI. This image can now be used to launch instances on Arbutus. Make sure to create a new volume when launching the instance if you want the data to be persistent. | ||
# Once you have migrated and validated your volumes and instances, and once any associated DNS records updated, please delete your old instances and volumes on the legacy West Cloud. | # Once you have migrated and validated your volumes and instances, and once any associated DNS records updated, please delete your old instances and volumes on the legacy West Cloud. | ||
=== Migrating Large Volumes using Linux 'dd' === | |||
For large volumes, image based methods are not recommended. We recommend copying over your data to new volumes on Arbutus using rsync or similar file copy tools wherever possible. In cases where this is not possible (like for a bootable volume), the <code>dd</code> command can be used to make an identical copy of a volume from West Cloud on Arbutus: | |||
# Create a temporary instance on West Cloud (p1-1.5gb should be fine). Do the same on Arbutus Cloud. Use CentOS 7 as the OS. | |||
# Assign both of the above floating ips that you can SSH into. | |||
# Install the following packages on the temporary West Cloud instance: | |||
#: <code>yum install epel-release</code> | |||
#: <code>yum install pv</code> | |||
#: <code>yum install screen</code> | |||
# On the temporary Arbutus instance: | |||
#: <code> chmod u+s /bin/dd </code> | |||
# Copy the SSH private key you use to login as the "centos" user on the temporary Arbutus instance to the temporary West Cloud instance. | |||
# Make sure SSH security rules allow the temporary West Cloud instance to SSH into the temporary Arbutus instance. | |||
# For each volume you want to move from West Cloud to Arbutus: | |||
#* Create an empty volume of the same size on Arbutus; mark it bootable if it's a boot volume. | |||
#* Attach the above volume to the temporary instance on Arbutus. | |||
#* Attach the volume you want to copy from West Cloud to the temporary West Cloud instance. Note: you may need to delete the instance it is currently attached to. Do NOT delete the volume. | |||
# On the temporary West Cloud instance, execute the commands below. This command assumes that the source volume on West Cloud is attached to the temporary West Cloud instance as /dev/vdb, the volume size is 96G, the SSH key being used to login to the temporary Arbutus instance is key.pem, and the destination volume on Arbutus Cloud is attached to the temporary Arbutus Cloud instance as /dev/vdb. Also, substitute the real IP address of the Arbutus instance you will be connecting to. The <code>screen</code> command is used in case you get disconnected from your SSH session. | |||
#: <code>screen</code> | |||
#: <code>sudo dd bs=16M if=/dev/vdb | pv -s 96G | ssh -i key.pem centos@xxx.xx.xx.xx "dd bs=16M of=/dev/vdb"</code> | |||
# Once the process is complete, you will have an exact copy of the volume from West Cloud on Arbutus which you can then use to launch instances on Arbutus. | |||
As always, back up any important data prior to performing the steps. | |||
== Migrating ephemeral instances == <!--T:22--> | == Migrating ephemeral instances == <!--T:22--> |