01.15.06

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

Posted in Unix / Linux, Tips and Documentation at 3:27 pm by skoobi

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.

7 Comments »

  1. Raboliot said,

    April 5, 2006 at 12:52 pm

    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 said,

    April 17, 2006 at 7:26 am

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

  3. Rich Zimmmerman said,

    May 7, 2006 at 11:04 am

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

  4. skoobi said,

    May 9, 2006 at 10:29 am

    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 said,

    June 1, 2006 at 7:39 pm

    The initramfs scripts are now built into dapper.

  6. Sami Dalouche » RAID 5 vs RAID 50 (informal comparison/benchmark) said,

    November 17, 2006 at 3:38 pm

    […] 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 said,

    June 21, 2008 at 3:53 am

    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

Leave a Comment