Bootable RAID 1 array with Hoary?

volvoguy volvoguy at gmail.com
Sun Sep 4 04:59:17 UTC 2005


I've got a question that I can't seem to find a convincing answer for.
I have a fileserver that I'm converting to RAID 1 arrays as I can
afford the disks.

When I got the machine it had two identical 9Gb SCSI drives in it. I
just left the first alone (I think it has Win2k on it) and installed
Hoary on the second - then added a bunch of IDE drives for storage.

Now that I know how to create and manage a generic RAID1 array, I'd
like to take advantage of that second SCSI disk and "migrate" (for
lack of a better term) my Hoary install onto a RAID1 array. I already
know how to create the array with one disk missing (the current
install) and then blast all the data over to the other drive. What I
can't seem to find a definite answer for is whether or not Hoary is
capable of booting from the newly created array.

Since the data is the same on both drives, can I keep Grub pointing to
the /boot directory on one of the disk's partitions, or can I indeed
point Grub at the /boot directory on the array device? My Googling so
far makes me think that the way the RAID devices are initialized is
too far into the boot process for Grub to be able to do anything with
it. Can anybody clarify this for me? The most similar thing I've found
so far is someone trying to get the same functionality, but he's using
Gentoo and installing everything from scratch.

http://www.somedec.com/downloads/howto-bootable-linux-raid13.html

I'd really rather not reinstall everything if I don't have to. 

For my file storage, the array was made up of two entire hard drives.
To RAID-ify my whole OS, I think I'll need to create a new array with
my current Ubuntu installed disk listed as "missing". Then I'd need to
fdisk the "broken" array and create a "/" (root) partition and a swap
partition. Then format the root partition on the broken array as ext3
(and swap as swap), then MOUNT that new root partition and copy all
the data over from my existing Ubuntu install. Then I'd repeat the
mdadm/fdisk/format process on the other drive and add it into the now
fully functional array. Is this making any sense? :o)

If everything I said IS right, my question boils down to this: Can
Hoary (with Grub) boot off the array itself, or will I need to point
Grub at just one of the disks in the array (/dev/sda1 for example)?

Sorry to be so long winded, but it seemed a complicated enough issue
that the folks in the IRC channel couldn't give me a definite answer
either. Heck, I've gone this far, I might as well throw a chart in
here too. :o)

Current setup:

SCSI Drive 1                 | SCSI Drive 2
one NTFS w/Windows   | /dev/sdb1 - roughly 8.5Gb ext3
                                   | /dev/sdb2 - roughly 500Mb swap

Desired setup:

SCSI Drive 1                                              | SCSI Drive 2
/dev/sda1 - roughly 8.5Gb RAID autoconfig   | /dev/sdb1 - roughly
8.5Gb RAID autoconfig
/dev/sda2 - roughly 500Mb RAID autoconfig  | /dev/sda2 - roughly 500Mb
RAID autoconfig

Giving me:

/dev/md0 - roughly 8.5Gb root RAID1, ext3 format
/dev/md1 - roughly 500Mb swap (would this perform better as RAID0 as
opposed to RAID1?)


Thanks!
-- 
Aaron

Ubuntu SVG Artwork - http://www.volvoguy.net/ubuntu
-------------------------------------------------------------------------------
Art, like morality, consists of drawing the line somewhere. ~ G.K. Chesterton


More information about the ubuntu-users mailing list