Pages

Thursday, 8 October 2015

Transferring Data between Cloud Servers.

Cloud Servers.
Question scaling resources dedicated cloud servers coupled with a number of difficulties: adding memory or disk is not possible without downtime, and upgrade the disk subsystem often involves the complete transfer of all data (the volume of which can be very large) from the old server to the new. Easily move disks from one server to another is often also proves to be impossible: the reason for this may be incompatible interfaces, the use of different RAID-controllers, servers geographical distance from each other, etc. Copying the data over a network may take a lot of time, during which the service is idle. How can you transfer data to a new server, minimizing downtime of services?

We have long thought on this issue and today we present a solution to a wide audience, which seems to be the most successful.

The procedure for transferring data using the reporting method in this article consists of the following steps:

1. New server boots from external media, prepared block devices: are mapped drives are RAID-arrays;
2. Block devices are exported via a new server iSCSI - iSCSI targets are created;
3. On the old server runs iSCSI Initiator and connects to the Target on the new server. On the old server, and there are devices available to block a new server;
4. On the old server block device is added to the new server for LVM group;
5. Data is copied to the new block device server using data mirroring in LVM;
6. The old server is shut down;
7. On the new server still loaded from external media, mounted him transferred FS settings make the necessary changes;
8. New server reboots from disk, and then run all services.

If the new server encountered a problem, it shuts down. Turns on the old server, all services are still working on the old server.

Our proposed method is suitable for all operating systems that use LVM to logical partitions, and can be installed iSCSI initiator and target with.

On the server on which we carried out a pilot test of the proposed method, the OS was installed Debian Wheezy. In other operating systems can be used by other programs and commands, but the procedure will be similar.

All operations were carried out on a server Partitioning, the standard for our servers for automatic installation of the operating system. If your server uses a different disk layout, the parameters of some commands need to be changed.

Our method of data transfer is designed for experienced users who know what LVM, iSCSI. We are warned that errors in teams can lead to total or partial loss of data. Before starting data transfer, to save backups of important data on an external drive or storage.