0

I asked this on askubuntu.com as well but since it's a server question, figured I'd throw it on SF, too.

Haven't run into this situation before but it seems simple enough. Looking for advice/guidance on the following issue.

I have an Ubuntu 11.10 64-bit server that is configured with 2 identical hard drives in a RAID-1 through the mdadm utility. It's a simple LAMP server that runs a few projects I'm working on but is growing out of the current storage. What I would like to do is install 3 additional hard drives as a second array using mdadm and RAID-5 and have it accessible as /sites (or something similar). I would then like to then move the contents of the projects on the RAID-1 to this new bigger array and simply update their VirtualHost definitions to reflect their new location.

Example

Project A currently located in /home/projecta but after the new RAID-5 is created and accessible the location would be /sites/projecta whre /sites is the path to the new RAID-5.

Am I right in thinking it is this simple or is there a lot more to it than that?

Thanks in Advance!

rws907
  • 231
  • 2
  • 8

1 Answers1

0

It should be as simple as that. If the sites are live and active though, you may need to shut them down to ensure that there are no changes to the filesystem while to migrate the files to the new system.

And of course, instead of just setting up the raid the next time, set up LVM. That way, you can do all this stuff transparently.

drone.ah
  • 482
  • 2
  • 6
  • Thanks! I'm going to be trying this on the upcoming weekend. I expected some downtime while I move the sites so that's expected. I just wanted to reduce that downtime as much as possible and being able to do this will be much more beneficial then reloading the server from scratch. I don't have a lot of experience with LVM but does it allow you to move "live" sites? – rws907 Jan 23 '13 at 15:32
  • under the above circumstances yes. Your sites would be on a Logical Volume. After adding the new array, you would just extend the volume to include the new array. You can them remove the old array (if you wanted) by removing that physical volume from the logical volume. LVM will migrate the data in the background without affecting the website. There will of course be some performance degradation though. – drone.ah Jan 23 '13 at 15:38