HowtoForge - Linux Howtos in English English|HowtoForge.de - Linux-Howtos auf Deutsch Deutsch

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

Submitted by patjec (Contact Author) (Forums) on Thu, 2005-10-27 17:50. :: Linux

How To Install Linux Software-Raid

Thanks to these people and their FAQ:

Emidio Planamente's pages: http://www.planamente.ch/emidio/pages/linux_howto_root_lvm_raid.php and Tado's serverconfig pages at http://howtoforge.com.

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

While testing ISPconfig according to the http://howtoforge.com/perfect_setup_ubuntu_5.10 tutorial I wanted to add RAID1 on my server. I followed all the instructions from http://howtoforge.com/perfect_setup_ubuntu_5.10_p2 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 (http://freshmeat.net/projects/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

or

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:

root@server1:/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 (http://freshmeat.net/projects/mdadm) tools.Have fun...


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Please do not use the comment function to ask for help! If you need help, please use our forum: http://www.howtoforge.com/forums
Comments will be published after administrator approval.
Submitted by skua-57 (Contact Author) (Forums) on Wed, 2006-09-13 08:08.

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?

 skua

 

Submitted by Anonymous (Contact Author) (Forums) on Sun, 2006-02-26 08:47.
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) ;-)
Submitted by Anonymous (Contact Author) (Forums) on Sat, 2006-03-11 05:28.
Yea me too...thanks!
Submitted by Anonymous (Contact Author) (Forums) on Thu, 2005-11-10 15:43.
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?
Submitted by Anonymous (Contact Author) (Forums) on Sun, 2006-01-29 23:11.
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.
Submitted by Anonymous (Contact Author) (Forums) on Sun, 2005-12-11 00:46.

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.

Submitted by Anonymous (Contact Author) (Forums) on Thu, 2006-06-29 12:51.

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.

Submitted by Anonymous (Contact Author) (Forums) on Fri, 2005-12-30 05:19.

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 :)

grtz,

Ethereal

Submitted by Anonymous (Contact Author) (Forums) on Sun, 2005-12-18 06:09.
you find this to be significantly different from windows?
Submitted by lance (Contact Author) (Forums) on Sun, 2005-12-11 16:15.

Hi,

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.

1
next page
last page