
Block storage is a reliable solution for storing data in fixed volumes, offering low-latency access to persistent storage. Vultr provides high-performance, highly available block storage options using HDD or NVMe SSDs. Similarly, Linode offers block storage volumes that can be attached to its compute instances.
Follow this guide to migrate a block storage volume from Linode to Vultr. You’ll configure both storage volumes, transfer your data, and verify the integrity of the migration process.
Before you begin, you need to:
This section walks you through setting up both ends of the migration. You'll mount the source block storage on your Linode instance and prepare the destination block storage on your Vultr instance to receive the data.
Follow these steps to mount your Linode Block Storage volume and prepare it with sample data for migration.
List all available block devices on your Linode instance.
You should see an output similar to the following:
In the output, sda is the primary disk, and sdb is used for swap space. sdc represents the attached Linode Block Storage volume. Linode assigns block device names in alphabetical order based on detection, so additional volumes would appear as sdd, sde, and so on.
Check the MOUNTPOINT column. If it's empty for sdc, the volume is not mounted and likely doesn't have a filesystem yet.
Format the volume with EXT4. Replace VOLUME_LABEL with your actual volume label.
Output:
This step will erase all data on the volume. Skip it if the volume already has content.
Create a mount point directory.
Mount the volume to the created directory.
Replace VOLUME_LABEL with your volume label.
Verify that the volume is mounted by listing all block devices.
Output:
Output should now show /mnt/<VOLUME_LABEL> under the MOUNTPOINTS column for sdc.
Add sample data to test the migration. First, create a test directory and file.
Add this text and save the file.
Create a large file to simulate real data.
The command above creates a file with a size of 500 megabytes.
Verify the files.
Replace VOLUME_LABEL with your volume label. You should see an output similar to:
This confirms that your sample files were created successfully in the Linode Block Storage volume.
Verify the installed Rsync version to use when migrating volumes.
Your output should be similar to the one below.
In this section, you’ll configure your Vultr Block Storage volume to receive data from the Linode instance.
List all available block devices on the Vultr instance.
Output:
In this output, vdb is the Vultr Block Storage volume. The empty MOUNTPOINT column shows that it's not mounted and has no filesystem.
Create an EXT4 filesystem on the volume.
Output:
Create a mount point. Replace <VULTR_STORAGE> with your storage label.
Mount the volume to the directory you created.
Reload systemd to recognize mount changes.
Verify the volume is mounted and check its size.
Output:
You should see /dev/vdb mounted on /mnt/<VULTR_STORAGE>.
Grant full ownership to your user for access. By default, a mounted block storage volume is owned by root, which can restrict access for non-root users.
Replace <USER> and <VULTR_STORAGE> accordingly.respectively.
Get the UUID of the mounted volume.
Output:
Take note of the UUID, which is ea527cb1-81c4-469d-a697-b219af936a86, in this example.
Open the fstab file to enable persistent mounting.
Add the following entry to the bottom of the file.
/dev/disk/by-uuid/<VULTR_STORAGE_UUID>: Specifies the block storage device identifier./mnt/<VULTR_STORAGE>: Defines where the volume will be mounted. ext4: Defines the type of filesystem, which is ext4 in this case.defaults: Uses default mount options such as read/write and allows execution.0: Determines if dump should back up the filesystem. 0 means the backup is disabled.2: Runs the filesystem check on boot, after the root filesystem.Save the file, then apply the changes:
With both storage volumes configured, you can now transfer data from the Linode volume to the Vultr Block Storage using rsync over SSH. This method encrypts the data in transit and efficiently syncs only the necessary files.
On your Linode instance, run the following command to start the migration. Replace the placeholders with your actual values:
<LINODE_VOLUME_LABEL>: Linode volume label<VULTR_USER>: Username on the Vultr instance<VULTR_INSTANCE_IP>: Vultr instance’s IP address<VULTR_STORAGE>: Vultr volume mount point From the above command, the options used with rsync are:
-a: Preserves file attributes (archive mode)-v: Enables verbose output-z: Compresses data during transfer--progress: Displays real-time progress--exclude="lost+found": Skips the system-generated lost+found directoryDepending on the volume of data and your network speed, this process may take some time. The --progressoption helps you monitor it.
When prompted, enter your Vultr instance's user password.
If the transfer fails or gets interrupted, simply rerun the same rsync command. It will resume by copying only the remaining files.
After the transfer completes, compare the directory sizes on both instances to confirm that all data was migrated.
On the Linode instance:
Output:
On the Vultr instance:
Output:
While comparing directory sizes helps confirm the data transfer, using checksums offers a more reliable method to verify data integrity. In this section, you'll generate and compare checksum files on both Linode and Vultr instances.
Generate checksums on the Linode volume. Replace <VOLUME_LABEL> with your Linode volume label.
From the above command:
find /mnt/<VOLUME_LABEL>/ -type f: Locates all files in the mounted block storage.-exec md5sum {} \;: Computes the MD5 checksum for each file.sort -k 2 > linode_checksums.txt: Sorts the output by filename and writes it to linode_checksums.txt.For stronger cryptographic integrity checking, you can replace md5sum with sha256sum in both checksum generation and comparison steps. This provides enhanced protection against rare collision scenarios.
Transfer the checksum file to the Vultr instance. Replace <USER> and <VULTR_INSTANCE_IP> with your Vultr instance's SSH username and IP address.
Enter the SSH password when prompted.
Output:
Generate checksums on the Vultr volume. Replace <VULTR_STORAGE> with your Vultr block storage label.
Compare both checksum files.
If the files differ only in mount paths but not checksums, the migration was successful. For example:
Output:
For stronger cryptographic integrity checking, you can replace md5sum with sha256sum in both checksum generation and comparison steps. This provides enhanced protection against rare collision scenarios.
Once you’ve verified that all data has been migrated successfully, follow these final steps to complete the transition to Vultr.
Update your DNS records to point to the public IP address of your Vultr instance.
Stop any applications or services still using the Linode Block Storage volume.
Detach the Linode volume from your Linode instance to avoid conflicts.
Update your application's configuration files to reference the new storage location on the Vultr instance.
Test your application thoroughly on the Vultr instance to ensure everything works as expected.
Decommission any unused Linode resources, including block storage volumes and compute instances.
In this guide, you migrated data from a Linode Block Storage volume to a Vultr Block Storage volume using rsync over SSH. You validated the integrity of the transfer using checksums and configured the Vultr volume for persistent access. This process enables you to take full advantage of Vultr’s fast, reliable block storage for your workloads.
For additional configuration options or advanced usage, refer to the official Vultr Block Storage documentation.
0 Comments
Be the first to comment and share your perspective with the community.