# IDE RAID 1 - which card?

## LodBot

I just bought a pair of 250GB WD IDE hard drives, and I plan on running RAID 1.  So, my question is what RAID card should I go with?  I'm not looking for the best performance card, just something that is easy to get going with gentoo.  The max I would spend is about $100.  I don't have any 64bit pci slots, so the card would have to be backwards compatible if it was a 64bit.  Also, I'm sorry if this topic has come up before, I did a pretty thorough and didn't come up with anything that recommended a card.

Thanks in advance.

EDIT: I would spend up to $150 if I had to.

----------

## TheCoop

what about software raid? you dont need any raid cards for that...

----------

## LodBot

Software raid?  I'm guessing that is a way to have gentoo raid the hard drives without a controller?  Can you show me some documentation for this?

Thanks

EDIT:  Would it be easy to add another raid 1 configuration down the line with software raid?

----------

## TheCoop

yes it would. 

http://www.tldp.org/HOWTO/Software-RAID-HOWTO.html

----------

## LodBot

Awesome!  Just in case I decide to do hardware raid, can you recommend a gentoo-compatible card?

Thanks

----------

## TheCoop

dunno anything about hardware raid, sorry

----------

## Crg

 *LodBot wrote:*   

> 
> 
> Awesome!  Just in case I decide to do hardware raid, can you recommend a gentoo-compatible card?
> 
> 

 

You won't get a real raid ide raid card cheaply (that I've seen at least).

There is a lot of cards labelled as raid but aren't (ie promise/highpoint).

 *LodBot wrote:*   

> 
> 
> EDIT: Would it be easy to add another raid 1 configuration down the line with software raid?
> 
> 

 

Yup.

----------

## col

but you cant hotswap with software raid. I think this is important

----------

## LodBot

 *Crg wrote:*   

> You won't get a real raid ide raid card cheaply (that I've seen at least).
> 
> There is a lot of cards labelled as raid but aren't (ie promise/highpoint).

 Can you link me to a "real" ide raid card?  Also, if promise doesn't truly raid, what does it do?

 *col wrote:*   

> but you cant hotswap with software raid. I think this is important

 If one drive decides to fail, what steps do I have to go through to get a replacement going?

Thanks for all the help.

----------

## col

well to hotswap safely using software raid you would need to shutdown the computer. Not so good if its a server.

----------

## LodBot

 *col wrote:*   

> well to hotswap safely using software raid you would need to shutdown the computer. Not so good if its a server.

 Gotcha.

My motherboard only has 2 ide busses, and further down the road I plan on adding a second raid 1.  I think I'm just going to run a hardware raid, so what card would you recommend?

----------

## ballyn

3ware makes the best "real" ide RAID hardware in terms of compatibility and performance. In fact, the 3Ware Escalade series may still be the only real IDE raid hardware with Linux support today. These run around $120 today for a 2-port (so no raid 5) and go $200+ for 4-ports. If you go with a SATA solution then you do get hotswap, but since you already have your drives I guess that doesn't help you much.

If you want cheap, go with a promise or highpoint solution, which are really "software" raid because they rely on the processor to do all of the work (even though there is a physical component). Alternately, software raid within Linux gets rave reviews... Personally, I use a Promise RAID, but that's only because it's on my motherboard. I would use Linux's RAID before I bought anything but a 3ware card.

----------

## ballyn

 *col wrote:*   

> well to hotswap safely using software raid you would need to shutdown the computer. Not so good if its a server.

 

And that wouldn't be hotswap, then, would it?   :Very Happy: 

----------

## LodBot

 *ballyn wrote:*   

> 3ware makes the best "real" ide RAID hardware in terms of compatibility and performance. In fact, the 3Ware Escalade series may still be the only real IDE raid hardware with Linux support today. These run around $120 today for a 2-port (so no raid 5) and go $200+ for 4-ports. If you go with a SATA solution then you do get hotswap, but since you already have your drives I guess that doesn't help you much.
> 
> If you want cheap, go with a promise or highpoint solution, which are really "software" raid because they rely on the processor to do all of the work (even though there is a physical component). Alternately, software raid within Linux gets rave reviews... Personally, I use a Promise RAID, but that's only because it's on my motherboard. I would use Linux's RAID before I bought anything but a 3ware card.

 

Thanks for the advice  :Smile: 

----------

## Crg

 *ballyn wrote:*   

> 
> 
> If you want cheap, go with a promise or highpoint solution, which are really "software" raid because they rely on the processor to do all of the work (even though there is a physical component).
> 
> 

 

The physical component being an ide chipset just as is the case with any software raid.

----------

## Crg

 *LodBot wrote:*   

>  *col wrote:*   well to hotswap safely using software raid you would need to shutdown the computer. Not so good if its a server. Gotcha.
> 
> My motherboard only has 2 ide busses,
> 
> 

 

The disks for raid1 should be on different busses as the failure of one disk on the bus can cause the failure of the bus.  So ideally you'd be wanting to add another ide controller to handle a second lot of disks.

 *LodBot wrote:*   

> 
> 
> and further down the road I plan on adding a second raid 1.  I think I'm just going to run a hardware raid, so what card would you recommend?

 

As mentioned below by ballyn, 3ware  :Smile: 

----------

## Crg

 *col wrote:*   

> well to hotswap safely using software raid you would need to shutdown the computer. Not so good if its a server.

 

Hotswap should work (in theory at least  :Wink:  )

```

#idectl

Unrecognized IDE-channel number

usage: /sbin/idectl ide-channel-nr [off|on|rescan]

```

Though you'd want to test it with the exact ide controller and hotswap rack on a machine/data you didn't care about   :Very Happy: 

----------

## LodBot

 *Crg wrote:*   

> As mentioned below by ballyn, 3ware 

 3ware is far too expensive.  What do you guys have to say about a Promise tx4000?  I understand that it's not a true hardware raid, but it will alow me to get 2 raid 1 setups.  I also found drivers for the tx4000.  Any other comments?  How will this card work with gentoo?

Thanks

----------

## Crg

 *LodBot wrote:*   

> 
> 
> 3ware is far too expensive.  What do you guys have to say about a Promise tx4000?  I understand that it's not a true hardware raid, but it will alow me to get 2 raid 1 setups.
> 
> 

 

What's the point of the tx4000?

I think you're missunderstanding the situation.  These so called "raid" cards are just ide contollers.  Save yourself some money and avoid them and get an ide controller that isn't labelled as raid.

Software raid will be able to give you as many raid1 setups as you want - it is also more flexible than hardware raid as you specify it on a partition level - ie you can have multiple partitions on the same 2 drives, some as raid1 some as raid0 or whatever configuration you need.

And if you are worried about software raid speed versus hardware, this is the general view on it -> http://lkml.org/lkml/2003/10/7/121

Check out the following: (prices may not be the cheapest just the first match I got on google)

The Promise SATA150 TX4 is ~$53.60:

 *Quote:*   

> 
> 
>  For an all serial upgrade, the SATA150 TX4 controller offers four independent SATA ports for up to four Serial ATA/150 drives. 
> 
> 

 

SATA = 150MB/sec.

The tx4000 is ~$119.16:

 *Quote:*   

> 
> 
> The FastTrak TX4000 provides four independent ATA channels
> 
> 

 

ATA/133 = 133MB/sec.

----------

## LodBot

I've already bought my ide hard drives, so now I have to figure out how to raid them, and from the sounds of it, I should software raid them.  The only problem I run into is that my motherboard only has 2 ide busses, so I'm limited to 2 hard drives.  Should I buy an ide controller with 2 ide busses for the second raid1 setup?

Thanks again for being patient with my newbism.

EDIT:  Something like this... http://www.newegg.com/app/ViewProductDesc.asp?description=16-102-002&depa=1 ?

----------

## Crg

 *LodBot wrote:*   

> 
> 
> busses, so I'm limited to 2 hard drives.  Should I buy an ide controller with 2 ide busses for the second raid1 setup?
> 
> EDIT:  Something like this... http://www.newegg.com/app/ViewProductDesc.asp?description=16-102-002&depa=1 ?

 

Yes, buying a second ide controller is what you should do, and that promise one is fine (I wouldn't buy promise but that's due to personal bias rather than any technical reason).

----------

## LodBot

 *Crg wrote:*   

> Yes, buying a second ide controller is what you should do, and that promise one is fine (I wouldn't buy promise but that's due to personal bias rather than any technical reason).

 I'm not going to purchase this card right away because I'm only going to run 1 raid 1 setup, but if I needed more disk space down the line, I would purchase this card along with 2 other drives.  Should I buy this card now and run my hard drives off of it, so that way upgrading down the line would be easy?  Will this card work well with gentoo?

Thanks again.

EDIT:  Can a software raid be setup on installation?  Or does it need to be setup after gentoo has been installed?

----------

## TheCoop

it can be set up before you install stuff afaik, all the tools are on the livecd

----------

## Crg

 *LodBot wrote:*   

> 
> 
> along with 2 other drives.  Should I buy this card now and run my hard drives off of it
> 
> 

 

I would run your drives off you motherboard's ide controllers, and when you need another couple of disks later add a second controller.

----------

## LodBot

 *Crg wrote:*   

> I would run your drives off you motherboard's ide controllers, and when you need another couple of disks later add a second controller.

 Will do.

Thanks a lot for the help  :Smile: .

I'll post any further questions.

----------

## LodBot

Ok, so I read the software raid, but I'm not really sure where to implement it in the install of gentoo.  Do I boot with doataraid?  When do I emerge mdadm?  Is there documentation that explains how to get software raid going with gentoo?

Thanks.

----------

## Crg

 *LodBot wrote:*   

> Ok, so I read the software raid, but I'm not really sure where to implement it in the install of gentoo.  Do I boot with doataraid?  When do I emerge mdadm?  Is there documentation that explains how to get software raid going with gentoo?
> 
> Thanks.

 

Have you a paritioning scheme in mind?

----------

## LodBot

 *Crg wrote:*   

> Have you a paritioning scheme in mind?

 I'm not really sure what you mean by that, but I was just planning on having a root, boot, and swap partition running a reiserfs filesystem.

EDIT:  I was planning reiserfs on the root and ext2 on the boot.

EDIT2:  How do I go about partitioning my drives?  Should I partition them both the same, or should I just partition one of them?

----------

## Crg

 *LodBot wrote:*   

>  *Crg wrote:*   Have you a paritioning scheme in mind? I'm not really sure what you mean by that, but I was just planning on having a root, boot, and swap partition running a reiserfs filesystem.
> 
> EDIT:  I was planning reiserfs on the root and ext2 on the boot.
> 
> EDIT2:  How do I go about partitioning my drives?  Should I partition them both the same, or should I just partition one of them?

 

When you get to this stage in the install:

http://www.gentoo.org/doc/en/handbook/handbook.xml?part=1&chap=4

You need to do the partitioning to one disk - then the exact same partition setup to the other disk.

When you get to the "Creating the Boot/Swap/Root Partition" you want to change the type to "fd" (linux autodetect raid).  So it looks like (modifying the gentoo install example)

```

Command (m for help): p

Disk /dev/hda: 30.0 GB, 30005821440 bytes

240 heads, 63 sectors/track, 3876 cylinders

Units = cylinders of 15120 * 512 = 7741440 bytes

Device Boot    Start       End    Blocks   Id  System

/dev/hda1 *        1        14    105808+  fd  Linux raid autodetect

/dev/hda2         15        81    506520   fd  Linux raid autodetect

/dev/hda3         82      3876  28690200   fd  Linux raid autodetect

```

Now your root, swap & boot partitions then need to be configured as raid1.

Load the raid1 module:

```

modprobe raid1

```

1) Create a file /etc/raidtab

```

# /boot

raiddev                    /dev/md0

raid-level                 1

nr-raid-disks              2

persistent-superblock      1

chunk-size                 128

nr-spare-disks             0

    device         /dev/hda1

    raid-disk     0

    device         /dev/hdc1

    raid-disk     1

# /swap

raiddev                    /dev/md1

raid-level                 1

nr-raid-disks              2

persistent-superblock      1

chunk-size                 128

nr-spare-disks             0

    device         /dev/hda2

    raid-disk     0

    device         /dev/hdc2

    raid-disk     1

# /root

raiddev                    /dev/md2

raid-level                 1

nr-raid-disks              2

persistent-superblock      1

chunk-size                 128

nr-spare-disks             0

    device         /dev/hda3

    raid-disk     0

    device         /dev/hdc3

    raid-disk     1

```

Now type:

```

mkraid /dev/md0

mkraid /dev/md1

mkraid /dev/md2

```

And you're sorted - all ready to go.

From now on in the install where it says

/dev/hda1  use  /dev/md0

/dev/hda2  use  /dev/md1

/dev/hda3  use  /dev/md2

At step 7 of the install: Configuring your kernel, make sure you compile raid1 support into your kernel  :Smile: 

At step 9.b. Installing grub:

where it says

```

grub> root (hd0,0)          (Use information from the boot partition)

grub> setup (hd0)           (Install GRUB in the MBR)

grub> quit                  (Exit the GRUB shell)

```

do

```

grub> root (hd0,0)          (Use information from the boot partition)

grub> setup (hd0)           (Install GRUB in the MBR)

grub> root (hd1,0)          (Use information from the boot partition)

grub> setup (hd1)           (Install GRUB in the MBR)

grub> quit                  (Exit the GRUB shell)

```

and grub should read:

```

# Which listing to boot as default. 0 is the first, 1 the second etc.

default 0

# How many seconds to wait before the default listing is booted.

timeout 30

# Nice, fat splash-image to spice things up :)

splashimage=(hd0,0)/grub/splash.xpm.gz

title=Gentoo Linux

# Primary drive

# Partition where the kernel image (or operating system) is located

root (hd0,0)

kernel (hd0,0)/kernel-2.4.22 root=/dev/md2

# Only if you use genkernel. Otherwise remove the following line:

initrd (hd0,0)/initrd-2.4.22-gentoo-r2

title=Gentoo Linux (second disk)

# If the first drive fails

# Partition where the kernel image (or operating system) is located

root (hd1,0)

kernel (hd1,0)/kernel-2.4.22 root=/dev/md2

# Only if you use genkernel. Otherwise remove the following line:

initrd (hd1,0)/initrd-2.4.22-gentoo-r2

```

Edit:

It's probably also a good idea when you are installing stuff to also 

```
emerge smartmontools
```

and

```
zcat /usr/share/doc/smartmon*/smartd.conf.gz > /etc
```

and edit /etc/smartd.conf

to have

```

/dev/hda -a -m you@youremail

/dev/hdc -a -m you@youremail

```

Last edited by Crg on Sun Jan 25, 2004 1:44 am; edited 2 times in total

----------

## LodBot

Thanks a lot man for all the help  :Smile: .  If I have any questions I'll post!

Thanks again!

----------

## Montolio

hi!

I just tried your tutorial, but when I type "mod_probe raid1" I get the reply "command not found"!

why?

thx

Montolio

----------

## TheCoop

its modprobe not mod_probe

----------

## Montolio

Hi!

I have a question to the RAID howto!

when I start with the liveCD and I install the RAID how it is discriped, how can the new kernel know what md0,md1,md2 are?

they were installed on the "livecd gentoo" not on the new installation ?!?

the reason why i ask is because when my new gentoo boots, it detects the hard disks, but after that it stops doing anything!

regards

Montolio

----------

## TheCoop

did you set up /etc/raidtab?

----------

## Montolio

 *TheCoop wrote:*   

> did you set up /etc/raidtab?

 

yes, I did!

but i but it into /etc/raidtab befor the chroot!

so after the reboot it was lost...

----------

## TheCoop

well you need to recreate it then

----------

## Crg

 *TheCoop wrote:*   

> well you need to recreate it then

 

You don't actually.  If you have setup the partitions as type "fd" (raid autodetect) the kernel will recognise and setup the raid partitions from the raid superblock.

----------

## Crg

 *TheCoop wrote:*   

> its modprobe not mod_probe

 

Opps, silly mistake.  Cheers for the correction  :Smile:   Just fixed my original post.Last edited by Crg on Sun Jan 25, 2004 1:47 am; edited 1 time in total

----------

## Crg

 *Montolio wrote:*   

> the reason why i ask is because when my new gentoo boots, it detects the hard disks, but after that it stops doing anything!
> 
> 

 

It's hard to say unless you can give some output that you see.  ie What's the last few lines that it shows?

----------

## LodBot

How can I test to see if my array is working?  Can I simply unplug one of the hard drives?

----------

## LodBot

The raid is up  :Smile: 

Thanks for the help guys!

----------

