HOWTO: SUSE 10.0 and Software RAID a.k.a FakeRAID

Discussion in 'HOWTO-Related Questions' started by crushton, Dec 13, 2005.

  1. oL'z

    oL'z New Member

    I don't know if this goes here-but it is "fake"

    Fake Raid? LVM in SuSe 10 64-bit on LP UT nf3 UD
    2-WD 75GB on SATA 1-2
    Do not enable raid in bios-Grub no LiLo
    setup 3 partitions on each drive, mirror
    sda1 native 1-13 boot ext2
    sda2 swap 14-275 swap
    sda3 LVM 276-9728
    sdb1 native 1-13 boot ext2
    sdb2 swap 14-275 swap
    sdb3 LVM 276-9728
    system 144GB LVM2 2-stripe 64k
    system/root/LV xfs

    YAST does most of the work in expert mode
    You can add drives, backup, and boot with rescue media.
    Some of this is covered here some here some here
  2. fpereira

    fpereira New Member

    LSI megaraid

    I have recently installed following a similar procedure in a server with lsi megaraid and noted very high load that seems to be caused by kmirrord process.

    Anyone have experience with LSI megaraid & kernel 2.6?

    The machine still doesnt't boot. Will solve the "grep: command not found" tomorrow.

    Thanks for the info.
  3. falko

    falko Super Moderator Howtoforge Staff

    You must install the grep package.
  4. schlocke

    schlocke New Member

    Some helpfull tips

    I had the same problems installtion Suse 10 on my raid. But with Suse 10.1 there is a better way:

    While installing, switch to the console an type:
    dmraid -an
    modprobe dm-mirror
    dmraid -ay -i

    now you can list your raid volumes:
    ls /dev/mapper/

    or you can edit the partitions on this raid:
    fdisk /dev/mapper/<raiddevice>
    for example:
    fdisk /dev/mapper/nvidia_jhadcged

    Next step: Use the yast partition manager and re-read the partition table. Now there is a new drive /dev/dm-3 or similar.
    This drive can not be edited or re-partitioned. You have to do this before with fdisk.
    Do NOT mount anything from your native drives (e.g. sda or sdb) because there are now "busy" and can't be used.

    Next problem apears while installing the bootloader grub: It seems there is a bug resolving the drive name, so you must edit the parameters by hand. Instead /dev/sda use /dev/mapper/<your raid device>. Edit the device map and replace (hd0) with /dev/mapper/<your raid device>.
    Edit menu.lst and replace (/dev/dm-,-1) with (dev/mapper/<your raid device>,<your linux partition number>). See grub manual for details.

    After Installation you can't boot from this volume, because dm-mirror is not loaded and dmraid not active. So you must boot from CD and create your own initrd, see the first topic in this thread. After this everything should work fine.

    Question to the others: mkinitrd seems to be changed, so the line numbers do not match. Anybody knows the best places??
  5. falko

    falko Super Moderator Howtoforge Staff

    What line numbers?
  6. MoonenW

    MoonenW New Member

    I don't understand this.
    Does this mean that I should be able to use a NVRAID-0 set build with WinXP as a boot device for Suse Linux 10.1 ?
    And if not, do you know how this can be done - if at all?
  7. markes

    markes New Member

    Howto suse 10.1

    FakeRaid for SuSe 10.1 is working fine!

    I hope my way is more easier for you.

    First of all install windows on your raid disk, because otherwise it will overwrite the bootloader.

    You have to change all following enters to your system required configuration!

    -Take an old ata hard disk and install the new suse10.1 on it.
    in Yast also install the GCC-C++packet
    Download the dmraid-1.0.0rc11-pre1.tar.bz2 from
    (Warning older versions are not working for the kernel, the dmraid 0.99_1.0.0rc8-12 package included in the suse10.1 also isn´t working)

    -Shut down system and strip on your raid disk, start suse10.1 from your old hard disk.
    Log in as root, extract your downloaded dmraid, change into dmraid folder, open console and type the following:

    „cp -f /tools/dmraid /sbin/dmraid“
    „modprobe dm-mod“
    „tools/dmraid -ay -i“
    „ls /dev/mapper“

    now you should have an output like control via_bdeaacdjjh

    -create your partitons
    „fdisk /dev/mapper/via_bdeaaccdjjh
    create one swap and one reiserfs partition

    this is for example my partition table:
    linux:/home/mk # fdisk /dev/mapper/via_bdeaacdjjh

    Die Anzahl der Zylinder für diese Platte ist auf 38914 gesetzt.
    Daran ist nichts verkehrt, aber das ist größer als 1024 und kann
    in bestimmten Konfigurationen Probleme hervorrufen mit:
    1) Software, die zum Bootzeitpunkt läuft (z. B. ältere LILO-Versionen)
    2) Boot- und Partitionierungssoftware anderer Betriebssysteme
    (z. B. DOS FDISK, OS/2 FDISK)

    Befehl (m für Hilfe): p

    Platte /dev/mapper/via_bdeaacdjjh: 320.0 GByte, 320083770368 Byte
    255 Köpfe, 63 Sektoren/Spuren, 38914 Zylinder
    Einheiten = Zylinder von 16065 × 512 = 8225280 Bytes

    Gerät boot. Anfang Ende Blöcke Id System
    /dev/mapper/via_bdeaacdjjh1 * 1 1020 8193118+ 7 HPFS/NTFS
    /dev/mapper/via_bdeaacdjjh2 1021 36715 286720087+ f W95 Erw. (LBA)
    /dev/mapper/via_bdeaacdjjh3 36716 36862 1180777+ 82 Linux Swap / Solaris <- my swap device
    /dev/mapper/via_bdeaacdjjh4 36863 38914 16482690 83 Linux <-my root device
    /dev/mapper/via_bdeaacdjjh5 1021 3570 20482843+ 7 HPFS/NTFS
    /dev/mapper/via_bdeaacdjjh6 3571 6120 20482843+ 7 HPFS/NTFS
    /dev/mapper/via_bdeaacdjjh7 6121 18868 102398278+ 7 HPFS/NTFS
    /dev/mapper/via_bdeaacdjjh8 18869 31616 102398278+ 7 HPFS/NTFS
    /dev/mapper/via_bdeaacdjjh9 31617 36575 39833136 7 HPFS/NTFS
    /dev/mapper/via_bdeaacdjjh10 36576 36715 1124518+ b W95 FAT32

    -format your partions:
    „mkswap /dev/mapper/via_bdeaacdjjh3
    „mkreiserfs /dev/mappper/via_bdeaacdjjh4

    -mount your new suse10.1 root partition
    „mkdir /mnt/suse10.1“
    „mount -t reiserfs /dev/mapper/via_bdeaacdjjh4 /mnt/suse10.1“

    -start yast and under software choose Installation into Directory
    change the target directory to /mnt/suse10.1
    Check Run Yast and SuseConfig on first start
    the warning with /suse/i586/kernel-default- you can ignore

    -after the installation process have finished open the kernel file
    type „vi /etc/sysconfig/kernel“ in console
    press the insert key and change „INITRD_MODULES=“sata_via via 82cxxx processor thermal fan“ in „INITRD_MODULES=“sata_via via 82cxxx processor thermal fan dm-mod“
    press ESC

    -take my mkinird extract it and copy it to /sbin/mkinitrd
    type „mkinitrd“ in console
    copy some files:
    „cp -R -T /boot/grub/ /mnt/suse10.1/boot/grub“
    „cp /boot/initrd- /mnt/suse10.1/boot/initrd-“
    „cp /boot/initrd /mnt/suse10.1/boot/initrd“
    „cp /sbin/dmraid /mnt/suse10.1/sbin/dmraid“
    „cp /sbin/mkinitrd /mnt/suse10.1/sbin/mkinitrd“
    „cp /etc/sysconfig/kernel /mnt/suse10.1/etc/sysconfig/kernel“
    „cp /etc/fstab /mnt/suse10.1/etc/fstab“

    -modify the files and menu.lst in your /mnt/suse10.1/boot/grub/ dir
    modify fstab in your /mnt/suse10.1/sbin/ dir

    switch to console and type „grub“
    „device (hd0,3) /dev/mapper/via_bdeaacdjjh4
    „device (hd0) /dev/mapper/via_bdeaacdjjh
    „geometry (hd0) 38914 255 63
    „root (hd0,3)“
    „setup (hd0)“

    -shut down system and put away your old hard disk. boot system, after the yast procedure log in as root and open initab
    „vi /etc/initab“
    press insert key
    change „id:3:initdefault:“ into „id:5:initdefault:“
    press ESC

    -Reboot your system.

    -Don´t forget to change your installation source!
    put in your first suse10.1 cd and open yast, ad installation source, cd, the same with your add on cd.

    -I have also attached my fstab, and menu.lst.

    Goood luck!

    Attached Files:

    Last edited: May 23, 2006
  8. mamat_fr

    mamat_fr New Member

    i have an error (with the Suse 10.1):
    ERROR: dos: reading /dev/mapper/sil_agafdjcaceaj[Invalid argument]
    i have compiled dmraid-1.0rc11-pre1 with no problems
    anyone have an idea ?
    whereas for the suse10.0 this method work fine.
  9. falko

    falko Super Moderator Howtoforge Staff

    When do you get that error?
  10. mamat_fr

    mamat_fr New Member

    just after the compilation of dmraid when i try do discover the partition
    when i type ./tools/dmraid -ay -i : i have this message : ERROR: dos: reading /dev/mapper/sil_agafdjcaceaj[Invalid argument]
    but with the suse 10.0 i haven't this problem
    Last edited: May 27, 2006
  11. markes

    markes New Member

    I got that message linux-r1rn:/home/mk # dmraid -ay -i
    ERROR: dos: reading /dev/mapper/via_bdeaacdjjh[No such file or directory] ,too. But this was because of an old dmraid version. With the new version of dmraid-1.0.0rc11-pre1.tar.bz2 i still have no problems.

    May 21 07:44:32 linux-r1rn kernel: device-mapper: dm-stripe: Target length not divisible by chunk size
    May 21 07:44:32 linux-r1rn kernel: device-mapper: error adding target to table
    Last edited: May 28, 2006
  12. falko

    falko Super Moderator Howtoforge Staff



    Last edited: Jun 29, 2006
  14. lt_wentoncha

    lt_wentoncha New Member


    From a fresh install, can't you setup RAID 1 from there? In setting up the initial system partitions, can't you set it so that /boot is mounted on a normal partition and format two identical partitions on two separate HDDs as Linux RAID and using the RAID utility thereafter? Atleast that's what I did...


    Like splitting the RAID 1, installing and setting up (incl. dmraid) Linux to the first (primary) HDD and finally rebuilding the mirrored RAID 1?

    For RAID 1 that is probably true, but you can not do that with RAID 0. For me it was much faster to install Linux to a seperate HDD, because i already had one extra HDD built-in and i did not have to rebuild my RAID.

    Sincerely yours,
  16. gelah3

    gelah3 New Member

    Markes, could you please post a "/sbin/mkinird" script for openSUSE 11.1?

    This is the first time I installed Linux on this Intel ICH9R sofRAID system, but need updated version of this howto. If anybody has one for openSUSE 11.1 please share with us.

    One more question is: what line of /etc/mkinitrd on a runnning Linux should I put the "dmraid" script to have openSUSE recognize my Vista Device Mapper at boot time?

    I have a strange situation that I can only boot with floppy but also disk order changes on the fly. GRUB knows disk order at boot time but OS changes all disks to non-raid. I put dmraid -ay in /etc/init.d/boot.local to access Vista.

    I have fair amount of knowledge with Linux but I'm not good with programming logics. Please reply, this is my first post in this list.

    thanks in advance

Share This Page