How To Install Linux Software-Raid on Debian 3.1, 3.1r1a & Ubuntu 5.10

How To Install Linux Software-Raid

Thanks to these people and their FAQ:

Emidio Planamente's pages: and Tado's serverconfig pages at

Tested with these distros: Debian 3.1 & 3.1r1a sarge, Ubuntu-server 5.10 "The Breezy Badger Release".

While testing ISPconfig according to the tutorial I wanted to add RAID1 on my server. I followed all the instructions from and changed things after:

"I will use the following partition scheme:

/boot 50 MB
/swap 1GB
/ 10 GB
/var the rest of the hard disk"

I created the partitions on both hard disks (hda + hdb) as above (sizes optimized for my system) but instead of ext3 as file system chose Linux RAID for all 8 partitions (2 * 4, 4 on each disk).

After you created these partitions with identical sizes on both drives, start Configure Software Raid. This is the entry for working with mdadm (

Create a RAID system of your choice. You can set up RAID0, RAID1 or RAID5. I have 2 hard disks, backup is the primary task, so I chose RAID1. Now it is time to connect the partitions on hda and hdb and create the RAID1 arrays.

Pick 2 equal partitions and bind them as an array. Do this with all 8 partitions and you get 4 RAID1 arrays. Close the RAID configure screen and you see on the partition screen 4 new RAID1 entries.

Open them one by one by. Scroll to the first one and press enter. Change type from RAID to your preferred file system and choose a mount point (for me: first one ext3 and /boot; second one swap; third one ext3 and /; the fourth one ext3 and /var). Go to Save and be very patient. On my server I had to stop with anything because the system slowed down dramatically for over one hour.

You can verify the build of the array's on a second console (ALT + F2) and repeatedly typing

cat /proc/mdstat on Ubuntu 5.1


watch cat /proc/mdstat on Debian 3.1 and newer.

You can see the build of the RAID arrays that way. After the build you have something like:

[email protected]:/home/patje/install_ispconfig# cat /proc/mdstat
Personalities : [raid1]md3 : active raid1 sda4[0] sdb4[1] 133596416 blocks [2/2] [UU]
#Creating%20RAID%20devices md2 : active raid1 sda3[0] sdb3[1] 24410688 blocks [2/2] [UU]
md1 : active raid1 sda2[0] sdb2[1] 1951808 blocks [2/2] [UU]
md0 : active raid1 sda1[0] sdb1[1] 120384 blocks [2/2] [UU]
unused devices: <none>

After this the Debian / Ubuntu installer does the rest of the installation. Now take your time and study the mdadm ( tools.Have fun...

Share this page:

Suggested articles

19 Comment(s)

Add comment


By: Anonymous

instead of typing cat /proc/mdstat over and over again, you can simply use watch

so: watch cat /proc/mdstat

By: patrick

After the basic instalation 'watch' is not availble.

By: Anonymous

Followed your instructions and all went well until the attempt to install GRUB failed. I tried LILO and it too failed. Is there something else I need to do that everyone with linux experience knows about but a newbie would not? Should I just ignore the error and plow on?

By: patrick

No, after that the installer from Debian / Ubunu (both tested) did all the rest.

By: Anonymous

The Ubuntu 5.10 installer fails to install grub and lilo for me too. I am using 3 SATA drives (but no raid setup through BIOS) just the Linux software raid.

By: Anonymous

Any thoughts on this very legitimate question? This is exactly the reason Linux will NEVER get to where Windows is. Somebody asks a question and it gets ignored because:

a) Nobody has a clue

b) The guy made the mistake of saying that he's a newbie, so it gets ignored. Frankly, I'm surprised that no one said something like RTFM you F____ newbie.

c) Nobody cares enough to answer this.

Guess what, I have the EXACT same problem. Additionally, how in the hell do you mirror a swap partition? Oh that's right. You DON'T!!

If linux experts don't get their heads out of their ass and start sharing the knowledge, Linux is doomed to fail or at the very least be controlled by big companies like Novell and the likes.

By: admin

"b) The guy made the mistake of saying that he's a newbie, so it gets ignored. Frankly, I'm surprised that no one said something like RTFM you F____ newbie."

If you had read three lines above you'd have seen this:

"Please do not use the comment function to ask for help! If you need help, please use our forum:"

A forum is much better suited to answer questions like these because it has much more formatting options, a search function, etc.

In addition to that, noone ignores newbies here! Far from it, this is one of the most newbie-friendly places on the net. Have a look at the forum, and you'll understand why.

"c) Nobody cares enough to answer this."

Because he did not post in the forum. You can use comments to make annotations, share your thoughts, but obviously they are not very well suited to ask for help. I've pointed out the reasons for this before.

"If linux experts don't get their heads out of their ass and start sharing the knowledge, Linux is doomed to fail or at the very least be controlled by big companies like Novell and the likes."

You can't blame us for not sharing our knowledge, can you? We've written tons of tutorials, are spending several hours each day in the forum to help newbies and everyone else without benefitting from it financially. I don't think you would do something like that if you were in our place so please stop posting nonsense here, and if you have questions please go to the forum.

And please keep in mind: if you're friendly to us, we'll be friendly to you, so don't start flame-wars or the like.

By: thctlo

wel, as i see NOBODY here does it right.

You CAN install a debian sarge with RAID 1 from the debian installer.

You DONT have to switch to other console for that.

lots of people forget to select the MDADM in de installer which makes you

able to create the raid volumes.

I'm going to make a howto how this is done.

And yes its difficualt in the beginnen, i took us about 10 installations to get the

order of creating partition etc to get RAID 1 on root from installer.

By: patrick

I wait for youre input and change the things in mine that you learn me. Thanks.

By: Anonymous

you find this to be significantly different from windows?

By: Anonymous

Keep on your windowsbox then.

I was a newbie on linux too and got frustrated too, now i see that most questions are already on the net, its just you have to learn how to use the net. and by the way, raid systems are well overdocumented in many wiki pages. and thats what is wrong on windows machines, almost nobody takes time to learn what they are dealing with, A GOD a blue screen, what are those stupid numbers!!

on the other hand, this is a nice one too "i boot my system and god KERNEL panic" what did i do wrong :) whell thats a question that we could ANSWER NOT.

i think you could better be on your windows box if you like the point and click system, and never take the time to learn ALL the shells there (not only cmd and dos)

And if you want to find out more do more with your machine and like to figure things out yourself atleast take some time for it you could try linux, If you look good on the net its almost impossible that your question is not already asked. do a quick search on the subject in google news you will see what i mean

And linux will be a competeter off windows systems it will take a couple off years but they will stay.

and no i'm not a windows freak, neither am i a mac os2 linux or whatever for system freak, just used to work with all :)



By: Anonymous

Why did you ask for help here? It says specifically after the article not to ask for help here but instead use the forums - there is even a link.

Calm down and ask for help in the forums.

And don't start a tirade why linux is bad and why people using linux don't share their knowledge - this is neither the right place nor the right time.

By: John Byrne

Thats very wrong good luck doing software raid with windows have fun with that windows cant exist on a striped partition linux can be installed on a software raid however /boot must be on a separate partition as for ubuntu you need to grab the alternate install cd which is easy to setup a raid on not the standard install cd

By: Anonymous

had a similar problem myself. When you say the GRUB and/or LILO installation failed do you mean it wouldn't boot after installation? This is the problem I had and it was due to the RAID support being loaded as a module and not compiled into the kernel. The easiest way round this is to create a new initrd that pre loads the RAID support.(Easier then compiling a new kernel!!) Then just configure LILO or GRUB to load that intrd and all should be well.

By: John Byrne

grub should be on its own partition and should for the sake of simplicity the boot partition should be the first partition on the first disk and 150 mb is a good size it should be formatted with ext2 or ext3 and swap should be on the last drive if you want to keep it simple i like to use the raid for "/" and install grub in the mbr

By: patrick


As I wrote in the howto here is how I let this work with MY hardware and Ubuntu5.10 /Debian 3.10. I tested both.

Why It doesn't work for you? Indeed I have no clue. The onlything I read is 'it doesn't work for me'. Maybe it's hardware related, maybe something else...

No, I'm also a 'newbee', I play with Linux since a 18 months or so.

Yes I care, but if you are not registred or don't take the time to mail me private, I am not starting a search to a clue in this comment section. This comment section is not build as a forum.

Ever called to Microsoft helpdesk? 250€ a call without being sure they give you a result... You get a tracking number and that's it.

By: Anonymous

just like to say thank you -- worked for me, after a couple of false starts, lol. I'm a newbie too -- and an old geezer to boot (57) ;-)

By: Anonymous

Yea me too...thanks!

By: skua-57

Couple of questions: 
1. Why ext3fs? Why not  Raiserfs (which is a journaling fs)?
2. Why bother with RAID1 for your system partitions? If you have a single user system, who cares about the system partition; you're upgrading all the time anyway. It's your documents an photos that are irreplaceable. On the other hand, if you run a criticle server, maybe you can justify RAID... but then you have to keep an eye on the logs all the time.
Which is it?

 What does your /etc/fstab file look like for a RAID?  Does the linux installation know how to create it, or does the user have to tinker with /etc/fstab?

Is your RAID transparent, as a file system, when you boot to a Live-CD?   Can you fix stuff easily by booting to a live CD if you have to?

 What do you put into the grub setup to cause RAID support to be loaded, if your kernel doesn't have RAID compiled in?