Running Ubuntu GNU/Linux on a FakeRAID/1 (mirroring) array

Edit: These information work for Ubuntu Breezy. Things may have changed with Dapper Drake
Most cheap hardware RAID controllers such as the VIA VT6421 are not purely hardware RAID systems, but should be seen as semi-soft, or FakeRAID controllers.

In order to install an Operating System on a FakeRAID array, it is thus necessary to setup a few things, since the underlying array is not completly transparent to the Operating System.

This short article, based on the Ubuntu Wiki FakeRaid HOWTO explains how to install Ubuntu Linux on such a FakeRAID array.

First of all, be aware that is it not currently possible (well, it is, actually, but one would have to revert to applying hacking changes in the Initial Ramdisk Image, so it is currently better to forget about it) to setup an LVM Volume on top of a FakeRAID array.

Since the Ubuntu Wiki FakeRaid HOWTO already explains how to install Ubuntu on a FakeRAID/0 array, I am just going to highlight the differences for a FakeRAID/1 array here.

The only difference is the creation of the Initial Ramdisk, which should load the dm-mirror module to allow the OS to read / write from the FakeRAID array.

The /etc/mkinitramfs/scripts/local-top/dmraid should be replaced by

#!/bin/sh

PREREQ=”"

prereqs()
{
echo “$PREREQ”
}

case $1 in
# get pre-requisites
prereqs)
prereqs
exit 0
;;
esac

modprobe -q dm-mod
modprobe -q dm-mirror

/sbin/dmraid -ay

In addition to the dm-mod module, the previous script launches the dm-mirror module. This means that the dm-mirror module should be copied. This is done by adding the line

dm-mirror

to the /etc/mkinitramfs/modules file.

The rest of the Ubuntu FakeRaid Howto gives a good explanation of the tasks that should be done in order to configure the FakeRaid array.

9 Responses to “Running Ubuntu GNU/Linux on a FakeRAID/1 (mirroring) array”

  1. Raboliot says:

    There is a bug for those who wants to CTRL+C – CTRL+V this script.
    Some quotes are not ASCII.

    PREREQ=””

    PREREQ=”"

  2. LCID Fire says:

    When doing all these steps with current dapper and sil 3124 I get an Error 13: file not found.

  3. Rich Zimmmerman says:

    OK, so if I have my system configured for RAID 0+1 do I need the dm-mirror module?

  4. skoobi says:

    No idea for the Error 13:… I guess there is something that changed in Dapper…

    Isn’t it due to the ASCII quoting problem mentionned above ?

    Concerning the RAID 0+1… I haven’t tried, but I guess you need the dm-mirror, since there is some mirroring inside.. If anyone has ever tried…

  5. BoneKracker says:

    The initramfs scripts are now built into dapper.

  6. [...] OK, so you just bought that wonderful 4U server, with dual-core Xeon/Core 2 Duo, redundant gigabit ethernet connections, redundant power supplies, KVM over IP / IPMI management card, and most importantly, this wonderful fully hardware-based RAID controller (Semi-Soft RAID has been a disaster for me, by the way). [...]

  7. Rocco says:

    please help me, because in hardy heron /etc/mkinitramfs doesn’t exist.
    where create the dmraid script???
    maybe in /etc/initramfs-tools/scripts/local-top/dmraid???
    thanks

  8. ObiDrunk says:

    hi, thnx for make the time to help us, im using Ubuntu 9.10 Karmic Koala i follow the guide published on the HowTo in the end of the instalation i mount the root partition, and then i look for the folder that you give here, but i cant find it, instead i get the same folder that @Rocco anounce here, and i create the file “sudo gedit dmraid” and i paste your scrip, i repleace the bad ” that @Raboliot tip here, but i have a question about the:

    # get pre-requisites
    prereqs)
    prereqs

    prereqs) <—- its that fine?

    thnx for taking the time to answer

  9. ObiDrunk says:

    oh, btw same for the second instruction, the folder its:

    /etc/initramfs-tools$

    in my case? there its a modules file. ty

Leave a Reply