LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-07-2004, 12:49 PM   #1
trouby
Member
 
Registered: Sep 2003
Posts: 59

Rep: Reputation: 15
Kernel software RAID


Did anyone manage to set a software RAID by the Linux kernel?

Also, if possible, is that only mirroring? that means when one of the HD fails I have to manually disconnect it and install a new one? or Linux knows how to read from the healthy disk automatically just like RAID in harward?
 
Old 01-07-2004, 01:18 PM   #2
mcleodnine
Senior Member
 
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731

Rep: Reputation: 45
Software RAID in Linux has been alive and well for a few years now. You can choose RAID levels 0, 1, 4, 5 and combinations thereof. You can also setup 'hot spare' drives so that in the event of a drive failure the hot spare will be added to the array. If you're looking for hot-swap drives you'll need a hardware RAID controller. I've got a very mini HowTo here
 
Old 01-07-2004, 04:59 PM   #3
trouby
Member
 
Registered: Sep 2003
Posts: 59

Original Poster
Rep: Reputation: 15
Well, I have 1U server, so I do not have more space than two hds,
So if I have only two hard drives, is it possible to set raid only with normal IDE controller? without any RAID controllers?

well, about RAID controllers, I have onboard promise fasttrak RAID ATA raid controller, I personally never done RAID with ATA RAID controller ever, it seems like the new kernels supports Promise controllers but the whole thing didn't work good, I've created an initd that loads the module to support the Fasttrak and for some reason, suddendly the whole Linux system stucked,

when I saw the logs, it seems like the kernel wrote raid errors, so it seems that something goes wrong while writing to the controller, so I decided to work only with normal IDE. it took me hours to understand the problem, I've encountered problems like that linux STUCKED when trying to mount one of the raid partitions.

since this is a critical server, I must set some RAID, if it's possible to do full RAID-1 with software raid than great, if it's not possible, I'll buy some raid controller that do support linux for 100% (If anyone knows about such an ATA RAID controller I'll be very glad to hear the vendor's name)

Also, if it's possible to do RAID in software without any hardware, do I loose performance when doing it in software? or it's the same as the hardware controller?

Anyway, I'm a little desperate,
I'll be glad for any help,

10x.
 
Old 01-07-2004, 05:25 PM   #4
mcleodnine
Senior Member
 
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731

Rep: Reputation: 45
Software RAID1 is a breeze. As for hardware RAID controllers, the on-board ATA and generic PCI RAID 0/1 controllers don't really do a lot of on-board processing so you won't see much of a difference between those and software RAID.

If you really need performance you'll want to get a RAID card with real RAID controller built-in (3Ware seems to be the vendor of choice for ATA RAID on *NIX as it's had kernel support for a while now)
 
Old 01-07-2004, 05:35 PM   #5
trouby
Member
 
Registered: Sep 2003
Posts: 59

Original Poster
Rep: Reputation: 15
Eh,

when you say "real raid controller" what does it mean? and if I have an onboard RAID controller, can I use an external one instead? I'm not quit sure it's possible to disable the onboard raid controller (unless it's possible to disable it through the BIOS).

also, if until now I used RAID-1 under the ATA RAID, do I have to reinstall the whole partitions after connecting the raided HD to the IDE?

10x
 
Old 01-07-2004, 05:58 PM   #6
mcleodnine
Senior Member
 
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731

Rep: Reputation: 45
Quote:
Originally posted by trouby
Eh,

when you say "real raid controller" what does it mean? and if I have an onboard RAID controller, can I use an external one instead? I'm not quit sure it's possible to disable the onboard raid controller (unless it's possible to disable it through the BIOS).
Usually you can just use the onboard RAID as just another primary/secondary drive controller. By 'real raid' I'm referring to a drive that can manage the shuffling of the data at a low level to manage and populate the array. Lots of the basic hardware RAID cards merely have a small program burned into the the ROM that you can run when you boot the system, as well as present the participating drives/partitions as a single device to the O/S.
Quote:

also, if until now I used RAID-1 under the ATA RAID, do I have to reinstall the whole partitions after connecting the raided HD to the IDE?

10x
That would depend more on your controller than Linux. Your safest bet would be to dump all the data from your current setup to a new disk (or try it with a degraded array by using a current disk) and build a software array using your current image.
 
Old 01-07-2004, 06:51 PM   #7
trouby
Member
 
Registered: Sep 2003
Posts: 59

Original Poster
Rep: Reputation: 15
Ye, real RAID controllres writes the data in the firmware level,

anyway, thanks for the answers,

one last thing, should I raid the swap partitions too? I guess this will damage the performance,

well, I guess I'll dump the current data to an image, and dump the image to the new partitions under the raid, what's the easiest way to create the images?

10x.
 
Old 01-07-2004, 06:53 PM   #8
mcleodnine
Senior Member
 
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731

Rep: Reputation: 45
don't do any swap over RAID, jus tuse multiple swap partitions and the kswap can pick the most avialble device to use as swap. If you're starting to hit a lot of swap then get more RAM - especially if it's a server.
 
Old 01-07-2004, 07:46 PM   #9
trouby
Member
 
Registered: Sep 2003
Posts: 59

Original Poster
Rep: Reputation: 15
Ye, I've set two swap partitions, also, it is possible to use make them both have same priority thorugh /etc/fstab with the 'pri' parameter,

anyway, I'll give a try to software RAID.

thanks a lot
 
Old 01-07-2004, 08:03 PM   #10
trouby
Member
 
Registered: Sep 2003
Posts: 59

Original Poster
Rep: Reputation: 15
one last little thing,

is there any way to compare the performance between the hardware raid controller and the software raid?

any tool for making benchmark for read/write on the drives?

10x.
 
Old 01-07-2004, 09:27 PM   #11
mcleodnine
Senior Member
 
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731

Rep: Reputation: 45
doubt you'd need to set a priority for the swap - let the kernel handle it.

As for benchmarking there's 'hdparm' and i think ppl still use bonnie+.
 
Old 01-08-2004, 03:15 PM   #12
trouby
Member
 
Registered: Sep 2003
Posts: 59

Original Poster
Rep: Reputation: 15
Alright, 10x,

Hmm, I've run hdparm -tT /dev/sda(the raided HD) and got much better results than when I ran hdparm after connecting the HD to the IDE

Is that normal?
 
Old 01-08-2004, 05:41 PM   #13
mcleodnine
Senior Member
 
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731

Rep: Reputation: 45
depends on your controller and your raid setup on each one. any slave drives in the equation?
 
Old 01-08-2004, 06:58 PM   #14
trouby
Member
 
Registered: Sep 2003
Posts: 59

Original Poster
Rep: Reputation: 15
Nothing,

but nevermind, I don't have other options so I'll work just like that,

I have another serious problem, I've made images from the old partitions with partimage, it just creates a gz image file that can be restored later on.

before setting up software raid, I made exactly the same partitions sizes as it was before when using the hardware raid, unfortunately, the software raid seems to take some kilobytes from the real size and now partimage can't restore the image (It just gives an error that the partition is too little),

anyway, what are my options? I have a tar.gz file for each partition, but if I'll just -copy- the files to the root/boot partitions, just like that, will everything work fine?!, I guess I'm coming with orientation from the windows OS that things are a little more complex with just copying the \winnt directory


Any suggestions will be very very welcomed.

10x.
 
Old 01-08-2004, 07:07 PM   #15
trouby
Member
 
Registered: Sep 2003
Posts: 59

Original Poster
Rep: Reputation: 15
I guess I don't understand the whole picture of the software raid, but maybe this can solve my problem:

I have 3 raid devices md0/2/3 that their size is smaller than the images I've created from the partitions before (since the software raid steals some KBs)

md0/2/3 are built from two hard drives, /hda,/hdc and it seems like these devices are accessible too, on the original size!

If i'll write the images directly to the hda, will the software raid mirror the entire partition to hdc too? or will it destroy the whole thing?

if this is possible, I'll just write those three images to hda1/2/3 and then reconstruct the mirror on hdc.


thanks in advanced.

Trouby.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Why can't I mount this md0 raid? (mdadm and software raid) cruiserparts Linux - Software 35 01-05-2013 04:35 PM
Kernel 2.6 Install & Software RAID cory2112 Linux - General 2 06-29-2005 11:34 PM
Can fake raid be converted to linux software raid? jmacdonald801 Linux - General 3 01-30-2005 01:33 PM
Setting up software RAID under sarge with a 2.6 kernel? miggins Debian 3 01-19-2005 06:32 PM
moving system from ide software raid to new box with scsi raid ftumsh Linux - General 0 10-28-2003 10:34 AM


All times are GMT -5. The time now is 06:40 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration