# Onboard IDE-RAID ???

## UnrealSnowman

I'm about to get a new computer for my workstation and have my eye set on running ide-raid (2x 80gb). This will run on the motherboards controller, eighter Promise or Highpoint's onboard controller.

But before I go out and put together a system I would like to get some info on the subject, some DO's & DONT's.. 

(ie: is there problems with some of the controllers and such)

Do you have any info to share, before I spend twelve nights trying to setup this raid-thingie in gentoo linux ?  :Wink: 

Thanks in advance

----------

## pjp

You might try a search for RAID and see what comes up.  There are some threads that cover booting to a RAID drive and other issues.  I myself do not use RAID yet.

----------

## klieber

 *UnrealSnowman wrote:*   

> Do you have any info to share, before I spend twelve nights trying to setup this raid-thingie in gentoo linux ?  

 

I have not heard of any successful Gentoo installs on an IDE RAID setup.  (That doesn't mean there aren't any -- just that I haven't heard of any)  There have been a lot of posts in these forums about getting IDE RAID and Gentoo to play nicely together, especially during the install process.

I do believe I remember reading about folks who were able to get Gentoo and IDE RAID to work, but they installed Gentoo on a separate, non-RAID drive and used their RAID for data storage only. (/home, etc.)

If anyone has been able to successfully install Gentoo on an IDE RAID array, please let us know -- I know there's a lot of people that would like to know how to get this to work.

(It would be especially useful if someone would be willing to write up a short HOWTO for the documentation forum)

--kurt

----------

## rommel

dont do ide raid...those chipsets provided on the mother boards are not event that much of an enhancement under windows...they are CHEEEEEEP ....look at the cost difference between them ad the non-raid board by the same manufacturer

USE LINUX SOFTWARE RAID...it is fast and reliable adn offers the full spectrum of raid configurations....save yourself money and aggrevation and get a simple promise tx2 or tx4 "ide" controller for adding addition ide channels and use LSR

in gentoo the tools are available from the start to setup the raid array from the begining of the install...the only lil piece of information that was missing was that after you fdisk and create the /etc/raidtab you need to 'modprobe md' so that the setup can be seen....your raided drive will become /dev/md0...check out the articles section in gentoo and read the links it gives too.

----------

## UnrealSnowman

Ahh.. "Seach", I must need glasses heheh   :Embarassed: 

But all in all it seems to be a stupid idea to go for a HW (low budget) ide raid (..also considering the performance of a /real/ SCSI raid card)

- rommel -

"USE LINUX SOFTWARE RAID" you say, eh?.. This /does/ help performance ('stippin' mode)? What about resources, does it not eat the system down or is it handled mainly by the normal ide controller ?  :Rolling Eyes: 

btw: Thanks for the fast reply!  :Very Happy: 

----------

## james

This is alink off the Gentoo main page "articles" section.

I makes a good read and will save you $$$$.

http://www-106.ibm.com/developerworks/linux/library/l-raid1/index.html

----------

## rommel

i bought a 20 dollar promise tx2 ata 100 ide controller...my dvd is on hda my cdrw is on hdc and i have two ibm 60gxps on the promise that make hde and hdg...i partitioned them to have boot on hde1 and swap on hdg1...i made these equal in size 500mbs each....then i formed extended partitions for the remaining space and one logical drive in the extended partition for each drive...you must label these logical drives FD so that they will be started automatically at boot...then you create the /etc/raidtab that corresponds the raid you want to use....read the howto's...after this modprobe md to start the raid dev you have created and then you create teh filesystem you want...i used reiserfs on the /dev/md0 and ext2fs on the boot partition.

anyway i am getting 80mb/s read tranfers when i run hdparm -t /dev/md0

this is like runnnng my scsi cheetahs under my free bsd box....so yes it works....the best i have seen from an ide raid controller is the 3ware and it gets around 60mb/s but it costs alot more and i dont think its worth it...LSR is an excellent solution...i wish freebsd had a similar software raid...vinum and ccd are ok but cant have / on them...you would have to create it then migrate it to the / partition and hope nothing went wrong....just read the articles drobbins has written and follow the links he gives to the additional reading....no one should try anything other then this for linux unless you want real scsi hardware raid and even then i dont think you will do any better as far as the performance is concerned....you could create a LSR array witha  scsi ultra 160 controller too...that will be what i do next...i just bought another tekram host adapter and two more cheetahs.

ciao

good luck and give it a try...you'll like it

----------

## UnrealSnowman

Thanks a billion!  :Smile: 

btw: that IBM dveloper resource /is/ great.. there are a few goodies in thier redbooks-section too.

(I was once OS/2 user  :Embarassed:  )

----------

## rommel

no problem....its worth it to try LSR....you like it i am sure and its fully functional in that all levels are supported....and its something that is in the kernel already...you just to add the levels and compile them in...much better then hasseling with drivers adn 3 party crap.

have fun

----------

## ph317

Yes, you can make Gentoo work with the fake hardware raid controllers like Promise FastTrack.  The only hard drives in my machine are two 40G Seagates, in a striped array on the raid controller (making one big 80G disk).  I'm sharing the array with WinXP, and using Grub to boot both OS's.  My relevant system specs:

Processor: Athlon-XP

MB: A7V333 (RAID version)

Onboard "RAID" Controller: PDC20276 (Promise FastTrack 133)

I used the 1.1 iso image to start the install, and I ended up having to customize the isntall CD for the right hardware support (I put gentoo-.2.419-r5 kernel on it, which has the correct ataraid support in it).  The new 1.2 ISO may have the correct support built in already.

If you get a kernel booted that detects and uses your ataraid correctly - the disk will be available (under devfs anyways) at /dev/ataraid/disc0/disc and the partitions are /dev/ataraid/disc0/partX.

I've had some troubles where I have to reboot after changing the partition table, but it's not that much of a hassle.

The big gotchas concern Grub and mounting the root filesystem:

1) Make sure the kernel you build has support for the IDE controller, support for "ataraid", and support for either Promise or Highpoint ataraid variation compiled in, not as modules.

2) Don't install Grub from within linux.  When you get to the final step of your Gentoo install, where you're supposed to run "grub" and do "setup (hd0,0)", etc.... - don't do that.  Instead, install grub to a floppy disk, boot from that floppy, and then from the grub prompt on that floppy do your "setup (hd0,0)" and "root (hd0,X)" commands.  You should then be able to reboot off the array.  The reason is that hd0,0 doesn't mean the right thing within linux - but booted off of a grub floppy, you're back to BIOS drive mappings, and if your BIOS is set up correctly the raid array should be the primary HDD.

3) Just before the above, when you edit /boot/grub/menu.lst to add an entry to boot your kernel, you need a special kernel option so that it can mount your root filesystem.  Instead of what one would expect "root=/dev/ataraid/disc0/partX", you have to use the hex for the device major/minor numbers, like "root=7204".  72 hex is the major number for ataraid, and 04 would mean partition 4.

Those were the big ones, there might've been other stuff I forgot already.  It *is* doable, there's just more gotchas than normal.

----------

## castor_fou

thanks ph317 for this info.

i'm in the same conf, i was stopped by grub....

going to test this !

----------

## castor_fou

i'm really really close.

i've done a grub floppy , it finds my kernel but it is unable to mount my root partition.

my root is /dev/ataraid/disc0/part4

my grub config is :

root (hd1,0)

kernel /boot/bzImage root=7204

boot

i got a kernel panic :

Kernel panic: VFS: Unable to mount  root fs on 72:04

could you please post your menu.list ?

thanks  :Wink: 

----------

## c0s

i am having the same problem, any help is appreciated (other then telling me i should have done  software raid  :Wink:  )

----------

## c0s

another thing i noticed, if i boot in with the cd now and chroot, etc, i no longer have /dev/ataraid did i forget to compile something in? i compiled in ataraid (not as a module) and the promise chip that was directly below it in the menu. was i supposed to also compile the one that is a few lines up? or what? i REALLY want to get this up.

----------

## c0s

ok here is what i am going to try and i will let you know if it works

modules howto section 7

boot to a ramdisk and then load then load the ataraid pdcraid drivers then let it mount the root filesystem, that ought to work.

----------

## c0s

ok i couldnt get the ramdisk working, it wanted a root= perameter oh well, i have another idea but i am at work now so i will try it later

----------

## BernieKe

A Hardware RAID install howto

I'm using the hpt374 controller (highpoint)

(if you use another controller replace all hpt or highpoint with what suits you)

apart from what is written here: follow the installation docs!!!

boot (using min. a 1.2 install-disk)

type (this will create the raiddevice)

```

insmod ataraid

insmod hptraid

fdisk /dev/ataraid/disc0/disc

```

when making filesystem: use the /dev/ataraid/disc0/partX notation

when choosing kernel-options: select hpt366 chipset support, support for IDE Raid controllers and Highpoint 370 software RAID

in fstab: use the /dev/ataraid/disc0/partX notation

instead of grub, i suggest using lilo

```

emerge lilo

cp /etc/lilo.conf.example /etc/lilo.conf

nano -w /etc/lilo.conf

```

when editing lilo.conf:

as bootdevice: select the first hd of your raid-setup (in my case: hde)

and as root: use the /dev/ataraid/d0pX notation

type (X is your root partition number):

```

exit

ln -s /dev/ataraid/disc0/partX /dev/ataraid/d0pX

mount -o bind /dev mnt/gentoo/dev

chroot /mnt/gentoo /bin/bash

lilo

```

normally lilo should succesfully have written to the mbr

exit, umount everything (including the /mnt/gentoo/dev !!!) and reboot

if you are unable to umount /mnt/gentoo, make sure you have umounted

the other mounts in /mnt/gentoo and try logout, after loging out, try to umount again, it should work now

PRAY, no, seriously, this should work!!!

hope this helps someone,

Bernard

aka BernieKe

----------

## GurliGebis

BernieKe, how about the Promise controller, what shall you do there?

----------

## BernieKe

instead of hptraid, use the pdcraid module

in kernel config, select

```
PROMISE PDC202{46|62|65|67|68|69|70} support
```

and

```
Support Promise software RAID (Fasttrak(tm))
```

instead of the highpoint equivalents

i think that should do the trickLast edited by BernieKe on Tue Aug 27, 2002 2:24 pm; edited 1 time in total

----------

## GurliGebis

thanks, going to surgest the team to add the information to the installation howto

----------

## ErrorCode

Hello,

I just installed Gentoo 1.4 (from a stage3 tarball) on a Promise raid  controller (2 60GB ATA133 Harddisks - striping) on an AUS A7V333 motherboard.  Thanks to all of you; I don't think I could have gotten it to work without the tips I found in this Forum.

Some additional comments:

 *Quote:*   

> 
> 
> 3) Just before the above, when you edit /boot/grub/menu.lst to add an entry to boot your kernel, you need a special kernel option so that it can mount your root filesystem.  Instead of what one would expect "root=/dev/ataraid/disc0/partX", you have to use the hex for the device major/minor numbers, like "root=7204".  72 hex is the major number for ataraid, and 04 would mean partition 4.
> 
> 

 

It does work without using the hex numbers; However:

In the menu.lst for GRUB, you have to use the /dev/ataraid/dXpY notation, and in /etc/fstab you have to use /dev/ataraid/discX/partY.

At least that's how I got it to work...

On a side Note: 

I've read a lot of 'use Linux Software RAID instead' claiming that the Promise controller's speed in striping mode isn' t realy that great...

Does anyone have any measuments on the Promise Striping speed?

How did you get them?

hdparm -t /dev/ataraid/disc0/disc doesn't seem to work...

----------

## c_kuzmanic

YEHAAA!!!

After much pain and hassle with grub, I finally got my software raid arrays installed and running 

Two Maxtor ATA133 IDE Disks, RAID0 using Reiserfs:

hdparm -t /dev/md1 = 93 Mb/s

 :Laughing:   :Laughing:   :Laughing: 

----------

## tore-

 *BernieKe wrote:*   

> A Hardware RAID install howto
> 
> I'm using the hpt374 controller (highpoint)
> 
> (if you use another controller replace all hpt or highpoint with what suits you)
> ...

 

dont you have to edit the ide-pci.c file before making your downloaded kernel?

----------

## GurliGebis

I compiled my kernel without editing anything, and it works for my Promise RAID system. (Just had to enable the controller in the kernel)

Then I made a grub boot disk, and bootet from that one, and installed grub on hd (0).

----------

## tore-

 *GurliGebis wrote:*   

> I compiled my kernel without editing anything, and it works for my Promise RAID system. (Just had to enable the controller in the kernel)
> 
> Then I made a grub boot disk, and bootet from that one, and installed grub on hd (0).

 

could you please write how your fstab looks like, and what you wrote in grub?

thanks  :Smile: 

----------

## GurliGebis

fstab:

/dev/ataraid/disc0/part6 (boot)

/dev/ataraid/disc0/part8 (root)

/dev/ataraid/disc0/part7 (swap)

Made a grub bootdisk, and booted from that one, then did:

root (hd0,5)

setup (hd0)

quit

Read the installation instrtucions, they have been updated to support ATA RAID.

----------

## tore-

when i wrote setup (hd0) after i rebooted with the grub disk, i get this:

          Cheking of "/boot/grub/stage1 excists... no" "Checking of

          /grub/stage1 excists... no" "Error #15: FIle not found"   I dont se

          that ive done ANY erors during the install, i just cant se whats

          wrong

add: the Grub floppy loader only loaded stage2... funny.-..

----------

## GurliGebis

well try making the bootdisk with these two commands instead:

dd if=(Path_to_stages)/stage1 of=/dev/fd0 bs=512 count=1

dd if=(Path_to_stages)/stage2 of=/dev/fd0 bs=512 seek=1

cant remember what the path to these files are, but they are in some subdirectory inside /etc or /usr .

You might want to search for them.

----------

## tore-

sadly i couldnt get it to work that way either   :Mad: 

----------

## GurliGebis

Do you have any harddrives, thats connected to the normal controller???

----------

## tore-

hda=problem harddrive

hdc=cdburner

hdd=dvdrom

hde=raiddrive 1/2

hdg=raidrive 2/2

----------

## GurliGebis

are you only using gentoo and not Windows???

If you are, set BIOS to None where your normal harddrive is (Linux sees it anyway), and then try this in grub:

root (hd1,0)

setup (hd1)

----------

## tore-

i gave up!  :Sad:  5 days for nothing  :Wink:  but hey, ive learned so much also...

 :Idea: 

----------

## GurliGebis

Ok

----------

## col

I am on the virge of getting the highpoint opensource drivers running on my gentoo box. I have them compiled and loading. Now I am just working on an initrd to load them at boot time so the boot device can be raid1. When I get it all working I am going to be hot swapping several 40GIG ide drives in a raid1.

I will post a howto when I get it going.

----------

## tore-

please add fstab, grub details..

----------

## taskara

 *col wrote:*   

> I am on the virge of getting the highpoint opensource drivers running on my gentoo box. I have them compiled and loading. Now I am just working on an initrd to load them at boot time so the boot device can be raid1. When I get it all working I am going to be hot swapping several 40GIG ide drives in a raid1.
> 
> I will post a howto when I get it going.

 

make sure you're using hot swappable trays, or you may blow your pc to bits  :Wink: 

----------

## tore-

and we are still waiting  :Smile: 

----------

## col

ok at this stage I have it working but not booting (I am booting off another drive). Using the highpoint opensource driver & I am able to hotswap drives. After I hot swap I can issue a rebuild command on the new drive and data is being written to the RAID 1 device is /dev/sda1.  Now I am just having a some hassles creating an initrd image so I can boot off the RAID scsi-ide device & remove the boot disk from the system.

I am using kernel 2.4.19. You can download the hpt370/372 driver here: http://www.highpoint-tech.com/hpt3xx-opensource-v13.tgz

Make sure you have the latest highpoint raid bios installed if you want to use this driver. You also need to modify the kernel source code.

----------

## voidzero

hey guys,  I did everything you people instructed, but still my raid array is not found.

Kernel gentoo-sources-2.4.19-r10

dmesg | grep raid:

```
Promise Fasttrak(tm) Softwareraid driver 0.03beta: No raid array found
```

I really don't know what's up. The vanilla-sources don't have this problem. Thanks in advance.

----------

## taskara

it's prob something in the gentoo sources that your pc config doesn't like.

there's prob no way around it, bar finding what it is and removing it.

easier to use vanilla kernel and add your own patches I'd say.

----------

## voidzero

I managed to fix it; i played a little with the source-code of /usr/src/linux/drivers/ide/ide-pci.c.

Thx anyway  :Smile: 

----------

## col

SUCCESS!!! I have my gentoo booting using the Highpoint scsi-ide kernel module with the modules contained on an initrd image.

here is the how I did it:

https://forums.gentoo.org/viewtopic.php?t=18894

----------

## BernieKe

UPDATES:

 as it seems the 1.4r1 and 1.4r2 cd's aren't capable of recognising the raidvolumes (probably because of the kernel they use (see below)), use the 1.2 iso !!!! (at least until there's a new iso that does work ;-) )

 use kernel gentoo-sources 2.4.19r7, since -at least- r9,r10 and vanilla 2.4.20 DON'T work (not for me and several other people),

the best thing to do would be to use r7, make sure everything works, and then try out other kernels if desired

i thought these were quite essential updates ;-)

----------

## syadnom

Use linux' software raid via EVMS.  Only use hardware raid if it is TRUE hardware raid, with a raid processor onboard.

With EVMS, it is very easy to get set up and going without doing anything fancy, and it is supported by your kernel at boot time AND available on the gentoo boot disk.

----------

## taskara

is there a gentoo EVMS howto somewhere ?

It's IBM isn't it ?

----------

## syadnom

go to o-rileys, i think their is a guide their

----------

## col

I have not used EVMS before but it does not look like it supports hot swapping of IDE disks that the cheapo highpoint and promise controllers support.

----------

## Aleksei

Problem: 

Using both onboard RAID and regular IDE controllers, my customized kernel will swap ide0/1 with ide2/3. 

With my root on a non-RAID hdd the kernel panics as it cannot mount it.

Solution1:   :Cool: 

dont care messing around with root on your regular IDE controller, mount root on /dev/ataraid/disc0/partY 

(not using it myself, a friend is running off his RAID completly)

Solution2:  :Laughing: 

load the kernel with ideX=IO1,IO2,IRQ settings to force recognition order

e.g. 

```
append = "ide0=0x1f0,0x3f6,14 ide1=0x170,0x376,15 ide2=0xe800,0xe402,17 ide3=0xe000,0xdc02,17"
```

If you dont know the right settings, type 'dmesg | grep ide' when booting with your gentoo cd will get you the proper settings e.g.

ide0 at 0xe800-0xe807,0xe402 on irq 17

ide1 at 0xe000-0xe007,0xdc02 on irq 17

ide2 at 0x1f0-0x1f7,0x3f6 on irq 14

ide3 at 0x170-0x177,0x376 on irq 15

Solution3:   :Confused: 

play around with enabling/disabling your Raid controller, and installing lilo with root=/dev/hdeY. I did this to get a previous distro to work, but it was a hell of figuring things out correctly

Some comments:

Well guys, although I saw a lot of posts on the IDE-RAID issue, I could not really find a good problem description / solution matching my issue.

This is not a Gentoo specific problem, but I have ran into it in most distro's so far. After installing Gentoo yesterday, and finding again the same problem I tried to figure it out properly this time, and it actually worked. 

My situation is as follows: I am using an MSI K7T266-Pro2 mainboard with hdd's on both the main controller and the Promise IDE-RAID. I have my OS roots (XP and Linux) on my normal drives, and am using my Raid-0 for data storage. When running a install kernel, my VIA vt8233 is nicely detected as ide0/1 with hdd/cd/dvds on /dev/hda-d. The Promise PDC20265 is recognised also (ide2/3), with the hdds on /dev/hde and /dev/hdg. Loading the ataraid and pdcraid modules provides me with access to the raid partitions under /dev/ataraid/disc0/part1 & 2 (or /dev/ataraid/d0p1 & d0p2 for other distros).

However, my problems start after compiling and installing my own kernel. Of course I have selected the required kernel options as non-modular. But when I install lilo on /dev/hda (having run everything from the stage1 cd so far), with root partition on /dev/hda4, upon restart the system cannot mount root correctly. As it turns out, my new kernel recognises the PDC chipset before the VIA controller, causing /dev/hda-d to be switched with /dev/hde-h and vice versa.

Although I first tried to map-drive all disks from the kernel line, I found that didnt work, so I forced ide0/1/2/3 to be recognised differently instead.

so I now have an append line of 

```
ide0=0x1f0,0x3f6,14 ide1=0x170,0x376,15 ide2=0xe800,0xe402,17 ide3=e000,dc02,17 
```

My root drive is now again correctly identified as /dev/hda. 

This solution was a lot easier than my last succesfull fix, where I did a bit of juggling around by disabling/enabling the promise controller, and switching around the root from /dev/hda to /dev/hde and so on. I dont know exactly how I managed to get it, but it was very confusing  :Confused: 

Cheers

----------

## Blademan

You may want to look into which chipset maker you use. Promise doesn't seem to be too cooperative with the kernel developers, albeit the Serial ATA drivers, I think:

http://kt.zork.net/kernel-traffic/kt20030223_206.html#6

Some manufacturers are more open with their source than others. I'm not saying one way or the other, since manufacturers have to make their money somehow, but ...don't get me started with Nvidia etc.

Also check the Linux HCL:

http://tldp.org/HOWTO/Hardware-HOWTO/ideraid.html

----------

