Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We have a web service running on Amazon EC2. Currently we have some live user data stored on a single disk (EBS). We are considering moving to a RAID0 setup (we don't have to be concerned about the increased failure rate).

If we do this migration, what is the quickest (to minimize site unavailability) way to reliably transfer the user data to the RAID array?

One idea I had was to take a recent snapshot of the data, copy it over to the new RAID array, then when the site goes down for maintenance use rsync to copy only the changed data over. I'm not sure if this would actually save time or ensure data integrity though.

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

I use the exact approach you describe for migrating / copying data on EC2:

  1. Create EBS snapshot
  2. Create volume from EBS snapshot
  3. Warm up EBS volume (e.g., dd device to /dev/null)
  4. rsync
  5. Take production to maintenance mode
  6. rsync again
  7. Switch to new copy
  8. Bring production live again

With the right options, rsync should ensure a close to exact copy from the file system level. It varies a little with Linux distro, but perhaps:

rsync -aSHAX --delete source/ dest/

The cool thing about EC2 is that you can test your entire migration plan on temporary volumes and temporary instances before you do it for real.

share|improve this answer
    
Brilliant, thanks. And thanks for your work on the alestic AMIs! I'll be "testing my migration plan" on servers running them :) –  jberryman Oct 10 '11 at 22:33
1  
Glad to help. Note that most of the Ubuntu AMIs published in the last couple years have been built by Canonical, not by me. I migrated this work to them in 2009. I still do list the AMI ids in the table at the top of Alestic.com for convenience. –  Eric Hammond Oct 11 '11 at 18:39
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.