Portal Home > Knowledgebase > Articles Database > How to setup software RAID-10 on Linux with /boot on RAID-1?
How to setup software RAID-10 on Linux with /boot on RAID-1?
Posted by tomfra, 07-08-2007, 06:26 AM |
Hi everyone,
I am in a somewhat complicated situation... I wanted to order a custom server with hardware 3Ware RAID controller but after over a month of waiting I was told the HW RAID controller, as well as any other 3Ware controller they tried, does not work with the motherboard used in the server from Fujitsu-Siemens and that they simply got a reply from FS that the controller is not certified to work with their motherboard.
So although I'd prefer a HW raid, I am forced to either choose a different webhost or setup a software RAID. The problem is, I haven't done that before and am somewhat moderately...scared
I have read a lot of the info about SW RAID on Linux that I could find through Google but there are some questions unanswered still. So I thought that perhaps some of the more knowledgeable WHT members could help me with this problem...
The server specs will be:
Core2Duo E6600 (2.4Ghz), 2GB RAM, 6-8x* 250GB SATA II HDDs, CentOS 4.4 or SuSe, DirectAdmin
* I prefer 8 HDDs (or actually 9) over 6 but I am not sure if their server chassis can hold that many HDDs, I am awaiting answer from them. They don't have any other drives beside the 250GB ones so I am limited to those.
The preferred SW RAID setup is to have everything in RAID 10, except for the /boot partition which has to be on RAID-1 or no RAID I believe, plus one drive as hot spare (that would be the 9th drive). I am quite sure they will not do the setup for me but will give me access to KVM over IP and a Linux image preinstalled on the first HDD so that I'll have a functional system that needs to be upgraded to RAID-10.
How do I do that? The big problem I see is that LILO or GRUB can't boot from a software RAID-5/10 so I will have to mount the /boot partition elsewhere. It's probably terribly simple...if you have done it before which I have not. I have read some articles on how to setup a RAID-5/10 with mdadm (e.g. http://bfish.xaedalus.net/?p=188 ) but they usually do not talk about how to setup the boot partition. Should it be setup as a small sized (100-200MB) RAID-1 partition spread over all of the drives in the otherwise RAID-10 array?
What about swap? Should I create a 4-8GB (I plan to upgrade the server RAM to 4GB in near future) RAID-1 swap partition on each of the disks or swap to a file on the main RAID-10 partitions. The second sounds simpler but what about performance? Is swapping to a file on RAID-10 array a bad idea, performance wise?
Is it possible to grow a RAID-10 array in a way similar to growing a RAID-5 array with mdadm (using two extra drives instead of one of course)? mdadm doesn't actually even mention RAID-10 despite it does support it without having to create RAID-0 on top of RAID-1 pairs if the support is in kernel, from what I know.
I know, too many questions I will be grateful for any ideas and suggestions you may share.
Thanks!
Tomas
|
Posted by steven-v, 07-08-2007, 12:20 PM |
So, you want software RAID to "eat" all of your CPU/RAM resouces ?
I would consider different DC instead - check Softlayer.com for example, they have RAID cards is stock right now and will build server for you in few hours.
|
Posted by tomfra, 07-08-2007, 12:34 PM |
Why do you think software RAID-10 should "eat all of the CPU/RAM resouces" on a 2.4Ghz Core2Duo with 2GB RAM? From the research I have done nothing supports such an opinion. Do you have any benchmark results / real-world data that would support it?
I really don't want to start yet another HW x SW RAID flamewar. If you are sure one solution is better than the other, please support it with some test data or links to such tests. So far, based on the data & benchmarks I have found elsewhere, what you said is...well, a complete nonsense. Sorry for that, just my opinion
Tomas
|
Posted by gbjbaanb, 07-08-2007, 01:07 PM |
Whilst it is obvious that a good hardware raid card will offload processing from the CPU to the card's CPU, the big question is how much CPU is actually taken up processing if you do have SW raid.
I have a lightly-loaded box with SW raid-1, its been up for a while and top says that md3_raid1 has used 11.88 minutes of CPU. to put this in context kjournald has taken up 8 hours, 21.59 minutes, and kswapd0 taken just over 1 hour of CPU.
That suggests to me that it does take up CPU, but not such a significant amount that you will even notice it.
|
Posted by steven-v, 07-08-2007, 02:25 PM |
Guys,
Have you ever see server with medium size forum ? If you did - you would understand what I'm talking about.
Even on HW raid1 - I got 5.00 load during "day" times (after a lot of optimizations) - this is on Xeon 3060/4GB.
May be SW raid1 is the option for bunch of static sites.
|
Posted by tomfra, 07-08-2007, 02:44 PM |
Steven-v,
I don't get it. You now say you had a high load on your server even when a HW Raid was used. What makes you believe it would have been much worse with a SW Raid? I guess you would have had load like 5.05 or 5.10 if a SW Raid array was used instead of 5.00 with a HW raid both using the same config. Not much difference IMHO...
Really, I think you are mixing apples and pears here. Beside, RAID-1 (using 2 HDDs I suppose) be it hardware or software will very likely always have much worse performance than a RAID-10 array spread over 8 HDDs (when using the same hard drives).
Tomas
|
Posted by steven-v, 07-08-2007, 03:11 PM |
You try and tell us
I did try SW Raid couple years ago and it's was sucking in many ways - including performance wise.
However you trying to convince yourself that SW RAID is not much difference from HW raid - well, whatever dude. Please comeback in couple weeks and tell us your experiences.
|
Posted by tomfra, 07-08-2007, 03:24 PM |
Steven,
Then again. I think you are comparing uncomparable if you compare SW Raid you tried couple of years ago with the current situation where CPUs are so much faster they were those couple of years ago and the Linux kernel support is something completely different these days.
Anyway, if someone more knowledgeable of this issue is reading this thread, I would welcome their input.
Tomas
|
Posted by x86brandon, 07-09-2007, 04:37 AM |
steven, I would say that if you have a load average of 5 on a server, you are either pushing it beyond what it should be, or have not spent time optimizing it. What is your idea of a 'medium' forum?
|
Add to Favourites Print this Article
Also Read