Ubuntu Installation on Mirrored Root Disks
Jonathan Hudson
jh+ubuntu at daria.co.uk
Sat Nov 27 22:28:53 UTC 2004
Graham Jenkins wrote:
> I was Really Disappointed to find that Ubuntu won't let me do an
> installation on (software) mirrored root disks. Like .. if it can be
> done with RedHat 9, SuSe 9.1, etc. .. why can't it be done with
> Ubuntu??
>
> I actually tried to copy an unmirrored root partition onto a RAID1
> partition, then boot from the latter .. but kept getting problems with
> pivot_root.
>
I was disappointed too. On a box at work with 2x120GB SATA I ended up
with a somewhat overcomplex
/boot on both sd{a,b}1 (c. 50MB)
/ on both sd{a,b}2 (c.4GB)
swap on both sd{a,b}4 (c. 1GB)
rest RAID1, LVM sd{a,b}3 (c. 114GB)
I installed RAIDless, then moved /usr, /home, /opt, /var and some
others I can't recall to logical volumes on the RAID1. Means I
"wasted" around 3GB on / I no longer need, but with 120GB I can live
with that.
A nightly cron rsync job ensures the largely static /boot and / remain
in sync on each disk.
Whilst not ideal, it meets my requirement of having all user data on
RAID1 and everything else is at least replicated. The swaps are not
raided, which probably means the box will crash if I lose a disk (so
at least I'll know, but that was my choice, and can be changed at any
time). If one disk fails I can boot from a GRUB floopy or CD and
manually boot the box from the good one.
On a box at home, I've just created RAID1 /boot (ext2), / (reiserfs)
and swap and cp -a from a non-RAID1 install. It's using a vanilla,
self-complied, kernel.org 2.6.9, with no initrd. This boots and runs
just fine. So I guess your problem is that the Ubuntu kernel and
particularly its initrd can't pivot onto the RAID1 root partition;
building a custom kernel that doesn't require an initrd it probably
the easiest way to sort this.
I now rather regret not having the time to work out this solution
before I built the work box, because once it's set up, booting and
having / on RAID1 with a non-initrd kernel works fine (as long as
you're happy with building your own kernel, either from Ubuntu or
kernel.org sources).
HTH
-jonathan
More information about the ubuntu-users
mailing list