Extending RAID1 to RAID5

Discussion in 'HOWTO-Related Questions' started by atjensen11, Jun 7, 2009.

  1. atjensen11

    atjensen11 New Member

    Despite being written for Debian Etch, I used the following How To to install RAID1 on an Ubuntu 8.04 LTS version.

    http://www.howtoforge.com/set-up-raid1-on-a-running-lvm-system-debian-etch

    It has been working fine for some time.

    Until recently, my server was limited to just two SATA drives. I recently installed another SATA controller and have the ability to add more drives. I would like to add another drive and convert the array to a RAID5 configuration.

    Can I modify the existing array? If so, will data on the array survive the conversion? Or do I have to (or should I) destroy and rebuild the array to accomplish this configuration?

    Thanks.
     
    Last edited: Jun 7, 2009
  2. id10t

    id10t Member

    Destroy and rebuild would be my vote... or at least, plan on doing it and if converting works then great.

    You could even test it with vmware or virtualbox first...
     
  3. atjensen11

    atjensen11 New Member

    Although I have found a few articles on converting or growing a RAID 1 array to a RAID 5 and it appears easy enough, I was contemplating destroying it and starting over.

    I would still prefer to use LVM on top of RAID 5, similar to what I am doing with my existing RAID 1 configuration. That shouldn't be an issue. However, I have seen conflicting information on whether the boot partition can be on a RAID 5 array. I am pretty sure my boot partition is currently on my RAID 1 array.

    Does anyone have a definitive answer on this?

    An alternative that I have been contemplating is adding a fourth drive with just the OS on it and using a three drive RAID 5 array just for data. My system uses Xen with all the DomU "drives" backed by logical volumes on the RAID array.

    I would appreciate any comments on this setup.
     
  4. id10t

    id10t Member

    Raid for data, single drive for OS. Once OS config is done, back up /etc and other files to somewhere on the RAID array.
     
  5. atjensen11

    atjensen11 New Member

    So I decided I am going to take this project in smaller steps. The first step is to install the OS on a new separate drive not on the RAID array.

    Here are two relevant lines as a result of the mount command related to my current array:

    Code:
    /dev/mapper/server-root on / type ext3 (rw,relatime,errors=remount-ro)
    /dev/md0 on /boot type ext3 (rw)
    
    I am leaning towards is not having to rebuild all my DomU machines that currently reside on logical partitions. To do that, I would keep my existing RAID array and just mount it in a new location using fstab.

    So is this approach correct?

    Remove the line from fstab that mounts the /dev/md0 on the /boot directory. This line should already point somewhere new once the new OS is installed on a separate drive.

    Remove the line from fstab that mounts the /dev/mapper/server-root on the / directory. This line should already point somewhere new once the new OS is installed on a separate drive.

    Do I need /dev/md0 mounted somewhere for RAID to work properly?

    My DomU config files disk entries all contain paths on /dev/mapper/server/... Do these need to be repathed?
     

Share This Page