Best Strategies for Quickly Cloning Large Disks

0
8
Asked By TechieTurtle88 On

I'm dealing with several database servers that have enormous disks, many of which are mostly empty due to some colleagues not fully grasping computer management. Since these disks are in production with service level agreements, I need to shrink them by doing file copies. To minimize disruption, I'm using an Ansible playbook that creates a volume from a recent snapshot, launches a new EC2 instance to copy the data to a properly sized disk, and then switches the new volume back to the original instance after terminating the new one.

However, I've been testing with multi-terabyte disks and found that a 10GB copy took about 20 minutes! Locally, that same copy is only around 20 seconds. There are various options for volume creation from snapshots, including cloning volumes directly, which should be fast, but it seems everything is slow when copying large chunks of data, especially if the disks aren't completely filled. I'm surprised that the new functionality for volume cloning isn't more efficient. Why don't they just use a copy-on-write approach until the blocks are modified?

So, I'm wondering what's the best way to speed this process up while staying away from the production instance? Ideally, I could prep a volume the day before to ensure quicker data copying for the main automation. I have this dream of transferring a terabyte in about 20 minutes and then enjoying a leisurely lunch afterwards. For the final steps, after creating the new volume and moving it back, I'd use rsync to sync any changes made in the meantime. Any thoughts or suggestions to improve this speed?

1 Answer

Answered By CloudWizard99 On

You might want to check out the recent EBS Volume Cloning feature AWS just rolled out. It allows you to create copies of your volumes in just seconds with a simple API call or a click. This can be really handy if you're looking to quickly set up test environments or duplicate your databases for dev purposes.

DataDynamo44 -

I’ve heard about that too, but I didn’t see the speedy results on larger volumes. My manual volume copy was stuck at 13% initialized for a while. I mean, my experience seems far from ‘instant’—I'm starting to think there's some hidden bottleneck on bigger disks. I'll have to give it another look.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.