# onchip win ataraid & linux software raid together!

## taskara

here's what I want to do:

setup a raid 0 array using onboard raid chip for windows

but for linux, I want to be able to access both drives and use linux software raid.

does a) anyone know what I'm talking about

or

b) have any ideas?

Even though I have a raid array, I can still access both hard drives under linux - that's no problem. The problem is this:

the raid0 array combines both 120Gb drives to look like one big 240Gb drive.

now when you make a partition on the raid array under windows, the partition table ONLY gets written to the first hard drive - the 2nd hard drive never has a partition table written.

this also means that a 200gb partition (say 200000 blocks) is written to the first drive (which is more than it physically has, ie max blocks are say 120000 cause 120gb drive), leaving no space to create some linux partitions at the end.

So I'm wondering how "windows" onchip sata raid works.

does a 60gb partition on the first drive actually mean the raid controller is smart and will only overwrite the first 30gb on each drive? I'm not sure, so it's hard to find a way to juggle partitions!  :Wink: 

it would be perfect if the windows onchip raid controller wrote matching partions on both hard drives, then I would have space at the end of each drive to do the same for linux software raid, but alas  :Confused: 

anyway I know a lot of people have raid arrays and also dual boot.. thought I might share my crazy ideas to see if there are some other wingnuts out there who can help  :Smile:  cheers

----------

## adaptr

 *taskara wrote:*   

> but for linux, I want to be able to access both drives and use linux software raid.

 

Why ?

Surely hardware ata-raid is faster than software.

----------

## taskara

 *adaptr wrote:*   

>  *taskara wrote:*   but for linux, I want to be able to access both drives and use linux software raid. 
> 
> Why ?
> 
> Surely hardware ata-raid is faster than software.

 

firstly, ataraid is not supported under linux anymore, so I can't use the same raid array.

that means only linux software raid is available, and to do that i need to be able to create identical partitions on both hard drives, but I can't do that because the partition for the windows partition takes up all the space..

and lastly  :Wink:  linux software is actually faster than these onchip raid controllers, because they aren't really hardware driven, they are software driven through the driver.

cheers

----------

## adaptr

Hmm... and you say that the Windows ATA-RAID will allow you to not use the whole drive ?

That's... weird, for hardware raid.

How can it be software/driver-raid when there's a raid chip on the mobo ?

What does the promise/highpoint.whatever DO, then ?

Believe me that it IS hardware raid, but the result is NOT a "normal" IDE device, so you need a driver for the OS.

("real" scsi controllers work scsi-transparent, i.e. a raid-5 stack is still normal scsi to the OS - no drivers needed)

If the BIOS allows you to use arbitrary portions of the disks for ata-raid, then use the last 200 GB for that, and make SURE that you do not depend on partition entries that do not work under Linux !

You could make a 200GB raid-0 array at the end of the disks, and use the first 20 GB of each drive for linux.

Just remember NOT to fix the partition table with linux fdisk  :Wink: 

----------

## taskara

hmm.. thanks for your replies..

here's where I'm up to so far:

it won't work unless you split your windows drives into two - ie you can't have a huge c:

if you make c:\ larger than your total space on your first hard disk, then there is no space to make a linux partition.

so what you need to do is work out how much space you want for linux - for me I want 40gb, which will be 20gb each disk.

so I subtract 20gb from total hd space = 120-20=100gb.

so I can have a c:\ of 100gb and a d:\ of 100gb.

this enables me to create the 20gb partitions on each drive under linux (which does not see the raid array).

1) make the raid array using raid controller.

2) install windows on 100gb c:\ partition

3) boot to linux and create the 20gb partition at the end of the first hard drive

4) make the other 20gb on the end of the 2nd disc and write the partition table

5) under windows create the other 100gb partition (windows will see the first 20gb linux partition, but NOT the second)

I am now benchmarking the drives under windows to make sure that the c: and d: I created are both running on raid.

update: c:\ is still running on raid (sisoft gives 72mb/sec), testing d:\ now.

update2: d:\ benched at 61mb/sec, so I assume it also is running on raid, which is good  :Smile: 

a non-raid drive will give around 30mb/sec

I'm not sure if I've cracked the case, but I think I may have.. hopefully there are no partitions overlapping (there shouldn't be if u keep d:\ the same size as c:\).. I'll do some more tests..

update3: well looks like it's all working well

hdparm on my md0 gives about 70mb/sec, and sisoft hdbench under windows gives 72 and 62mb/sec for c: and d:

I'll write up a howto if people are interested.. I thought this might be a good alternative to trying to get ataraid working under linux (esp now that it's taken out of 2.6) and this will let people still use windows on their raid array, which I know has been a sorepoint for a long time  :Smile: 

btw, you could also put your linux partitions at the front of the discs (which I may end up doing) and you will get faster transfers, because the end of a drive is always slower. still, 70mb/sec on raid0 at end of drive is pretty good I think. without raid, the front of my discs give 55mb/sec using hdparm, and 35mb/sec at the end of the drive - that's a big difference!  :Confused: 

anyway I don't know if anyone's gonna read this.. but if u do and you are interested, let me know - I'll write up a howto.

----------

## Barkotron

 *adaptr wrote:*   

> Hmm... and you say that the Windows ATA-RAID will allow you to not use the whole drive ?
> 
> That's... weird, for hardware raid.
> 
> How can it be software/driver-raid when there's a raid chip on the mobo ?
> ...

 

It's not hardware RAID - it's more BIOS-assisted software RAID. The BIOS assist just means that you can use the RAID over different OS's, can boot from it etc.

----------

## Crg

 *adaptr wrote:*   

>  *taskara wrote:*   but for linux, I want to be able to access both drives and use linux software raid. 
> 
> Why ?
> 
> Surely hardware ata-raid is faster than software.

 

1) No, hardware raid is not necessarily faster than software raid.

2) promise/highpoint ataraid is software raid.Last edited by Crg on Thu Jan 08, 2004 8:31 am; edited 1 time in total

----------

## taskara

I didn't want to argue.. so I let it go.. but thanks guys  :Wink: 

----------

## vince

eureka.  Thanks taskara.  I think this is what i'm looking for.  I'm setting up a dual boot XP/Linux on my athlon64 fx-51 system.  I have 2 120 gb wd SATA drives in there.  Any suggestions for setting up.  I too would like the linux partitions at the front of the drive.  How would i go about doing this?  Install linux first?  

Any tutorials?  Sorry just did a quick read through of your post.  I'm new to using raid, so it's all new to me.

----------

## taskara

 *vince wrote:*   

> eureka.  Thanks taskara.  I think this is what i'm looking for.  I'm setting up a dual boot XP/Linux on my athlon64 fx-51 system.  I have 2 120 gb wd SATA drives in there.  Any suggestions for setting up.  I too would like the linux partitions at the front of the drive.  How would i go about doing this?  Install linux first?  
> 
> Any tutorials?  Sorry just did a quick read through of your post.  I'm new to using raid, so it's all new to me.

 

ok  :Smile:  well I'm going to work on putting linux at the front tonight. windows sometimes has problems with this, but we'll see.

I'm not sure if this will work 100% yet, as I haven't had time to fully test the partitions, but it seems logical in my head  :Smile:  the only thing is if the partitions cross eachother, but I think it will all be ok  :Smile: 

I'll get back to you with a howto if you like, once I've worked out "linux at the front".

----------

## taskara

btw vince, you may want to read this software raid howto, it will give you an idea of what I'm talking about  :Smile: 

also, u an aussie?

----------

## gmichels

very nice, indeed

The only reason I haven't switched to 2.6 on my desktop is this damn siiraid controller.

My only current problem is I don't have where to backup my files so I can create this new partition layout, but it's good to know if someday I want to migrate to 2.6 in this box.

----------

## taskara

 *Drago wrote:*   

> very nice, indeed
> 
> The only reason I haven't switched to 2.6 on my desktop is this damn siiraid controller.
> 
> My only current problem is I don't have where to backup my files so I can create this new partition layout, but it's good to know if someday I want to migrate to 2.6 in this box.

 

not fully tested yet, but we'll see soon.

2.6 kernel rocks.. you will get faster speeds on your silicon image controller too.

borrow a friend's drive one day and use it to copy your data off  :Wink: 

----------

## vince

 *taskara wrote:*   

> btw vince, you may want to read this software raid howto, it will give you an idea of what I'm talking about 
> 
> also, u an aussie?

 

nope.  I'm on the other side of the world.  Southern California.  My mom used to live in Perth though.

----------

## taskara

ahh k.. just curious with the "Eureka" is all  :Wink: 

----------

## taskara

well an update for people - I'm having problems getting a boot loader installed..

grub stops at "grub"

and lilo.. doesn't even seem to exist when installed  :Confused: 

I'll keep trying..

----------

## taskara

UPDATE:

unfortunately, no matter what I tried it did not want to boot when the drives were connected to the raid controller.

if I took the first serial drive OFF the raid controller and put it on a different sata controller, it booted just fine.

which has lead me to believe it is a problem where grub recognises the raid 0 array on some basic level, and therefore tries to access it as such.

my new theory (which I'm hoping to try this weekend) is to use a usb memory stick (detected as /dev/sdc) and make a 30mb partition and use that for /boot.

this will stop the problem of the kernel and grub being on a raid0 array.

My bios supports booting from usb-drive so I'll give this at try.

I will post my findings back here.

Cheers

----------

## taskara

UPDATE:

I have managed to get this sucessfully working using my external usb harddrive as /boot, installing grub to my external usb drive, and changing my bios boot order to usb-hdd first.

windows is now running on intel raid0 with 2 x 90gb partitions, and gentoo is running on the same drives using linux software raid.

will post some harddrive benchmarks later when I'm at home, also post a howto if people are interested.

the only thing I haven't tested, is my theory on the partitions not overlapping.

I have filled the two windows partitions, and all the data transfers were successful - now I need to put lots of files on linux to make sure all the space is utilised correctly.

I feel my theory is correct, because essentially I have utilised the first 30gb of each drive for linux, and windows is utilising the rest of each drive.

the only problem will arise if the first windows partition actually writes over the linux partitions on the second drive - but like I said... this doesn't appear to be a problem atm..

----------

## gmichels

so it can't be used as a boot device... that's bad as I don't have an external usb drive to use as boot device

anyway it's good to know it looks doable.

any words on the ataraid stuff being supported under 2.6?

----------

## taskara

 *Drago wrote:*   

> so it can't be used as a boot device... that's bad as I don't have an external usb drive to use as boot device
> 
> anyway it's good to know it looks doable.
> 
> any words on the ataraid stuff being supported under 2.6?

 

ataraid will never be supported under 2.6.x

unless someone can find a way to get grub to work on the raid array (which linux is not ustilising), I can't think of any other solution than using an external drive, or an internal drive, or a zip drive, or a memory card with ide converter  :Confused: 

----------

## gmichels

 *taskara wrote:*   

> ataraid will never be supported under 2.6.x
> 
> unless someone can find a way to get grub to work on the raid array (which linux is not ustilising), I can't think of any other solution than using an external drive, or an internal drive, or a zip drive, or a memory card with ide converter 

 

Are you sure? I heard something about integrating it into the md framework or something like that.

well I could use a cd to boot  :Very Happy: 

anyway I prefer to wait until you finish your overlapping tests

----------

## taskara

hmm.. I didn't think they would bother with ataraid support.

the only people using it will be home users that dual boot, and maybe people with cheap raid controllers in their servers.

if u don't need to use windows, one woudl assume you would use linux software raid over these controller things..

I'll hopefully have some more info on overlapping to post soon...

if only I could get grub and /boot to work.. then you wouldn't need a non-raided boot device..  :Sad: 

----------

## axe

I don't know if this will help you since I disabled "hardware raid" and run single disk with linux software raid instead since intel's raid bios setup only allowed me to setup 1 array using the full capacity of the disks which makes it impossible for me to mix "hardware raid" and linux raid on the same disks. Altough this machine is linux only so it doesn't really matter much.

I setup my raid like this using 2 SATA drives on ICH5R(configured as single disk = not raid);

On sda I first made one small ext2 partition as a boot partition for lilo and mounted /boot.

Then I just setup regular raid partitions on sda/sdb. 

I have only tried this with lilo and it works great with both kernel 2.6.x and 2.4.22-rc5(gentoo)

----------

## taskara

 *axe wrote:*   

> I don't know if this will help you since I disabled "hardware raid" and run single disk with linux software raid instead since intel's raid bios setup only allowed me to setup 1 array using the full capacity of the disks which makes it impossible for me to mix "hardware raid" and linux raid on the same disks. Altough this machine is linux only so it doesn't really matter much.
> 
> I setup my raid like this using 2 SATA drives on ICH5R(configured as single disk = not raid);
> 
> On sda I first made one small ext2 partition as a boot partition for lilo and mounted /boot.
> ...

 

thanks for your post..

that's because you didn't put them in a raid 0 array. grub doesn't seem to like raid 0 arrays - it can't figure out where the first drive is. or perhaps I just needed a newer version or something, but I couldn't get it to work.

I used intel raid bio to create one big raid 0 array using the two disks. windows uses the intel driver to access the windows partitions on raid0, linux is not configured to not use a dirver (cause there is none) and use linux software raid instead.. just can't get the boot loader on the drives.

I tried putting small (100mb) ext2 partitions on each drive, and I tried installing grub to BOTH drives.

if I disconnect one drive from the raid array and put it to a NON raid sata controller, grub loads perfectly and it boots into linux.

but if I put it back onto the raid0 array, it won't work. I think this is because at some level grub tries to access them as a raid0 array or something, but obviously can't.

----------

## mliu66

taskara, can you post a how to? Thanks

One additional problem, you won't be able to exchange data between linux and windows partitions,right?

And how can you make windows fill up all the free space left by linux? The partition table is a trick.Last edited by mliu66 on Fri Apr 02, 2004 11:38 pm; edited 1 time in total

----------

## taskara

correct - you cannot exchange data between them because the windows is on the raid array.

I did have a problem whereby I filled my windows partitions with data, and next time I booted into linux it failed.

so I'm not sure if the partitions are overlapping - I got around this by doubling the amount of space for the linux partitions, however this means you are wasting a lot of space - maybe 30 gb or so (depending on how large your linux is)

since then I have just ditched windows altogether, am running linux software raid, and have windows on another disk that I just plug in if I need to edit dvd's under windows..

----------

## mliu66

Sad. So you are not really running windows with raid at all?

Update, I tried it myself but go the same problem as yours, GRUB displayed but cannot boot up

----------

## taskara

yeah I think this problem has been resolved in the latest cvs version of grub (v .93, not 94).

perhaps you can try that - it might work for you!  :Wink: 

----------

## mliu66

Software raid might be the only way that I can get a dual boot system. But didn't you mentioned you have successfully booted it up under this configuration? Could you ever post a mini-how to? Thanks a lot

----------

## taskara

dual booting without the intel raid is easy - but you can still have linux software raid - just not windows raid.

it's just a series of identical partitions, and grub has no problem booting to it.

have you seen the software raid howto?

your harddrives would look something like this:

sda1 - 100mb - /boot lsr raid1

sda2 - 512mb - swap

sda3 - 10gb - windows c:\ ntfs NON raid

sda4 - extended

sda5 - 10gb - / lsr raid0

sda6 - rest - /home lsr raid0

sdb1 - 100mb - /boot lsr raid1

sdb2 - 512mb - swap

sdb3 - 10gb - windows d:\ fat32 NON raid

sdb4 - extended

sdb5 - 10gb - / lsr raid0

sdb6 - rest - /home lsr raid0

----------

