I have CentOS 4.x installed on a single 500GB SATA drive. Drive is about 10 percent used. I would like to migrate to software RAID 5 without reinstalling the OS. Was thinking 3 500GB drives. Is that possible or must I reinstall? Matt
You will have to reinstall because if you add two more 500GB drives to make your set up into a three drive horse, you then need to format each drive and synchronise them together creating the new logical RAID volume so no data can be kept on said disks prior to the creation of the RAID. HTH! -- Regards, James ;) Joan Crawford<http://www.brainyquote.com/quotes/authors/j/joan_crawford.html> - "I, Joan Crawford, I believe in the dollar. Everything I earn, I spend." -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.centos.org/pipermail/centos/attachments/20091210/f97b4579/attachment.html>
At Thu, 10 Dec 2009 09:39:25 -0600 CentOS mailing list <centos at centos.org> wrote:> > I have CentOS 4.x installed on a single 500GB SATA drive. Drive is > about 10 percent used. I would like to migrate to software RAID 5 > without reinstalling the OS. Was thinking 3 500GB drives. Is that > possible or must I reinstall?If you can install 4 drives, eg you have 4 bays and 4 SATA connections, yes, it is easy. Just install the three new drives (to SATA port 2, 3, and 4), create the RAID-5 array (actually you'll need one small RAID-1 array for /boot, so you'll create two RAID sets: a small RAID-1 for /boot and the rest for the RAID-5) and copy everything over. You'll need to re-install grub (using grub-install) and then shutdown the machine and move the drive connectors around so that the new drives are 1, 2, and 3, and the old drive is 4 (or remove it completely), and start the machine up. You can then add the original drive as a hot spare disk (or not).> > Matt > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centos > >-- Robert Heller -- 978-544-6933 Deepwoods Software -- Download the Model Railroad System http://www.deepsoft.com/ -- Binaries for Linux and MS-Windows heller at deepsoft.com -- http://www.deepsoft.com/ModelRailroadSystem/
On Thursday 10 December 2009, Matt <lm7812 at gmail.com> wrote:> I have CentOS 4.x installed on a single 500GB SATA drive. Drive is > about 10 percent used. I would like to migrate to software RAID 5 > without reinstalling the OS. Was thinking 3 500GB drives. Is that > possible or must I reinstall? >In theory you can create a 3-drive RAID-5 with a "missing drive", rsync your filesystems over, and then repartition and force the existing drive to rebuild in. You can't boot off a RAID-5, so you'll need to put /boot on a separate partition, also preferably raid-1'd on at least 2 of the drives. It's not terribly hard but it's possibly to mess up and nuke your good drive before you're ready, so you should have a full backup on yet another drive anyway, and if you have that you might as well just build up a new system on the 3 drives and then restore your old filesystems over it. -- "No animals were harmed in the recording of this episode. We tried but that damn monkey was just too fast."
On 12/10/2009 10:39 AM, Matt wrote:> I have CentOS 4.x installed on a single 500GB SATA drive. Drive is > about 10 percent used. I would like to migrate to software RAID 5 > without reinstalling the OS. Was thinking 3 500GB drives. Is that > possible or must I reinstall?Moving to RAID-1 is going to be fairly easy. Moving to RAID-5 or RAID-6 will be a good bit trickier. You're going to want a good bare-metal backup (maybe Mondo Rescue http://www.mondorescue.org/) before you get started. Then your basic process is going to be: - make sure that mdadm is loading - partition the new 500GB disks similar to the old disk - build mdadm raid1 arrays on the new 500GB disk (with 1 drive missing) - copy your files over (cp -a) - make sure grub is on the new disk - change your fstab on the new disk to mount the arrays (/dev/mdX) instead of the partitions (/dev/sdaX) - remove the old disk and see if you can boot up on the new one I'm sure I'm forgetting something, just remember that you'll want to make lots and lots of backups (on a 3rd and 4th disk). And be ready to rebuild or restore from the bare-metal backup if you screw up.
>> I have CentOS 4.x installed on a single 500GB SATA drive. ?Drive is >> about 10 percent used. ?I would like to migrate to software RAID 5 >> without reinstalling the OS. ?Was thinking 3 500GB drives. ?Is that >> possible or must I reinstall? > > Moving to RAID-1 is going to be fairly easy. ?Moving to RAID-5 or RAID-6 > will be a good bit trickier.The more I hear I am thinking moving to RAID-1 would be fine. Is there a basic howto somewhere for that? Thanks. Matt