ROOT raid (software raid 1)
Jonathan Hudson
jh+ubuntu at daria.co.uk
Sun Dec 5 23:15:22 UTC 2004
Rich Duzenbury wrote:
> Hi ubuntu-ers,
>
> I'm in need of some directions. I want to run ubuntu for my desktop,
> but the installer doesn't support root or boot on raid.
>
> It seems that there must be a way to convert to raid after the fact, as
> I've seen for some other distros.
>
> I've tried a couple of the other distro specific directions, and just
> wind up with a kernel panic.
>
> Are there some ubuntu specific instructions or advice? Thanks.
I now, after some trial and error, have my dual SATA disk box running
RAID1 on Unbuntu.
Basically, it came down to:
1. Install normally on one disk (DISK_1).
2. Build a custom kernel with IDE, RAID1 and *any other stuff needed
to boot*. This may include SATA, SCSI-disk, file systems etc. Add a
GRUB entry to boot this kernel.
3. Reboot with this kernel, check it all works, and /proc/mdstat exits.
4. Partition the other disk (DISK_2). Create RAID1 devices for DISK_2
with the other disk as "missing". Create file systems as required. (I
made /boot, /, swap and a spare partition).
5. Mount the new RAID1 devices as /dev/md0, /dev/md1 etc.
6. Copy the stuff from DISK_1 to the temporary mounted DISK_2
(/dev/md*) [rsync -ax or similar].
7. Modify or add a GRUB entry to boot from the RAID1.
8. Reboot.
9. Verify that you're really booted from the RAID (DISK_2) :-)
10. Repartition the original disk (DISK_1) e.g. sfdisk -d /dev/sdb |
sfdisk /dev/sda.
11. Add the new partitions on DISK_1 into the relevant RAID devices
(/dev/mdX).
12. Sit back in wonder as your RAIDs rebuild. You should feel pretty
smug at this stage.
13. Fix up GRUBS, both MRBs etc.
I sat down and thought pretty hard about how I'd do this migration and
wrote out a detailed checklist with all the commands to build / add
the RAIDs etc. This was somewhat specific to my work environment; I'll
generalise / sanitise it and post it in the next day or so.
There are also plenty of howtos on this. I found
<http://www.linuxsa.org.au/mailing-list/2003-07/1270.html> very helpful.
Good luck.
-jh
More information about the ubuntu-users
mailing list