Move a Cloud Block Storage volume between servers
This article describes how to move a software RAID Cloud Block Storage volume from one Cloud server to another. You might want to perform this task when you need to build to a larger General Purpose server.
Before you can perform this task, you must have a software RAID volume. For information about creating a RAID volume, see Configure a software RAID on a Linux General Purpose Cloud server.
Detach the RAID volume
You must detach the volume from the source server before you can move it to the destination server.
cat mdstatto see the name of the md device, as seen in the following example:
cat /proc/mdstat Personalities : [raid1] md0 : active raid1 xvdc xvdb 157155200 blocks super 1.2 [2/2] [UU]
In this example, the md device is
mountcommand to find the mount point.
mount /dev/md0 on /raid type ext3 (rw)
In this example, the volume mounted is /raid.
Unmount the RAID volume
Unmount the volume, as shown in the following example:
mdadmto deactivate the md device, as shown in the following example:
mdadm --stop /dev/md0 mdadm: stopped /dev/md0
In the Cloud Control Panel, navigate to the details page for the server from which you want to detach the Cloud Block Storage volumes that composed the RAID.
In the Storage Volumes section of the server details page, click the Actions gear next to each volume that you want to detach, and select Detach Volume.
In the warning pop-up box, click Detach Volume.
Attach the RAID volume
Attach the RAID volume to the Destination server.
fdisk -lto see the device IDs of the newly attached Cloud Block Storage volumes.
Disk /dev/xvdb: 161.1 GB, 161061273600 bytes 255 heads, 63 sectors/track, 19581 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Disk /dev/xvdc: 161.1 GB, 161061273600 bytes 255 heads, 63 sectors/track, 19581 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000
Recreate the RAID volume
mdadmon destination server if it is not already installed.
For Redhat, CentOS, Fedora, and Scientific Linux (SL):
sudo yum install mdadm
For Ubuntu or Debian:
sudo apt-get update sudo apt-get install mdadm
Reassemble the volumes in the RAID.
mdadm --assemble --scan mdadm: /dev/md/0 has been started with 2 drives.
Remount the RAID.
mkdir /newraid mount /dev/md0p1 /newraid
Continue the conversation in the Rackspace Community.
©2016 Rackspace US, Inc.
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License