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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
|
01-07-2004, 11:49 AM
|
#1
|
Member
Registered: Sep 2003
Posts: 59
Rep:
|
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?
|
|
|
01-07-2004, 12:18 PM
|
#2
|
Senior Member
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731
Rep:
|
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
|
|
|
01-07-2004, 03:59 PM
|
#3
|
Member
Registered: Sep 2003
Posts: 59
Original Poster
Rep:
|
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.
|
|
|
01-07-2004, 04:25 PM
|
#4
|
Senior Member
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731
Rep:
|
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)
|
|
|
01-07-2004, 04:35 PM
|
#5
|
Member
Registered: Sep 2003
Posts: 59
Original Poster
Rep:
|
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
|
|
|
01-07-2004, 04:58 PM
|
#6
|
Senior Member
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731
Rep:
|
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.
|
|
|
01-07-2004, 05:51 PM
|
#7
|
Member
Registered: Sep 2003
Posts: 59
Original Poster
Rep:
|
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.
|
|
|
01-07-2004, 05:53 PM
|
#8
|
Senior Member
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731
Rep:
|
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.
|
|
|
01-07-2004, 06:46 PM
|
#9
|
Member
Registered: Sep 2003
Posts: 59
Original Poster
Rep:
|
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
|
|
|
01-07-2004, 07:03 PM
|
#10
|
Member
Registered: Sep 2003
Posts: 59
Original Poster
Rep:
|
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.
|
|
|
01-07-2004, 08:27 PM
|
#11
|
Senior Member
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731
Rep:
|
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+.
|
|
|
01-08-2004, 02:15 PM
|
#12
|
Member
Registered: Sep 2003
Posts: 59
Original Poster
Rep:
|
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?
|
|
|
01-08-2004, 04:41 PM
|
#13
|
Senior Member
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731
Rep:
|
depends on your controller and your raid setup on each one. any slave drives in the equation?
|
|
|
01-08-2004, 05:58 PM
|
#14
|
Member
Registered: Sep 2003
Posts: 59
Original Poster
Rep:
|
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.
|
|
|
01-08-2004, 06:07 PM
|
#15
|
Member
Registered: Sep 2003
Posts: 59
Original Poster
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 11:45 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|