Experiences w/ Software RAID 5 Under Linux?
MagnusDredd asks: "I am trying to build a large home drive array on the cheap. I have 8 Maxtor 250G Hard Drives that I got at Fry's Electronics for $120 apiece. I have an old 500Mhz machine that I can re-purpose to sit in the corner and serve files. I plan on running Slackware on the machine, there will be no X11, or much other than SMB, NFS, etc. I have worked with hardware arrays, but have no experience with software RAIDs. Since I am about to trust a bunch of files to this array (not only mine but I'm storing files for friends as well), I am concerned with reliability. How stable is the current RAID 5 support in Linux? How hard is it to rebuild an array? How well does the hot spare work? Will it rebuild using the spare automatically if it detects a drive has failed?"
Writing large files to an eight-drive RAID-5 arary will be butt slow unless you have a LOT of RAM.
The idea is that in order to write data to any sector on one of the drives, the sectors from six of the other drives need to be read, all XOR'd together, and then the result written to the remaining drive.
In theory, this could be done simultaneously--read from all drives at once. In practice, Software RAID and ATA isn't so good at that kind of thing. (Good hardware RAID is a different story.)
So the idea is that those six reads will take a reasonable amount of time, every time there is a write. If you have a lot of RAM, and/or don't write really large files, it won't be a problem because all the data can be cached in RAM and the reading/writing involving the disks can be done later, at the OS's leisure. However, if you don't have a lot of RAM, or copy really big files, you'll have performance issues.
You may not notice this for a little while, until your array starts filling up, because some implementations (not sure about the Linux software one) optimize it so that they assume unused sectors are filled with a known value, so they don't actually read from drives where the sectors haven't been written to yet (they keep a big table in memory). This is a GREAT optimization. But over time, it will get slower and slower.
So my advice to you is to install a lot of RAM in this system, whatever the motherboard allows. At least one gigabyte, but preferably two or more.
Do yourself a favour and buy some more or less cheap hardware RAID controllers. You won't regret it. Software RAID is nothing more than "showing it's possible".
Been doing this with 5 Maxtor Firewire 250gig drives for a good while, and regular ide drives for years before that. It's always been very stable and has had no problems with drives going bad as long as you replaced them quickly. I moved to firewire though, because it was much easier to see which drive went bad out of the set, and you could hot swap them.
Generally for situations where you really need to make sure the data stays safe, I'd just stick with hardware. If you can spend that much on some harddrives, I don't see why you can't spend the money on hardware.
Though from what I hear, software RAID on Linux works decently.
I don't know much about software RAID, but one thing I do know, don't go with 3ware.
Free will is just an illusion
Take it from me, stick with a hardware raid 5, reliablity is thru the roof, and cards are now around 300-500 for one with 128 mb of ram. Ince you spent 960 dollars on the harddrives, you might as well trust their organization to something of equal quality.
my 2 cents
i guess nobody'd notice anything
unless you want to wait forever for fsck
Do not look into LASER with remaining eye!
I really really really wish to know what he's serving that'd need such amount of gigabytes.
Is there a good resource for hardware/software RAID support on linux? Tech support is always a challenge and we have a number of 3ware 8way and 12way powered by 250gb drives. We often have lots of mysterious drops on the array that require reboots or even rebuilding the array. Royal pain in the ass.
Laboratree - Scientific collaboration based on OpenSocial.
To me, a cheap 500 Mhz computer (who probably have 64-128 megs of ram, I guess) is gonna choke on 8 250 GB hardrives on Software RAID 5. Some other posters suggested buying an hardware controller, and I agree. If you host stuff for your friends, you can always charge them a little extra to compensate.
Eureka Science News - automatically updated
And are all 15,500 sites about how maxtor drives suck? I guarentee you the aren't. I've been using maxtor drives for as long as I can remember, and not one has failed. I still have a maxtor from five years ago and it's still running fine.
file:///usr/doc/raidtools-1.00.3/Software-RAID.HOW TO/Software-RAID.HOWTO.txt
I used to work at Kiva Networking and we used hardware raid 5 on some machines and software raid 1 and raid 5 on others. Maybe it was just me, but the software raid 5 disks always seemed to last longer. Never much problems with it. In fact, we had more problems getting the hardware raid controller to work with Linux or with buggyness than anything.
I have 4 IDE Maxtor 200G drives on two Promise controllers and it's really very stable. I've done this for about the last 4 years for a home network share, with very very good luck.
/dev/md0 576877984 506579124 40995112 93% /data
/proc/mdstat
:)
After setting it all up, I encourage you to attempt to pull a cord from a drive, and boot, and make sure you know how to recover. Nothing can compare to the knowledge of knowing what to do in a serious failure.
My raid5:
knitterb@machine%> cat
Personalities : [raid5]
read_ahead 1024 sectors
md0 : active raid5 hdk1[3] hdi1[2] hdg1[1] hde1[0]
586075008 blocks level 5, 32k chunk, algorithm 2 [4/4] [UUUU]
unused devices:
0.000u 0.000s 0:00.00 0.0% 0+0k 0+0io 88pf+0w
knitterb@machineb%>
Good luck!
-bk
UUuuh try googling that phrase with quotes around it genius...
:)
maxtor sucks actually gives 233 search results.. in the world
That pretty much means fuckall for your argument.
Just be carefull about what you use as your boot disk. You don't want the diskc containing /boot to be mixed in with the raid.
Moderators, mod this up!
The guy could be looking for people's experiences rather in additional to any technical documentation, which is not only smart, but the hallmark of a responsible sysadmin (where knee-jerk comments tend typically aren't).
PRESENT IT!
I have a smaller array, but it's been largely trouble free.
:(
However, when a drive did drop off line, unless things are on their own channel, it seems to knock off the entire IDE channel as well. It ended up taking the better part of a day to get everything back online again, without any data loss.
It even seems like any time there's an IDE hiccup, you can knock your array offline.
It's definitely cheaper than hardware RAID, and I haven't noticed any performance problems, but sometimes the stability of good old SCSI raid is something I miss.
I've had one Maxtor drive fail on me, and one of my friends has had at least 2 fail. I'm pretty happy though - Maxtor replaced my 80gb drive for a 250gb :)
Results 1 - 10 of about 85,800 for slashdot sucks. :-)
You get what you pay for.
Does anyone know if software raid-5 in linux uses a chunk of memory specifically for the write cache? Most hardware raid5 cards have memory for this so that the card can tell the OS everything is done being written and then flush it out of cache at its convinience. If software raid-5 actually relies on the writes to be finished, it would be drastically slower (for writes).
As an ISP building servers for our own use, we've never had problems with Linux RAID-5 but plenty of problems with recalcitrant disc interfaces that won't easily support hot-swapping and/or clean reporting of drive failures. Even 3Ware cards (until relatively recent firmware revisions) could cause system crashes before they cleanly reported a drive as failed with Linux RAID-5 sitting on top (yes, Linux software RAID-5 is much faster than the hardware RAID-5 with their 8000 series cards). So my advice is just to test a failure: try unplugging a drive from a test array while it's running and see what happens. The "plug & play" aspect might not work as advertised but you shouldn't lose any data through it (we've not).
Matthew @ Bytemark Hosting
I've been using RAID 5 with a 3 18 GB SCSI drive setup for about 6 months now, it works very fast and reliably.
The best advice I can give is to make sure each drive has its own channel if you are on standard ATA, you didn't specify SATA or regular ATA. If you're using SATA then all the drives get their own channel by design. If you have more than one IDE device on a channel in a RAID, performance will suffer because IDE can't write to both devices on the channel simultaneously.
its money the cheap raid controllers are worthless if you want blinding performance buy the good stuff read 400 or 500 bucks as for the software raid its fine it works its fairly painless but it is no substitute for a good backup. the performance difference between little 'promises' and software is nil.
While it's not Linux, I've been using Vinum with FreeBSD for about 3 years with RAID 5 and have never had any problems. My current box is an old VIA 600MHz C3 with FreeBSD 4.8 and a measly 128MB of RAM. As far as benchmarks go, my RAID seems to blow away all of the cheapy hardware cards performacewise as well.
BTW, I switched from Linux to FreeBSD for the server years ago for the stability.
If you got the money, go hardware... I have two systems that are identical with the exception that in one I broke one of the ide connectors of the 3ware controller and had to go software raid instead. I have 6 120GB disks in each, on separate channels... There is no problem with the stability and both setups survived at least 2 disk failures each.
Unfortunately the performance is another issue - I get three times the throughput on the 3ware controller. So the $300 I spent on the controller (used) was well worth it...
Peter.
Enable RAID support in kernel. And install raidtools. Then raithotadd, raidhotremove, raidstart, raidremove, cat /dev/mdstat, /etc/raidtab , 0xFD (Linux raid auto) fdisk partition type are the keywords (on Debian).
It's a poor solution for raid, since if the OS goes, there goes your raid. If you use hardware, at least it'll autodetect.
Mabye I'm wrong and the people have a good solution for it, but still. Personally, if it's a 500mhz box, I'm guessing you're going to be using ATA133 PCI cards along with it, and frankly, raiding those won't net you much more speed. SCSI is what gets you the speed, but as it is you're looking at probably a max of 50 or 60MBps output.
I'd just stick a 100mbps card on it, hook up all 8 drives via 2 IDE ATA133 PCI (2 controllers a card) cards, with the OS installed on a raided partition spread across 4 of the disks, and backed up onto 4 other drives. Setup a cheap batch script that backs up all the files onto a second set of disks when the machine isn't being used, or use a backup program, as well as scanning for data errors/loss every week or so. It works if all it's doing is serving files. Additionally, if you set the "primary" drive as master, and the "backup" drive as slave, and you only use the primary drives for serving data, you'll have no problem.
Really, I'd think Raid Lv5 for 8 drives would be a bit excessive and/or inefficient, considering the PCI bus only gives so much bandwidth. Now, if we were talkin SCSI raid with 64 bit, 66mhz PCI, then your solution would be a good one.
Candy-Coated Knowledge
Software raid is fine for simple configurations, but if you want to "do it right" - especially considering that you just dropped about a kilobuck on HDDs, go Hardware. A good, reasonably priced true hardware RAID controller that will fit the bill for you is the 3Ware Escalade 7506-8. It has 8 IDE ports, 1 for each drive - you don't want to run two RAID drives in master/slave mode off of a single IDE port; it will play hell with your I/O performance. It's true hardware raid, so you don't have to worry about big CPU overhead and being able to boot with a failed drive (a major disadvantage to software RAID if your boot partition is on a RAID volume, certain RAID-1 configurations excepted). You can buy them for under $450. provantage.com price is $423.48 (I have no relationship with them other than I've noticed that their prices tend to be decent).
Help save the critically endangered Blue Iguana
The cheap raid controllers are almost always software raid and not worth it. If performance is critical some of the higher end SATA and SCSI raid stuff is worth it, but a lot of that sucks too so do benches, take recommendations and don't believe in brand names...
Except for the early 7000 series they are good cards and have decent performance too. I'm very very happy with the 3ware I have even though its one of the quite early designs.
If all it does is serve files, it should do fine. The 500Mhz is not going to be a factor at all, in fact, the CPU will be idle most of the time. The real thing to optimize in a file server is the ATA bus speed and hard drive latency.
This is a VERY big issue. We've found that Promise Technology RAID controllers have problems, and the company doesn't give tech. support when the problems are difficult, in our experience.
--
Government data compares Democrat and Republican economics.
Don't hang a pair of drives off each controller. Get a truckload of PCI ATA cards or a card with multiple controllers. Don't slave a drive. (No, I do NOT know what the correct PC term is for this).
Also, give 'mdadm' a whirl - a little nicer to use than the legacy raidtools-1.x (Neil's stuff really rocks!)
Software RAID5 has been working extrememly well for us, but it is NOT a replacement for a real backup strategy.
one better than mcleodeight
Declare at least one hot spare. I would declare two for your setup but YMMV.
/dev/hdh1
nr-spare-disks 1
device
spare-disk 0
The GPL, for those that truely understand.
There are a few things that really help in some cases, but RAM isn't always one of them.
If you've got a lot of data that is read/re-read or written/re-read by clients then RAM really helps, streaming stuff which doesn't get many repeat accesses (eg running a movie editing suite) it might not help at all
For performance its often worth sacrificing a bit of space and going RAID 1. Again depends if you need the space first or performance first.
Obviously don't put two drives of a raid set on the same IDE controller as master/slave or it'll suck. Also if you can find a mainboard with multiple PCI busses that helps.
Finally be aware that if you put more than a couple of add on IDE controllers on the same PCI bus it'll suck - thats one of the big problems with software raid 5 versus hardware which is less of a problem with raid 1 - you are doing a lot of repeated PCI bus copies and that hurts the speed of drives today.
I use raid1 everywhere, disks may be cheap but you have to treat them as unreliable nowdays.
IDE interfaces, and some SATA interfaces, are not designed to be hotplugged. There are special electrical circuits on hot pluggable scsi drives.
Once you yank the plug on an IDE, you *must* power down the system before plugging it back in. Sometimes yanking the plug hangs the kernel.
Power down the system, pull a drive, and then start it up. It should detect the missing drive on bootup. Alternately, follow the instruction on the LINUX RAID HOWTO. You have read that, haven't you?
What will you connect eight drives to? Four PCI ATA controllers? I have eight 200GB drives on my data server using a 3Ware RAID controller, and it has worked wonderfully for 18+ months. I have had a drive fail (due to insufficient cooling), and the system didn't even hiccup. I have a software RAID system at a client's location. Whenever there is a power failure, the system comes back up nicely. However, because of the abnormal shutdown, the software RAID tries to recover one of the disks. This absolutely eats the processor for 16 hours. 98-100% utilization. Fiddling the /proc parameters is no help. I think this is a bug--what could it be doing for 16 hours?
I built a fileserver for work on the cheap, it's been up for about a month now without any problems.
You have two choices with software RAID under linux, raidtools and mdadm.
Raidtools is a bunch of tools for setting up, looking after etc a software RAID under linux and mdadm is essentially the replacement to Raidtools, everything is built into the single mdadm program.
I personally find Raidtools to be easier to use at the command line, however mdadm is the future. Also of note, if you want to set it up easilly without the hassle just use Webmin, its RAID setup is a breeze.
If you are concerned with reliability, don't store everything in one device that can get taken out by fire/electricity/anything. Parity also isn't very reliable, I had two drives go bad in my RAID 5 and I was screwed. Also, Maxtor drives arent reliable, not like SCSI drives.
And as far as IDE drives, Seagate makes 200GB drives with 8mb cache, 5 year warranties, and they were at Frys last week for 50 bucks.. (rebate)
I have a very similar setup, but I'm currently only using three hard drives. I'm running Mandrake 10 on an Athlon XP 2000 with three Western Digital 250GB drives. That gives me 500GB of usable space, which I'll probably upgrade to ~1TB (5 drives) in January. So far I've had no problems. I have a UPS, but I've pulled the plug several times for testing purposes with no ill effects (I tested the setup for several weeks before putting real data on it). I think a big reason this setup works for me is that the server is never under much stress (serving 3-4 household PCs), and it's only used as a file server. I use computers for everything. Work projects, personal projects, audio/video editing, etc. I never delete anything and would be devastated by a data significant data loss. So I use RAID5 with monthly backups (unfortunately backups are still important), and all important data is saved on the storage server. I'd recommend against sticking 8 drives in a box. If you're set on using 8, you might want to consider putting a few in external enclosures. Make sure you keep cool air moving across them to avoid shortening the lifespan of your drives. Currently, I'm only using about 250GB on my 500GB server, with most of the space being consumed by data from my audio/video projects. Unless you're actually going to use 1750GB of space, I suggest using five drives or so in the server while using the remaining three for backups. Also as was mentioned in a previous post, your system may not be beefy enough to handle an 8 drive RAID5 array. Let us know what you end up doing.
As other posters have mentioned, software raid is fine for RAID 0, 1, 0+1. As you get to RAID 3,RAID 5, and RAID 6, however, your processing requirements go up quite a bit.
:)
A SATA RAID 5 card with hardware XOR engine and a DIMM slot for cache might be a cost-effective option for you. (Goes for ~$180 on Pricewatch, or ~$240 on Dealtime)
Oh, and I would have goine with HGST, Western Digital, or Seagate for your drives... but I suppose hardware failure is what RAID 5 is for
You will get responses from people with good and bad experiences, but they are all jaded by their small particular case. After seeing what can happen with dozens of machines (8 drive and 4 drive) running Linux software RAID5, here is some concrete advice.
/dev/hda1, Linux software RAID5 will kick /dev/hda1 out of the array. Now, it's likely that sector 11 might be bad on /dev/hdc. If you hadn't divided up the partitions, you would lose a second disk out of the array during a rebuild.
First, ensure that all of the drives are IDE masters. Don't double up slaves and masters.
Secondly, DON'T create gigantic partitions on each oft he 250's and then RAID them together, you will get bitten, and bitten hard.
Here's the skinny...
1) Ensure that your motherboard/IDE controllers will return SMART status information. Make sure you install the smartmon tools, configure them to run weekly self tests, and ensure you have smartd running so that you get alerted to potentially failing drives ahead of time.
2) Partition your 250GB drives into 40 GB partitions. Then use RAID5 to pull together the partitions across the drives. If you want a giant volume, create a Linear RAID group of all of the RAID5 groups you created and create the filesystem on top of that.
Here's why, this is the juice.
To keep it simple, let's say there are 20 secotrs per drive. When a drive gets an uncorrectable error on a sector, it will be kicked out of the array. By partitioning the drive into 5 or 6 partitions, let's say hd(a,c,e,g,i,k,l)1 are in one of the RAID5 groups, which contain sectors 1-4 (out of the fake 20 we made up earlier)
If sector 2 goes bad on
By partitioning the disks you localize the failures a little, thus creating a more likely recovery scenario.
You wind up with a few RAID5 sets that are more resilient to multiple drive failures.
If you are using a hot spare, your rebuild time will also be less, at least for the RAID5 set that failed.
I hope this makes sense.
My advice to you is to bite the bullet and simply mirror the disks. That way, no matter how badly they fail you'll have some chance of getting some of the data off.
After some initial hicups with the system in Mac OS 10.2, the new 10.3 seems to have a usable software RAID solution. It supports just about any method of connecting the drive to the computer (short of network) and supports most any kind of storage device. It doesn't support RAID5 yet though, just stripe and mirror. I've got four mirrored volumes up on my server, and have had few problems with them. Rebuilding must be done with the volume offline. It's not a perfect solution yet, but it's a nice free alternative for your OS X systems.
I've also tried CharismacRAID, and omg... STAY AWAY from this. After the array crashed for the third time for no apparent reason, I was experimenting with the software to test its reliability when it proceeded to try to LOW LEVEL REFORMAT my BOOT DRIVE. (yes, while I was booted up on it!) It actually managed to zero the partition table and boot blocks before asking the OS to lay down a new partition, at which point the OS thankfully gave it the bird. Kudos to Disk Warrior for being able to salvage the volume, and good riddance to CharismacRAID. (aka "AnubisRAID" fyi)
I work for the Department of Redundancy Department.
The first mistake is Maxtor drives. Worst drives i've seen, and I am talking present time.
Yes you have five, but do you feel like replacing quite a few of them over a few years?
I run software raid1 here at home, on a 2.6 kernel, and I can say that is solid. It appears software raid in general in linux is quite solid.
-- Note: If you don't agree with me, don't bother replying. I won't read it.
Maxtor may not be the absolute best built drive ever, or even ev4r!, but they do have a no quibble warranty. Its nice, don't like the way the drive looks at you in the morning, call 'em up and they'll replace it right then and there. Hear a squeak, call, replaced. ATTO showing wierd numbers, call, replace. (I actually did with 2 drives, the read speed was down compared to 2 other matching models, Maxtor didn't question it and replaced the drives.)
Drives from just about any vendor can suck. I know people who had 1000 IBM 75GXP drives (hey, their previous models were ok!) and had to swap a drive a day due to errors (not total failures tho, just early signs of it). Although many people seem to recommend "identical drives" for raid clusters for performance reasons or whatever, mixing vendors or at least production batches does the benefit of a single vendor fuckup resulting in data loss due to all of your drives having similar early deaths.
:-)
As for controllers, lots of big installations use 3ware cards. A bit more expensive than the basic ide/sata adapters, but you get lots of ports in one pci (preferably something better than 32-bit/33MHz) slot, and each drive gets their own ide bus. Now, even if the things have hardware raid5, you might be better off using plain old software raid with them. Depending on the card model it can easily be twice as fast. Embedded CPU's aren't that fast compared to a p4 or a64
This doesn't apply to you much, but to me nothing beats ServRAID on an IBM. RAID 5 is ultra quick and I've had a few drives bite the dust(luckily never simultaneously or we'd go to tape.)
I just popped in a new one, watched the sync light blink for a while, never went offline for a second.
Good SCSI hardware RAID is the best choice. If you can't afford that (cost of a decent used car in many cases.) IBM x345 series with 2 logical drives(2 mirrored and 4 RAID 5 drives.) You can't beat it for the money.
Adaptec Software RAID on a PC server spiraled into oblivion on us once, thank god for good&strict backup strategy. It's idea of rebuild was to remove reference to files. Part of the blame should be on the tech that did it(not me) but overall it just handed him the knife and he twisted it well.
You said 8 drives? Maybe I am missing something.
You say a 500 MHz machine. That is probably a P3, and hence would not have SATA. You did not say SCSI either. If you are trying to connect 8 drives to a standard PC you will run out of IDE ports. Most PCs come with only 2 ports, i.e. maximum of 4 drives.
So, how are you going to connect them?
2bits.com, Inc: Drupal, WordPress, and LAMP performance tuning.
Is this the definitive article about software RAID under Linux?
Software-RAID HOWTO. In English and HTML: Software-RAID HOWTO.
--
Bush borrows money to kill Iraqis. 140 billion borrowed. With interest, you pay 200 billion. When Saudis attack, invade Iraq?
Check out the project I did over two years ago to provide my home with Network Attached Storage: http://www.mini-itx.com/projects/tuxserver/
This is an awesome little machine that has been serving files to my home network for over two years with nary a reboot. Fast, stable, and zero problems with the software RAID5. I did have one drive go out about a year ago; popped in the replacement and the array automatically rebuilt itself.
One recommendation I'd make is use a journaled file system! I use ReiserFS and it is excellent for use in a software RAID.
If "disco" means "I learn" in Latin, does "discothèque" mean "I learn technology"?
Invest in a UPS for this system. Any uncontrolled shutdown (i.e. power outage) will take quite a long time to fully recover from. It will take a lo-o-o-ong time for the resync to finish on an 8x250GB raidset. Then you really ought to force an fsck as well on the filesystems you've created on that monster.
CUR ALLOC 20195.....5804M
Two pieces of advice: (1) Look into mdadm, it saved my array once when I had to move it from one server to another, (2) look into smartd as a way to monitor the individual disks and detect failures. Okay, well then, _three_ pieces of advice. (3) make sure you look into ext2/3 filesystem parameters like the size of the journal (max it out) and the -R stride= option.
/proc/mdstat regularly).
mdadm will allow a "spare pool" shared between multiple RAID devices and smartd will check the state of the disk controllers at regular intervals. You should put the system _and_ the disks on UPS to avoid losing data in the event of a power failure (the disks need to write their cache to the physical media before it evaporates). Set up something (mdadm or smartd) to email you in the event of a disk failure, or you may be running in degraded mode for quite a while before you discover it (unless you look at
All in all it seems to work fairly well if you spread the disks across multiple channels, if you have enough RAM for page (buffer) cache, and if you get reliable disks. I have a 4-disk SCSI storage box that I have in RAID 5 mode. It has been running for over two years. The server failed and I had to move it, that is when I discovered mdadm -- A LIFE (DATA) SAVER!
Ahh, a comment with good insight. I never thought of it this way, but I'll definitely consider doing this in the future.
I was always stymied about not being able to partition a md software RAID, I didn't think about it from your angle, that it's not what you'd want anyway!
I've had enough abrasive sigs. Kittens are cute and fuzzy.
I did a quick scan of the post and didn't see anything about mixing your software and hardware RAID.
Alot of people will tell you to go with hardware as you have seen in this post, and some say stay with software. Basicly i would go with a mix this provides the best solution you can write across multiple drives and provide fool proof backup giving you the best of both worlds.
Apple is now using this in their XServe RAID http://www.apple.com/xserve/raid/.
If you do go with something along these lines i would definatly upgrade your CPU to at least 1 Ghz and 512 if not a 1GB of ram. Doing this would make a nice fileserver and you could even host a web/ftp server if you wanted access to your files off site.
- MOSKIE
I have run software raid on Linux and FreeBSD just in testing. They seem to work without hiccup and they're stable, although I had no extensive testing. As far as hardware or software, I'd suggest hardware if you need hot-swappability and speed. It's a waste of money if speed is not an option as software raid is just little less secure; I can only see it losing data in the event of the kernel going wrong in a very unusual way or more likely the kernel crashing in the middle of a write. Increasing the ram would definetely take a lot of stress off the kernel and increase speed, but then again, I haven't seen many situations where stored files need to be quickly accessed; I can only think of low compressed, hi-quality movies. As far as swapping drives, if you set up linux properly, the drive will reconstruct correctly (given only 1 dies). If linux dies and you have to redo the OS, the configuration is stored in each disk (partition more properly) that is in the raid so none is lost except time. One of the advantages of software raid is its flexibility, it's partition based instead of disk based. It doesnt seem like much of an advantage (and it isnt). Just make sure you don't make two partitions on the same disk part of the same raid array. My best piece of advice is: make sure every drive gets its own IDE controller. A drive can slow another one down on standard ATA. Also, a drive going wrong could kill the rest of the drives on its channel.
As someone who built and installed ~400 systems with about 50 TB of storage capacity and ALL on Linux SW RAID5 I can only recommend it. I have bad experiences with HW RAID - when 2 or more disks fails, you can't get your data. Linux SW RAID is easy (OK, not SO easy) to be convinced to recover most of your data except the really bad ones. Also performance is really superb (with P4/Xeon/Opteron CPUs it's much higher then any HW IDE RAID can do).
That I put a RAID5 controller into. It works great. Spend the extra $$$ on a hardware controller. It's well worth it, especially when one of the drives decides to die.......
It's either on the beat or off the beat, it's that easy.
I moderate therefore I rule!
--
Just for the record, english speaking countries != the world. As for my personal experience, my oldest 40G maxtor still ticks away nicely after years of +10h daily use. I have managed to blow a few seagates and western digitals though, even before their warranty had expired. Samsung's 7200rpm models seem reliable aswell.
First the setup: it is a Pentium 233 MMX (P1, not P2) with 64 MB of ram. It was first setup with Slack 9.1 a year ago. I did a clean install when Slack 10 came out and all Slack kernels have software RAID enabled by default, so it was recognised automatically. The two drives are quite different: one Maxtor 7200 rpm drive and a WD 5400 rpm drive that have ~ 1 GB difference in size. This computer does not even have a monitor connected to it.
Now the recommendations:
-Read ALL How-To's related to RAID, you can all get them at http://www.linuxdoc.org/ and either print them or have them quickly available on another computer.
-Be sure you have raidtools installed, it's a standard slack package.
-All partitions have to be the exact same size and of the "Linux raid autodetect" type. The software RAID on Linux is partition based, not disk based, which makes it more flexible.
-All drives have to be Master on an IDE channel, no slave drives (or else it will very slow), so 8 drives = 8 IDE channels = 3 additional controllers (or 2 if you have an onboard RAID controller). At this price, it could be interresting to get a 3ware hardware based raid card.
-NEVER, EVER run a hardware RAID array on cheap Promise RAID controllers (but software RAID on regular IDE Promise controllers, OK).
As for drive failure: once, when moving my server, a power cable got unplugged from the master drive on the first IDE port, the server booted without any problem from the second drive which is master on the secondary IDE port. The CDROM drive which is slave on the first IDE port was even detected correctly. I noticed it when I did the lsraid command. I then shutdown the server, plugged the cable back and did the raidhotadd command to rebuild the drive, a little less than an hour later, everything was ok.
It's pretty much what I can think of now...
You're all barking up the wrong tree. A high-speed RAID isn't going to be much good as a file server, the bottleneck is in the networking. Are you going to use gigabit fiber to connect to the server?
don't = do not = two words.
Given the cheap cost of disk these days, RAID 0+1 / RAID 10 is something you really ought to at least consider.
-p.
You must support the platform with the best power supply you can afford. I can't stress how important this is. You don't have to take my word for it, but do the research and think about it logically. Whatever you decide, that is the most important. If you don't want to see errors accross all of the drives, get the stable PSU.
You may not need much CPU performance for file service.. after all, it's mainly just doing DMA to/from disks. But, I assume it's just your standard PC motherboard, with a single 32bit 33MHz PCI bus.
If you're spending $960 for the disks at Fry's, why not spend another $80 to $250 at that same Fry's and get a current generation motherboard and CPU (they have package deals that are dirt cheap).
For $80, you can get a 5x faster processor, and a much newer chipset with ATA133 and Serial ATA.
For $250, you can get a board with multiple PCI busses, PCI-X and a chipset capable of handling much more throughput than a cheap PC motherboard.
The I/O bandwidth will be your bottleneck with an 8 drive RAID array. The standard 32bit / 33MHz PCI bus only does about 1Gbps. Serving a gigabit ethernet connection will use all your bandwidth by itself.. when you have 8 ATA drives fighting the NIC for bandwidth, you can see a clear problem.
If you're spending that much for the drives, don't hamstring it by skimping on the motherboard. And, in any case, once you have a Linux box installed, you inevitably start using it for many tasks (caching proxy, mail server, ftp server, dns server, www server, etc). So, a beefier system will stand up better.
Hi,
:
The scenario you've mentioned is probably OK to use a software RAID. I use it in a production enviroment without problem with a higher stress that your setup will probably have.
I'd suggest you to consider the following items
a) cooling system - those HD can generate a lot of heat. Buy a full tower case and add those HD coolers to make sure your HDs stay cool
b) Buy the HDs from different brands and stores - RAID5 (either hardware or software) can recover from one drive. If you buy all from the same brand/store chances are that you end up with 2+ drives with the same defective hardware
c) cpu - if you are going to use this number of drives the processor will be a majo bottleneck. Do not forget that RAID5 XOR your data to calculate the parity.
d) partition scheme - use smaller partitions and group them together using LVM. This you help you to recover from a smaller problem without taking a lot of time to reebuild the array
Ok, network could be a bottleneck, if the disk IO gets high enough. I think, though, if this is a 500Mhz system, it is likely to need more attention on the PCI/ATA bus than on the network.
:)
Both network and IO are to be worried about before CPU.
The Promise controllers are SHRAID, which is my own non-standard acronym for Software w/ Hardware-assist RAID or SHitty RAID in less polite company. And the "promise" of true redundancy is a charade (rim-shot, please). Basically, you have all of the disadvantages of software RAID - the need to manually configure bootability of both drives (assuming you're running RAID 1 or RAID 0+1 - if you're running RAID5 or JBOD it's an even bigger pain), plus the need to have specialized drivers on the OS, etc. These controllers (Promise, Highpoint, etc.) should be avoided like the plague for technical reasons alone.
Good, relatively inexpensive IDE and SATA RAID can be had with 3Ware Controllers. 2-drive models start around $140, and they support up to 12 drives on their more expensive controllers. The drives appear as a single physical device to the O/S, whether it's Windoze, Linux, BSD, DOS 3.1, etc.
Help save the critically endangered Blue Iguana
Of course for several disks or Raid 5 your better with off with hardware. But for Raid 1 aka mirroring there is nothing wrong with software and I've been using it for many years at home and at small clients with no problems to speak of.
"It's a poor solution for raid, since if the OS goes, there goes your raid"
That's only a problem if you don't back up your data though. I agree use hardware whenever its possible but in a pinch software works great.
If you wanna get rich, you know that payback is a bitch
What are you doing for backup? Assuming that these are important files that you wish to protect I suspect you also need to protect against user error which is just as likely (if not more so) than hardware error. For me, availability is less important than recoverability, so I switched from using software raid (albeit raid 1) to using primary and secondary disk devices that are 'backed-up' using rsync. I do not bother using compressed backup archives as the majority of my data are media files which are compressed anyway.
The short and sweet of it is that on event of a rebuild, if a single drive serves up a corrupted block, the rebuilt data will be corrupt and with no way of affirming that. Google for ACNC's website, as well as BAARF. The original BAARF site seems to be down.
Disk is cheap, as are controllers.
Here's the BAARF Site Cached on Google. The real site seems to be down. http://64.233.161.104/search?q=cache:8HJz0cFQHgoJ: www.miracleas.dk/BAARF/BAARF2.html+baarf&hl=en&cli ent=firefox-a
Here's an excellent
duscussion of RAID 5 vs RAID 10
by Art Kagel.
I would definitely warn against RAID 5, even hardware RAID 5, unless you're doing 95% or more reads. The performance hit is horrible, even worse for software raid, and why? To save disks? You already have 8! Build a 8-disk RAID10 (or 6 disk with two hotspares) and be done with it. You'll never use all that storage anyway. Performance will be phenomenally better for all sorts of applications that can use the storage. If you're going to go with a card like Promise, be sure Linux includes the driver in the kernel. I had a lot of trouble with a Promise card because the driver was only available on the Promise site for certain versions of Redhat, so I was stuck and couldn't upgrade (or was afraid to). That can be a real limiting factor.
Here's the BAARF Site Cached on Google. The
real site seems to be down.
http://64.233.161.104/search?q=cache:8HJz0cFQHgoJ: www.miracleas.dk/BAARF/BAARF2.html+baarf&hl=en&cli ent=firefox-a
Here's an excellent discussion of RAID 5 vs RAID 10 by Art Kagel:
http://64.233.161.104/search?q=cache:oat67e4ciCMJ: www.miracleas.dk/BAARF/RAID5_versus_RAID10.txt
I've recently made a server for archiving medical images using Redhat 9 with 5 SCSI drives in RAID 5. Works great at a fraction of the price of a vendor solution (ie, $30,000 vs $1,500.) In this case, the vendor was using a Windows NT box yet. Performance suffered big time. The Linux box I use is a 2.4 GHz Celeron with 1GB RAM. The bottleneck is always in the network interface (100 Mbs) so the Celeron is more than adequate. It's been up almost 1 year already with no reboots.
> I am concerned with reliability. How stable is the current RAID 5 support in Linux? How hard is it to rebuild an array? How well does the hot spare work? Will it rebuild using the spare automatically if it detects a drive has failed?
Poof...
I find your lack of faith disturbing... Poof...
Sorry about the bad formatting above. I thought I had it straight. First posting to Slashdot, I should have used the preview button, arg...
To answer your actual question, whether or not the linux kernel's software RAID implementation is safe... "yes". I used it in production for NFS fileservers as far back as the 2.2 series; it performed wonderfully under high load then and has worked just as well when I've used it off and on since, both in production and on test systems. There are lots of suggestions elsewhere in the thread about things to avoid - multiple devices on the same IDE channel is the big gotcha: don't do it, its performance is particularly horrific during array reconstruction, just when you need it to run as fast as it possibly can. Keep those suggestions in mind when you build the system, but you can categorize the RAID implementation itself as more than sufficiently reliable.
Ideology breeds Hypocrisy. Just how much is up to you.
I've been running a software RAID-1 setup for years, on a 2.2 kernel (still haven't bothered to upgrade the kernel). It's been generally stable and fast. The one time I got into trouble was when I tried to compile in journaling filesystem support, which at the time wasn't compatible. As with most things in the kernel, the issues are well known, and as long as you read up on them before you'll do fine.
I do remember it being a bitch to set up though, especially so I could boot off either drive (a requirement I had for quick recovery from primary disk failure). Maybe the process has gotten easier, I haven't read up on it.
This is slightly off-topic because it won't take care of the particular solution being sought, but another interesting way to do RAID-1 is using the controllers from Arco Data Protection. The have some that are physically connected between your IDE or SATA controller and the two drives to be mirrored - they just seamlessly mimic a single IDE device. This makes it possible to RAID-1 any IDE or SATA drive under any operating system or device. I've used them in places like phone systems and voice mail systems that have no provisioning whatsoever for RAID. It can take a little bit of case tweaking, and you have to be sure the power supply can handle it, but it's an interesting solution in certain situations where nothing else can do the job.
Help save the critically endangered Blue Iguana
Use MDADM for building and maintaining the RAID, it is far superior to other tools for this that I have used. It will make life easier.
Second if you have a few spare buck get a 3Ware card and go hardware raid (its much faster and worth it).
-Lord Shadow
I manage a lot of servers remotely. I started out using the hardware RAID support on my server's mobos. But there were issues with that.
First, it was hard getting Linux driver support (I think drivers were available, but it was a matter of downloading them. And I don't beleive they worked on the 2.6 kernel's I used).
Then the RAID setup required BIOS settings. When you only have remote access to a server (and no KVM-o-IP) that means you need to work through a tech at the DC. Not, umm, ideal.
And finally, there was the issue of 'what if I need to move these disks to a different server'. One that doesn't have the same raid controller. Well, it wouldn't work.
Anyway, I ended up using software raid. I've used it now on a few dozen servers. And I'm really happy with it. Performance seems fine, albeit I'm not using it in really IO critical environments like a dedicated database server. In in 99% of cases I'd now use software raid in preference to hardware raid.
What follows are a few tips I'd like to pass along that may be a help with getting a software raid setup...
If you get the chance setup RAID on / and /boot via your OS installer (on a new system). Doing it afterwards is a real pain.
Build RAID support and RAID1,and RAID5 into the kernel (not as modules). You'll need that if you boot from a raid1 boot partition. Note: if you are using RAID5 you'll need RAID1 built in (since I beleive in the event of a failed disk the raid personaility swaps from RAID5 to RAID1).
With a 2.6 kernel build I've been getting "no raid1 module" errors at the make install phase when building with a RAID-ed / or /boot. The 'fix' is to compile the RAID support you need into the kernel (not as modules) then run: /sbin/mkinitrd -f /boot/initrd-2.6.8.1.img 2.6.8.1 --omit-raid-modules (substituting your kernel image name/version).
Every now and then I've had the kernel spit a drive out a raid array. I've found that sometimes the kernel may be being overly cautious. You can often raidhotremove then raidhotadd it back again. And you may never see a problem again. If you do, it probably really is time to replace the disk.
Rebuilding a RAID array goes smoothly. It happens in the background when the Linux machine is in multi user mode. The md code rebuild guarantees a minimum rebuild rate. From memory it takes about an hour or two to do a 200GB RAID1 array.
You can see the RAID rebuild status in /proc/mdstat. I run a very simple script to check the RAID status each day and send out an email if it is broken.
If you are using a RAID-ed /boot, grab the latest lilo since IIRC it has better RAID support than what is in the distros I use.
Hard drive-wise I've been happy with Seagate Barracudas. I've had to replace a few failed Western Digital drives. (Just my recommendation from experience, it could just have been good/bad luck on my part).
One neat trick with Software raid is that your drives don't have to be the same size. You do RAID on partitions. And your raid array sizes itself according to the smallest common denominator in the array.
Tip: always create a bit of spare space on any device you are RAID-ing. e.g. a 4GB swap partition. Then if you have a drive fail and it needs to be replaced, and your replacement varies in size slightly you'll still be able to use it. Not all 40/120/200GB drives are created with equal sizes :).
In summary: Software RAID=good. Decent performance. I've had no real kernel bugs with it. No need for BIOS access. Easy to move drives between servers. Easy to monitor failures. Non-intrusive/minimal downtime when recovering a failed devi
Comment removed based on user account deletion
Overall, I'm very happy with it -- no more rebuilding from scratch every time a boot disk blows!! :) I'd started converting to SCSI boot disks everywhere, but a pair of software RAID2 IDE drives gives me a much better sense of security. My workstation did in fact blow a boot drive a month ago, and rather than being an emergency, I just ambled into Fry's after a week or two and bought a replacement and rebuilt the raid. No muss, no fuss. Feels like living in the third millenium!
I did learn various things the hard way that the HOWTOs don't warn of.
Note that you can't boot off RAID5, only RAID2. The hack they mention of putting /boot on RAID2 and everything else on RAID5 is not worth it with today's drive sizes. Give yourself a 2-16GB RAID2 with a complete bootable system on it, and save yourself mucho grief at very little proportionate cost in disk space.
As of kernel 2.4x, at least, the linux software RAID5 autorecovery is workable but less robust than one might like in the face of serious problems: I had one RAID5 setup totally destroyed because the hardware was flaky leading to constant reboots while RAID5 reconstruction was just underway. After awhile the kernel got confused about the order of the disks (which shouldn't matter, but apparently did) and the whole thing went into a Death Spiral. Lesson: If you're sure the problem is just one flaky disk, feel free to just swap in another and reboot. But if you are in any doubt, play it safe: Switch off RAID autodetect first thing (by fdisk'ing the partition type from FD back to 82. Get the hardware stable, rebuild the RAID by hand, then switch everything back to FD.
RAID5 is a comparative pain in the ass to work with vs RAID2, because under RAID2 any of the partitions can be mounted normally as a non-RAID drive in an emergency, getting you back on the air fast, but not so with RAID5. (You'll want a live Linux CD with a RAID-supporting kernel, likely. Knoppix &tc don't yet ship this way.) So only use RAID5 if the extra space really matters -- the big servers.
BTW: One of the reasons I like software RAID over hardware: If you have hardware RAID and the controller blows and you can't find a matching model, you may be stuck reverse-engineering their RAID scheme to recover your data. No worry about that under software RAID.)
I tested automatic failover to hot spare disks under the kernel, and it worked perfectly for me in a handful of tests. For whatever that's worth.
Do keep an eye on /proc/mdstats readout of your RAID system health. If you're asleep at the wheel and don't notice anything until enough disks fail to bring the whole system down, you haven't gained much. I have a crontab-driven set of Perl scripts which check all sorts of things weekly to minutely and email me if they look wrong: Checking for failed RAID drives is one of the things they do. If you don't have a comprehensive solution like that, the raidtools2 package has an ad-hoc solution specifically to email you on drive failure. USE IT.
FWIW, here's the system I've evolved for partitioning disks in such systems:
I use linux software raid5 on seven 200G disks with LVM on top, and have had good results. It's usually going to be much more flexible than hardware raid. If I run out ide buses, I can use firewire, or scsi, or sata or whatever I want. You can also use different sizes of disks (within some limits). With hardware raid, you're stuck with the number and type of ports on that raid card, and that's it.
/dev/md partitions, then concatenate them together with LVM into one large partition. When I go to add disks, this allows me to pull one md partition out (if I resize the fs down far enough), and expand that md onto another disk, then add it back into the volume. Raidreconf still doesn't sound reliable enough, so I avoid that for resizing
I make lots of smaller raid5
If you do go wtih hardware raid, make *sure* you can do a resize of the raid without losing your data. A lot of cheap raid controllers don't allow this - you have to wipe out all your data in order to add another disk to your raid, which is usually impractical. And you have to assume you're going to expand it.
Also, make sure to turn off write caching on your drives. It's much slower, but write caching is dangerous, especially in raid configurations.
I have build at least two dozen software RAID5 boxes over the past few years. Usually Promise controllers, Maxtor drives. Performance is generally pretty good. Here are bonnie numbers for my 1.2 TB media server (five Maxtor 300 GB drives in Software RAID5). These numbers are a little slower then other systems because it uses an Athlon motherboard. I have found that Intel chipset boards generally give read performance ~100-140 MB/sec.
[root@media root]# more bonnie20.log
Bonnie 1.2: File '/raid/Bonnie.27772', size: 2097152000, volumes: 10
Writing with putc()... done: 14517 kB/s 83.2 %CPU
Rewriting... done: 25060 kB/s 17.1 %CPU
Writing intelligently... done: 41987 kB/s 29.5 %CPU
Reading with getc()... done: 18830 kB/s 96.1 %CPU
Reading intelligently... done: 82754 kB/s 62.2 %CPU
Using an older processor/motherboard is probably not a huge concern. I've used 300 MHz Celerons before. Of course, your performance might not be as high as this, but if you are using this as network attached storage (NFS or SMB), you will likely be limited to 12 MB/sec due to fast ethernet. If you have (and need) gigabit transfer speeds, you should probably use a better motherboard/CPU.
Lastly, remember that you shouldn't skimp on power supplies and an UPS that automatically shuts the system down. The *only* data loss I have ever had on raid5 arrays came because of power-related issues. Heed my warning! 8)
Your informative reply makes perfect sense now that you explain it. Thanks for taking the time to explain, it's much appreciated.
"I am trying to build a large home drive array on the cheap. I have 8 Maxtor 250G Hard Drives that I got at Fry's Electronics for $120 apiece. I have an old 500Mhz machine that I can re-purpose to sit in the corner and serve files."
/dev/hda-/dev/hdd instead of /dev/hdm-/dev/hdo.
/mnt/data1.
I just setup a very similar system on an Asus A7N8XE Deluxe nForce 2 motherboard. I have 6 200GB PATA IDE hard disks, 2 on the mainboard IDE, and 2 each on Promise Ultra133TX2 IDE cards, 1GB RAM, and a Duron 1800MHz CPU.
The board rocks. Onboard USB2, Firewire, SATA, PATA, Gigabit Ethernet + 100MB Ethernet, and dual banked DDR RAM for extra speed. It runs just fine with a stock kernel and no binary drivers.
Software RAID is fine for personal systems (which mine is). I'd use an Escalade or similar card for a business system. It simply wasn't in the home budget which is prioritized for the wife, 2 year old and 3 month old instead of leet rigs.
Unfortunately I have no idea how hard software RAID is to setup on a Slackware type box. I switched over to Red Hat in the mid 90's when other things were drawing more of my time and interest than maintaining packages. Fedora Core 2 has a point and click RAID creation facility during installation but even as a GUI tool it's real drudge work to setup (unless you just make 1 giant partition)
A few lessons I learned:
*** RUN BADBLOCKS ON YOUR DISKS BEFORE USING ***
I skipped doing this and lost a few hundred gigs of replaceable data that nevertheless i'm not looking forward to replacing. I know backup backup backup. Easier said than done at those volumes. You need to run badblocks in one of the write modes because IDE hard disks will not remap bad sectors unless they're written to first.
Let it run overnight. Before running badblocks one of my drives kept eating my data, and it would not pass a SMART test. I was ready to RMA it before I stumbled on the fix. After running badblocks on all drives once all night long I've been rock steady. I now run SMART tests periodically and use smartd.
Between 2.6.5 (Fedora Core 2 install kernel) and 2.6.8-1 Linux changed the order that the drive devices are enumerated, which caused weird boot problems until I figured out that it was trying to boot drives off my SATA controller that I don't have when it suddenly made the SATA
I chose to use REISERFS. The people at namesys are great, and I don't have to worry about having 964GB of space and no inodes left.
I initially had 4 drives on my Promise card. I was less concerned about speed and more about space since this is a personal server. I had tons of interrupt errors and it turns out the Promise 133TX2 cards can't really handle 4 DMA100 drives, breaking the drives up to multiple cards made a big difference.
Incidentally - I'm running about 3GB of SWAP (I currently have 1GB of RAM - but I saw no performance difference when it had 256MB), with a 4GB root partition, and the rest is under
Heat is another HUGE problem when we have this many drives. In my initial setup I figured just having fans was enough. When my internal case temperature hit 160+ degrees I reconsidered. I now run the case open with a fan blowing across it.
- Dave
http://www.bullnet.com
I've not tried s/w RAID-5 under Linux, as, among other things, a Solaris DSO course I went on recommended against it so heavily -- and not just because Sun wanted to sell us more hardware ;-)
But anyway, I've striped partitions across Linux (LVM2) and Solaris disks (Disk Suite/Vol Manager) several times -- RAID 0 I think that is -- and that seems to be pretty efficient.
Mostly it has to do with the fact that good h/w RAID has one channel and possibly bus dedicated per disk (whether SCSI or IDE) which means there's very low access-contention, but it also helps (a lot) that the dedicated controller handles all the splitting/consolidating of the data across the disks, parity-checks when a disk is replaced, etc, etc, so the OS can get on with what its better at.
Sharing a channel/bus (e.g a single IDE cable or a single PCI Bus) can really affect read/write performance because the data will have to be consolidated in a divided manner across those same channels/buses from all the disks (or all-but-one for RAID-5). The speed of those channels/buses can vary a lot between systems and architectures, though a 500 MHz CPU suggests a less-than-desirable speed for this task...
Parity-checking a replacement disk will also absolutely destroy disk-access speed -- *all* the data on *all* the disks has to be read in to write the correct parity to the new disk -- but a good h/w RAID should still allow the array to be used at the same time without too much pain.
Anyway, since you've got the disks already, it would be worthwhile playing with RAID and finding out for yourself, but if you can can't spare the time (or headaches) I'd definitely think seriously about a h/w RAID solution.
If you are storing data that will not change much, it may be simpler to simply make a cron job to copy the data from one drive to another. Set the copy to happen in the middle of the night and you're good. You'll have a copy of the data on a drive that you can put into any machine, and not have the overhead of software raid. I've used software raid, but found that it is slow when you have more than one drive on an IDE channel.
vinum under freebsd. under 5.3 use gvinum. laid out like a real volume manager with volumes, plexes and subdisks. For a reasonably current cpu, s/w raid is as fast as h/w. If you wanted real perf. you'd of bought SCSI so you'd have tagged queueing. Failing that, SATA on true SATA drives/controllers (not the bridged PATA ones).
UPS. A good filtering one with a minimum of 10 minutes of ride through. UFS2 on 5.3 will also save you waiting on fscks.
RAID 5... for what? How is it going to be connected to your other computers? Do you have 64bit pci? Total system throughput and network latency will be other issues you'll need to account for. I've used SuSE software raid and OS X software raid... OS X is running like a champ but SuSE's array failed after about a month or so. Not sure if it was a software issue but I'm pretty sure it was. If it's for something like serving mp3s or small files it will probably work just fine but if you're going to be streaming video other than anything above mpeg-2 you should invest in a nice low-end fibre channel solution and save the cpu for something else.
||| I still can't believe Parkay's not butter.
Comment removed based on user account deletion
I have used software RAID-5 under linux for a year or so, and it has survived two hot-swapped spares, transferring of CD and DVD images, backups and restores of entire 120GB hard drives, etc. Transfer speeds are as good as a single physical drive, especially since each drive has its own channel (this may suffer a bit if you put both a master and a slave on each channel). i have done three OS re-installs and a few kernel upgrades without losing any data. My file server has only 512MB of ram, and an athlon 1800+, so it's not superpowered or anything, and my array has a terabyte of usable space, so it should be comparable to your situation.
The only PITA part of software raid under linux is the initial array rebuild, which took 3 days (under load) to complete. However, during that time, the raid is still accessible, just not redundant.
Everyone has their own experience with a bad hard drive or a bad batch of drives from a vendor. I know people who swear Seagate is the worst manufacturer, and then some that say WD is awful, and Maxtor, and etc etc etc.
I've used them all, Seagate primarily though (SCSI servers), and have noticed a trend. They all suck the same!
The sooner we can move to cheap solid state storage the better.
Nothing like doing a little cursory research at the more prominent documentation sites for topics on this matter.
In summary:
How stable is the current RAID 5 support in Linux? Quite. It's really the only way to go, and performs about as well as hardware raid.
How hard is it to rebuild an array? It's not. At all.
How well does the hot spare work? Seamlessly. Be sure to use LVM, as it makes things all the more seamless.
Will it rebuild using the spare automatically if it detects a drive has failed? Yes.
~/ssh slashdot.org ssh: connect to host slashdot.org port 22: too many beers
Comment removed based on user account deletion
Apple uses Maxtor in their lower end Macs (and around the year 2000 used them in most of their product line).
I've replaced 5 faulty Maxtor hard drives out of recent Macs owned by friends. Ergo, imho, the drives suck and I don't want anything to do with them.
I was very intrigued by your sudden interest with data integrity and redundance after just buying Maxtor drives...
I've used software raid 5, I've always found it more reliable than hardware. and i've recovered from multiple disk failure.
I am looking at switching to raid 6 on a 2.6 kernel. 2 disk redundancy.
FYI: Promise has seeminly added a crippling feature in their latest non-RAID EIDE controllers to avoid folks making cheap soft RAIDs.
You used to be able to use as many Promise PCI IDE cards as you had PCI slots - I've had up to 5 Promise cards previously, ATA-66 vintage. However, the newer PCI IDE cards will give fatal errors if you have more than 2 in your system - drive timeouts, write errors, etc.
I confirmed this with their tech support. This is something in their BIOS, and cannot be avoided. I'd guess that they purposely did this.
This is not an issue with "generic" IDE controllers, like the one that SIIG makes that has a Silicon Image chip on it. Same price, no hassles.
I have two servers at home using it. One is a file server that has been in use for four years, no issues. The other is somewhat newer, bigger, and has been in use for 6 months. Built one for a friend that is over 1TB, also going strong. They do 50-60 MB/sec easily on reads.
Stick with fairly decent hardware - cheap Intel branded board, good "generic" IDE controllers. Give each drive it's own IDE port. You'll be fine.
For the most part the compaq smartarray line of cards are backwards compatible and you can upgrade or downgrade the cards without changing anything.
I have some limited first hand experience with this but I have only done it a few times so maybe someone else can tell of their experiences.
The man who trades freedom for security does not deserve nor will he ever receive either. - Benjamin Franklin
"the bottleneck is in the networking"
I'm not sure about that. A gigabit is still 125+ megabytes a second - it might bottleneck your burst rate, but it's unlikely your array is going to saturate it besides that. Especially if multiple people are using them at once.
If you're really concerned about bandwidth, I would buy a second NIC for all your computers and simply make a "storage network". That's something of a hack, but I think it would work pretty decently.
Of course, you're SOL with wireless.
-Erwos
Plausible conjecture should not be misrepresented as proof positive.
the older model 3ware cards work well but have less than stellar performance. you won't get more than 30-35mbyte/sec tops of hw raid5 thruput on a 3ware 8xxx or 7xxx controller.
that said the 3ware controllers are the -best- multiport ide controllers out there, especially for SATA support under linux.
We use them and run linux sw raid5 across all the individual disks on the controller. Excellent performance (it max's out the 32bit PCI bus, easily 100mbyte/sec reads)
I haven't tried their new 9xxx series cards. hopefully those have real speeds for their hw raid5.
Linux RAID 5 is awsome. Mainly in Whitebox 3.0 (redhat enterprise 3). We have been hosting an Oracle database on a dev machine... and will use it for a backup machine... also have an email server with raid 5 for home dirs and mailboxes. Make sure you have plenty of ram and a fast machine... but you can skip that even if superfast speed isn't the issue. Even then the performance isn't THAT bad. Please note though these are all P4s with at least a gig of ram... actually shouldn't be that hard... also they are SCSI3.
Look at the MTBF for a Maxtor drive. Look at a 60% duty cycle on the drives (low for a RAID that gets moderate usage). The MTBF numbers for those maxtor drives is going to suck. Really really bad. If you use it heavily, it's about a 90% duty cycle. Those maxtors will die every five minutes. Make sure you've got at least one hot spare. And if you plan on using this for anything heavy...buy some seagates.
Jeez, I've never seen so many plain fools in all my life. Hardware RAID controllers! How quaint.
Here's what you do with those 8 fine drives of yours.
You'll need 9 486's. Get some sort of *nix on each one, preferably several different Linux variants and at least 2 BSD machines (I'd say more, but you know, netcraft confirms and all....) and get them all networked together. Put one drive each in 8 of the machines, format with the filesystem that's most convenient for the system on each box, and get an NFS server going serving that partition.
Then, on the ninth box, mount all the NFS shares and software RAID them.
Trust me. This is exactly what you want to do, and anybody who says different is a dumbass. People who point out what they will invariably say are "obvious shortcomings" of this setup are merely trolls, and not worth your time reading.
Given a choice between free speech and free beer, most people will take the beer.
Vinum on FreeBSD absolutely rocks! You're old 500MHz machine will run FreeBSD beautifully too.
Anybody here remember Walnut Creek's huge ftp archive at "cdrom.com" which back in it's heyday of the late 1990's used to be the biggest, most highest traffic ftp download site on the planet? They used a combination of Vinum software raid and Mylex hardware raid to handle the load. I remember reading a discussion article from them once that until you get a totally ridiculous volume of ftp sessions hammering away at ther arrays, that Vinum was actually a slight bit faster than the hardware array controller.
Bad idea. If they're 6Y250MO's, I bought one of those too at the same (recurring) sale price, and have had nothing but trouble with it since. Same story with 70-80% of drives I've bought at Fry's, and I've bought MANY. I know I should be heeding my own advice, but I've always been lured by the rock-bottom sale prices (hard drives are one of the few product categories where Fry's rebates are actually honored,) and by the recurring delusion that "if it's boxed and factory sealed by Maxtor/WD/Seagate, it can't be that bad..." Unfortunately, there seem to be three hard drive Q/A outcomes, especially for Maxtors: "Pass," "Fail" and "Fry's."
Sometimes hardware RAID does sucks. We had a HW controller (I think it was 3ware) that sometimes took 30 sec to delete a 100M file. We sent that one back.
Software RAID does have some real advantages, like speed. Put disks on multiple SCSI or IDE controllers with a dual CPU and you can _really_ fly. Also, you can recover from some really screwed up problems with mdadm, if you know what you're doing. Consult the linux raid mailing list: the feedback is great.
That said, hardware raid is much easier.
Just make sure that you 'mkinitrd --with=xor --with=raid5' (read man page first please) in that order... or the modules won't be there at boot and you'll have to start the raid5 some other way.... but otherwise 1gig ram and p4 should do the trick. Performance is good. Oh and you might wan't a hot spare in the mix. Finally and VERY importantly adjust the partitions down from the max size for the drives a bit... say go with 148 on a 150 gig drive. Reason being that not all drives are the same and if you ever have to replace a drive you'll be sol if the total size of that drive is smaller then the others in your raid5.
Perhaps someone would know if a JBOD (Just a Bunch Of Drives) was mounted on a fibre channel network, could more than one linux box access it as a Raid 5 array? In other words if the only boxes that were reading from the storage array were linux, would it work for each of the machines to see the array as a whole? Im just thinking of some interesting plans for some spare fibre channel equipment.
Most systems will not allow more than two additional 2-channel IDE controllers. It is advised to have only one device per channel. Your best option is a six or eight device raid5 controller that uses software parity.
Tech support was totally right. Regardless of what the power rating is on your power supply, you can't keep the power within the required limits with that much load, especially at boot. You need to use an external enclosure to keep the power from glitching or dipping at boot.
I have machine running with software raid-5 that uses software with database(mysql) connectivity for roughly 100-300 users simultaneously, load isn't that bad, ~30 queries/second, which gives about 0.05-0.30 average system loads (2gig/512ram)
The raid is made from three SATA disks, and each drive has its own controller.
Biggest problem that I have encountered so far is that when I upgraded from 2.4 series kernel to 2.6, the sata devices changed from hdx to sdx and suddenly the arrays vanished.
But that was easy to fix just by telling the software where to look for the drives.
Recovery seems to work well from past experiences on older system. Had ide drive failing, I didn't have spare available right away so I just mounted the array as degraded readonly meanwhile.
After getting replacement, array took awhile to rebuild, and ~8 hours later it was up and running in readwrite mode again.
Haven't tried if hotplug works with serial ata drives but I'm bit suspicious and I'd rather take the system down for a moment to fix it instead.
There are no atheists when recovering from tape backup.
I don't mean to sound like an ass, but has this guy even RTFM?
3cx.org - A truly bad website.
And keep all those drives cool; use fans.
It seems to me it should be possible to put another power supply in the case and power the extra drives from that. Most modern BIOS versions allow specifying a delay on the hard drive spin-up. Just put the power-on connector in parallel with the main power supply connector. I don't like Antec cases much, or those from any manufacturer, but some full tower Antec cases have room for a second power supply.
But a case with a lot of drives and a motherboard needs a lot of air-moving equipment.
--
15 of the 19 9/11 attackers were Saudis. Many don't like the U.S. Gov. influence on their country.
Office Depot had an 18th anniversary sale, and was selling Maxtor 60GB drives for $18 after rebate. Bought three for my personal test machines, and used my friend's addresses for the rebates.
I often hear bad things about Maxtor drives, but after a whole 40 hours use, they haven't failed once.
Anyone have experience and knowledge to compare these two animals?
We have good luck with drives. The reason appears to be that we install them with their own fans, so each is individually cooled.
--
100 Facts and 1 Opinion -- The Non-Arguable Case Against the Bush Administration
I've had really bad experiences with early Silicon Image based controllers. Those Koutech controllers use Silicon Image chipsets. Is Silicon Image better now?
--
George W. Bush's brother was shown in a lawsuit deposition on 20/20 talking about his prostitutes and using government influence to make money. Family values?
You should _NEVER_ forget that the power supply you hook up the drives to is your SINGLE POINT OF FAILURE.
It it breaks _ALL_ your drives are killed instantly and your data is up in smoke. It happened to me with a raid array and no need to tell you how fscked I was.. If you're lucky to have spare parts to replace the electronics on the drives you might get your data back, but other than that.. i know it's a pain in the ass to back-up a terrabyte raid array.
Boot/system - mirror it, forget RAID ! Application data - depends.. Most important, separate the logical and physical access thinking. Indexed data - mirror keys, RAID data! Now - I know, mirroring is (kind of) RAID but not really the same. It really depends on what is the purpose, much less what is the technology. You back up the data ? You use raw disk access or file system ? You use journaled file system or not ? If so - where are the journals ? See - there is much more than just RAID. And so on, and so on.. Have fun.
If you can afford hardware RAID, go with a 4-port or 8-port card from Adaptec.
What type of external enclosure can one use for ATA or SATA drives? All I've seen for sale are SCSI or Firewire enclosures.
Slashdot: Failed Car Analogies. Amateur Lawyering. Anecdote Battles.
I've been running a RAID server with Linux for about 6 years. I ran software RAID-5 for the first 2 years or so and there were several things that came up. There were a few times when the system crashed and the array was out of sync (not all the drives had the same sequence number for the last write). It required some manual troubleshooting and head scratching. There was also the issue of strangeness when the hardware failed. A few times I had a drive go bad in such a way that it was not visible to the BIOS or boot scripts. In those cases the software RAID drivers got confused. They would not allow the operation of the array with a missing disk. I had to install a drive (any drive) even to just use the array in a non-redundant mode. Also, if you're going to do software RAID with IDE drives, absolutely DO NOT use more than one drive per controller channel. It may work for a short time but you WILL have problems.
After a few years of problems like this, I never had a warm feeling about the reliability of the system so I installed a 3ware hardware RAID controller (IDE). After another few years, I upgraded to another one (SATA). I've been most impressed with 3ware's product performance, reliability, and support.. I highly recommend them.
--
JSL
After months of problems with DMA timeouts and lockups caused by using a Highpoint RAID controller and a Promise IDE controller I finally bit the bullet and bought a 3Ware Escalade controller. All the sudden, everything is completely stable.
Do yourself a favor and get a good hardware raid controller and make sure it has good Linux support. Promise sucks. They advertise Linux support on the box - they lie, only with specific 2.4 kernels. 3Ware has good driver support for Linux included with the Linux kernel source code.
-Aaron
This post is encrypted twice with ROT-13. Documenting or attempting to crack this encryption is illegal.
A great deal of the posts here seem to be implying that the purpose of RAID is to protect your data. This is dangerous. Most data is not lost through hardware failure, but rather through human or program error. If you accidentally do an "rm -rf" on the wrong directory, RAID will still destroy the data. Protect data with backups: backup to tape, backup to another computer, backup to DVD or CD, but never think of RAID as a substitute for backups. My other advice is keep in mind that if you don't watch your logs you may have a drive fail and not know about it for some time. Linux RAID should be paired with log monitoring of some sort, even if it's just a cron job that greps for raid messages.
You can get a relatively slow 5800 for under $50, which should perform better than software RAID. For a little more, you can get a screamingly fast 64 bit PCI card.
These allow Raid 0, 1, 5, 10, and have great Linux support including a daemon to fiddle with the settings and the option of a hot swap drive bay.
I have been using RAIDFrame under OpenBSD for about 2 years now. Never had any issues. From dmesg:
/etc/raid5.conf
/dev/wd0a /dev/wd1a /dev/wd2a /dev/wd3a
/usr/src/sys/arch/$ARCH/conf
../complie/RAID /bsd /bsd.old /bsd
wd1 at pciide1 channel 0 drive 0:
wd1: 16-sector PIO, LBA48, 156334MB, 320173056 sectors
wd2 at pciide1 channel 0 drive 1:
wd2: 16-sector PIO, LBA48, 156334MB, 320173056 sectors
wd1(pciide1:0:0): using PIO mode 4, Ultra-DMA mode 5
wd2(pciide1:0:1): using PIO mode 4, Ultra-DMA mode 5
pciide1: channel 1 configured to native-PCI mode
wd3 at pciide1 channel 1 drive 0:
wd3: 16-sector PIO, LBA48, 156334MB, 320173056 sectors
wd4 at pciide1 channel 1 drive 1:
wd4: 16-sector PIO, LBA48, 156334MB, 320173056 sectors
wd3(pciide1:1:0): using PIO mode 4, Ultra-DMA mode 5
wd4(pciide1:1:1): using PIO mode 4, Ultra-DMA mode 5
Kernelized RAIDframe activated
raid5 (root): (RAID Level 5) total number of sectors is 960429504 (468959 MB)
The setup is very simple.
# cat
START array
1 4 0
START disks
START layout
32 1 1 5
START queue
fifo 100
It has been quite stable. The box is a 1Ghz AMD with 256MB of ram.
I tried running the same setup under Linux (Gentoo & Slackware). The software RAID would crack under load and fail a disk. I really would give OpenBSD a try with RAIDFrame. You have to recompile the default kernel with RAID suppot but under BSD it is very simple. CVS the source down and:
cd
cp GENERIC RAID
vi RAID and add:
pseudo-device raid 9 # RAIDframe disk driver (Make the number, 9 in this case one more then the number of disc you are using)
option RAID_AUTOCONFIG
save the file and:
config RAID
cd
make clean; make depend; make
cp
cp bsd
and reboot.
Then just read the main pages for raidctl to see how to set it up (hint: look at my raid5.conf above).
Hope this helps.
I'ved use software raid 5 & 1 on over 6 servers with good success. I've ran several benchmarks on machines using software raid and hardware raid. They both offered compariable performance except in one area. If you constantly fsync such as unbuffered always sync syslog writes. Now this is slow no matter what but it was extremly slow in software raid.
This isn't really much of a problem as you don't really ever want to write to disk unbuffered always calling fsync.
I got me really bad when I turned up the logging in postgresql. While the performance degraded in both software and hardware raid. In the software raid it was really slow. However if you do buffered logging it is equaly fast on both hardware and software raid and almost no performance degradation.
So just remember don't do any unbuffered always fsync writes to disk in software raid. In most cases you'll never do this.
We have built a dozen RAID5 file servers running Linux and used a 3Ware Escalade hardware controller every time. Every machine has worked flawlessly and continues to work. This includes our off-site backup system. Nothing else has worked as well and, for the $150 or so the card costs, it's well worth using.
No one ever had to evacuate a city because the solar panels broke!
I haven't read all of the comments in detail, but I think one thing that people are often forgetting is that a standard PCI bus has a theoretical maximum bandwidth of 133 MB/s, a level you'll probably never see in real life, especially when there's a fair amount of chatter on the bus from different devices (and you'd get a lot of that with 8 drives plus networking plus who knows what else). Of course, PCI bus layouts vary considerably between simple motherboards and high-end ones.
I don't know if anyone makes PCI-X ATA-133 controllers (non-RAID), so in the final analysis it might be best to get a 3ware card with a 64bit connector and plop it in a long slot. Of course, you need a pretty nice motherboard for that. I guess I haven't gone shopping recently, but they weren't that common the last I checked (and everyone is going to head for PCI-Express shortly anyway).
Of course, it all depends on what you'll use the machine for. If it's just file serving over a 100Mbit network, there's no need to worry that much about speed. It's only a big deal if you're concerned about doing things really fast. I believe good 3ware RAID cards can read data off a big array at 150-200 MB/s (maybe better). My local LUG put a ~1TB array together for an FTP mirror with 12 disks (using 120GB and 160GB drives, if I remember right) about 2 years ago, and testing produced read rates of about 120 MB/s on a regular PCI box (I think.. my memory is a bit flaky on that). Of course, I don't think anything was being done with the data (wasn't going out over the network interface, to my knowledge, just being read in by bonnie++ I suspect).
I was running a P3 600, on an 810 board for a while running with 3 seagate 120gb drives for my brother who lives in a flat under my house. it was definitely not quick, but stayed up. The performance was pretty crap compared to the same hardware running a mirror, but a large part of that was the crappy controller on board.
:/
:-)
:-)
;-)
I upped the box to an athlon 1200 on a sis mainboard and things improved quiet a bit. (both boxes had 256mb sdram) The raid and network performance doubled, and tons of delays disappeared.
After complaints (from the windows user) that it still wasn't utilising the bandwidth well enough, I reluctantly used one of my main PCs (athlon 2400, via kt266, 1Gb) and also tried an extremely cheap Sil680 controller (used just for the disk interface). The individual drive speeds went over 50mb/s. The raid5 was still only running at about 35mb/s. And of course no faster over the network - just a waste of a machine.
After not being able to stand the fan noises of the 2400, I split the drives off and put them in my brothers windows box as a mirror, seeing he's the only one who needed the reduntant space (he has some bizarre psychological need for 'warez' and mp3s) They failed within a day with loads of data recovery fun. He's since warranty swapped two of the for seagate sata's, and reinstalls once a month, and i've stopped caring about the plight of his O/S or warez..
These seagate drives were less than 5 months old, and were getting loads of seek & ecc errors from the start. The were all running with enough cooling (it's summer here 9 months of the year), and the temperatures were monitored constantly. Just crap I guess.
The moral of the story: use decent long lifetime drives from the start, of different batches, don't throw more money on hardware than you have to (a cheap faster ide controller does wonders), and use a decent O/S that is stable and lets you optimized to hell (ie gentoo
Oh yeah, and kill all windows users..
in linux, raid5 is a very solid and fast solution. even with a 500Mhz, it is faster than all but the most expensive hardware cards, as most cards have a 133mhz chip or even less.
:) should give a nice performance boost on many systems. this patch is designed to improve transfering files on networks but is show to work equally well for local devices.
also, software raids are hardware independent. they can be modified easily while booted and without rebooting. if a hot-swapable drive is used, downtime can be eliminted by a hot-swap and a rebuild of a failed drive.
also, i have been in a discussion about the new cachefs patch in rescent mm kernel patches(or maybe nitro?), allowing you to use a cache in ram with any filesystem, so you could mount your raid array through the cachefs with a given amount of RAM for write cache
AND, linux software raid works on a per-partition basis, so you can mix and match drive sizes without wasting space. 8 250GB drives can mate up with 4 300GB drives, and then the wasted 200GB can be made into another array.
you can easily add IDE cards and increase the size of your array.
you can spread your array over a large number of IDE cards for better redundancy, no single card will criple your array, and IDE cards are much cheaper than hardware raid cards.
LINUX can be booted from a software raid! while is has trouble on some hardware raids!(driver issues)
i run a software raid5 over 12 seagate 120GB drives with no problems. i get great transfer speeds accross the (gigabit)network and it's easy to manage drive spindown because the system sees each individual drive while hardware raid solutions typically only allow the system to see the array as a single device.
most hardware arrays are mainly configured at boot time. to build or repair an array, your system will not be working. if you run a linux fileserver/firewall, your firewall doesn't function on hardware raid rebuild, while it does in software.
--
though i would go with a faster processor, you should have very good luck, reliability and performance from an 8 device software raid5. and have a nice 1.7TB array
I am very happy with my linux / 3Ware 4 port raid card combination. It makes it brain dead simple and takes linux out of the loop of things that could trash the raid. I even forgot to install the *drivers* for the raid in the initial install and it all just worked fine... because the box thinks it's one big magical drive. (The drivers were only necessary for monitoring...)
Spend the extra $200 on a 4 port card... put a *big* fan on the drives because that's the #1 killer and you'll be happy.
Pat
It worked okay until one day I had to reboot my file server (moved locations) and I couldn't get the raid to come back up. I lost all my data :(. The bad part is - when it came to forums, irc and generally trying to get help there really wasn't any, a good amount of the documentation out there and the troubleshooting information is for the older tools. I generally believe that when it comes to your data you can only trust tools you can actually support - software raid for all intents and purposes seems highly alpha/beta.
Anyhow I bought a 3ware 7450 Raid controller and haven't looked back - its brutally fast (over 20-30 megs a second in a sequental write), fully supported in linux and it a piece of cake to setup.
Its not bad at recovering either - I had a power failure and the ups failed later on - machine restarted of course when the power came back on and the 3ware controller automatically rewrote all the parity on the disks - everything was fine. While it wrote the parity the system was up and running instantly (raid was in a fail state of course).
How are you going to connect all these hard drives? You mentioned software raid... If you're planning to use the IDE on the motherboard... A motherboard that old might not recognize that large a HD. Got Raid Cards?
Give us a reference to the standard used for on-disc storage of the RAID management information then.
The only "standard" here is what the RAID levels mean. Everyone implements the on-disc data storage differently.
smartctl often comes as part of the package "smartsuite." For Debian users there is an apt package available under that name as well.
You can get smartd to execute tests automatically, using the -s option.
In my smartd.conf file, I have :
-s (L/../../7/03|S/../.././05)
on the device lines, which means do a weekly online long test at 3 am Sunday, and a daily online short test at 5 am every day.
mdadm running as a daemon, and watching the md arrays is also a good idea.
The Internet's nature is peer to peer - 20050301_cs_profs.pdf
I have a 160GB Linux software RAID-5 consisting of three 80GB disks, running 24x7 for years now. (when I built the RAID, 80GB was the largest disk capacity you could buy :).
No problems at all. I once had an IDE controller fail - I replaced it (had to reboot of course), and Linux rebuilt the array automagically.
I have not tried using a hot spare.
Warning: a lot of the documentation out there on the web about Linux software RAID is very out of date. If you go this route, DEFINITELY buy the book "Managing RAID on Linux" (O'Reilly). Also be prepared to compile the "raidtools" package, which you need to set up arrays.
I have since added an 8-disk system based on 3Ware's 9000 series SATA RAID controller. I recommend 3Ware for higher-performance systems. (I have 8 250GB disks in a single 1.6TB RAID-5, I get about 180MB/sec read, 90MB/sec write.)
If you run smartmontools, you can configure smartd to not only monitor the SMART status of the disks, but also execute online tests - have a look at the "-s" option of smartd. For my RAID1 array, for each device, I have -s (L/../../7/03|S/../.././05) entries.
mdadm also has a daemon mode which can monitor the arrays, and if there are any failures, send an email to a designated email address.
The Internet's nature is peer to peer - 20050301_cs_profs.pdf
There is a pretty good chance he knows what he is talking about ...
The Internet's nature is peer to peer - 20050301_cs_profs.pdf
The advantage of HW raid over software is in the speed that HW offers you. Of course, if you are doing RAID 5, you usually aren't concerned with speed as much as redundancy.
This signature is a waste of 42 characters
I'm running raid 5 on i think 2.6.8 with 3 drives. That is, i'm running it on the root partition and it runs alright, although, i have noticed it has goten slugish... maybe a defrag is in order?
When i started out, firefox was loading in 2 seconds and it now appears to be taking around 4 seconds to load. At least i think those mesurements are ok. If you want real speed, i'd think about using raid01 as it seems 4 discs in a raid0 array would be faster than 8 in a raid5? I'm not too sure about that, but raid5 is significantly slower than raid0 apparantly. Also, using those other 4 discs to mirror the raid0 array could be more usful then raid5s parity/crc redundancy.
Giving IE users a taste of their own medicine since 2005 - http://pods.-is-a-geek.net/
I just installed a 3ware 9500-8 w/ 8 sata drives running raid 0. I did it for speed. I'm backing it all up with an LTO-1 tape drive. I bought 3ware after ripping my hair out messing with some of the lower end hardware raid cards. It was hard to spend 525.00 on a raid card, but after I did, and got it working, I'm very happy with it. Using hdparm -t, I'm getting about 170 meg per second throughput. The 3ware site shows benchmarks of around 200 meg per second w/ western digital raptors (12 disks).. also, they use bonnie++ for benchmarking... just some thoughts..... I know you are looking mainly for file storage.... so your looking for a dependable raid 5... just my opinion, but speed isn't really an issue for you because you can only push about 8 megabytes per second down a 100 MB ethernet connection... go for the 3ware ... it's dependable, and they have open sourced thier drivers. They have the best linux support of anyone I've seen for raid cards. Good Luck !
Then the nightmare happened. The computer (an old 400 MHZ celeron) stopped accepting keyboard input. No way to get past the boot error. I moved the raid array to another machine, keeping the drives in the same order ( drive 0 on the master on IDE 2, drive 1 and 2 on their own IDE channels on an IDE card). A an install of redhat saw the raid right away and set up the disk accordingly.
Apparently redhat marks each disk with a volume label, so it knew they were part of a raid. I don't know what would have happened if I got them out of order (who knows? Maybe I did), but I certainly feel a lot better about software raid under linux.
Computers are useless. They can only give you answers.
-- Pablo Picasso
Indeed, they are.
In fact, I used to work in a datacenter with some 2500 Proliant servers running mostly the 6400 SA controllers. For about 3 years we had to shut down the datacenter completely about once or twice a year (Mainly for upgrades to the electrical systems) - and in bringing things backup we'd end up needing to replace 4-5 controllers - and they never skipped a beat! Same with upgrades, never had any problems.
Looking for hardware (Currently need: Large Etch-a-Sketch) Have one? See my journal!
Have fun with the RAID array, sounds like fun, but a little advice. RAID gives you much added protection against outages during critical hours. And it does save you from having to restore from backups *sometimes*
However most data loss occurs from HUMAN or SW errors, not HW. RAID won't protect you from either of those. If you want to have an online archive of music and movies and pic's etc... That is very nice, you don't want to loose all the time and effort you put into that.
I *assume* you have a broadband ISP connection. (cable, DSL?) You have a good friend who does too? If so, why not share the cost and the space with a friend, set up rsync between your houses for remote data backup on a regular basis. (There are howto's regarding this.)
Now you can lose a disk or a controller, or the whole server, and all you have to do to recover *everything* is set up a machine with at least as much disk space and setup the rsync to rebuild your copy from your friends house.
If you do this, you can save the worry over all the details and issues of RAID setup and failed disk replacement and such. (I mean do that stuff, but don't fret over it, because you will always have all the data backed up remotely anyway.)
I have used raidweb.com enclosures in the past and they work quite well. They handle all the RAID configuration inside the box and appear as one drive to the host (hence the boxes are totally host independent). The connection between the box and the host is SCSI and I've used off-the-shelf high-end SCSI controllers for this. Their boxes have redundant fans and power supplies. They sound like a jet taking off, but my experience is that they're stable and rock solid. They're rack mountable too.
The only big disadvantage I experienced at the time was the lack of docs on the serial controller, so I only had the audio buzzer signal to go on when a drive failed. I think the box would have sent a signal over the serial link to the host indicating a failure. Then the host could do something interesting with that signal like send e-mail, call a pager, and so on. It would have been nice to have remote signaling, but in this case I didn't need it. The install site always has someone there to handle taking out the bad drive and plugging in the cold spare.
Digital Citizen
Under 2.4, software raid 5 is stable. Monitoring it is trivial (cat /proc/mdstat). Rebuilding the array after adding a drive is trivial (raidhotadd /dev/md0 /dev/hda1). Rebuild happens in the background on the fly and you can watch it in mdstat. You can even set the partition types to raid-autodetect instead of linux (type fd instead of 83 in fdisk) and have the kernel notice and build the raid5 device before trying to mount root.
/proc/interrupts followed by eventual kernel oopses. A single drive channel worked flawlessly but simultaneous access to two drives = problems.
I use 8x250gb Linux raid 5 at work for an online backup server. Its rock solid, a real champ.
Couple gotchas:
1) Only ONE parallel ATA drive per controller. NO SLAVE DRIVES. IDE drives can't disconnect the way SCSI drives can, so having parallel traffic to both a master and a slave drive will KILL your performance.
2) Beware of multiple Promise cards in older (P2 and P3) machines under Linux 2.4. Something has gone haywire in the driver. Works fine on old Pentiums and fine on Athlons and P4s but on all three P2 and P3 motherboards I tried (two different model intel boards and an ASUS P2B) I got rapidly increasing ERR counts in
The CMD Technology Inc PCI0680 controllers (e.g. SIIG, Adaptec) worked great.
Remember: 8 drives, 1 drive per chain = 2 drives per card = 4 cards = 4 PCI slots. Make sure you have enough left for video and ethernet.
Moderating "-1, Disagree" is simple censorship. Have the guts to post your opinion.
why? gigabit copper is just as fast and ~50x cheaper.
I'm running a RAID0 array on 15k SCSI HDs here, and honestly it's _not_ that much faster, except for when I'm recording audio (those WAV files get big FAST). Then again, I could still do it with no RAID.
Overall, unless you're dealing with big files, you won't gain much. (not to mention if you have too many drives in your array and not enough throughput (e.g. only ATA100 with 5+ drives), you'll really only choke your system bus.
this is a fatal flaw in the linux software raid5 design.
real (read:industrial strength) raid5 designs dont mark the whole drive unusable, just the few blocks that had uncorrectable errors.
the linux raid5 driver really needs this feature, and i wouldnt recommend using it until it does.
They make good RAID controllers too for a competetive price. (They OEM the Dell "PERC" cards)
THIS THING CAN TURN ON A DIME, MACROSSZERO STYLE ALSO FUCK BETA, ~NYORON
Mod parent up, this is great advice. I've had superb performance and reliability from software RAID 0 and 5 under Linux 2.4 and 2.6 for the last two years using a fast/wide PCI bus.
Hardware is a trio of Seagate X15-36LP Cheetahs connected to a Tekram U160 card running in a 64bit/66MHz slot of a dual Athlon XP 2000+ Tyan Tiger MPX motherboard [currently $215].
When I moved this controller and drive setup to the standard 32bit/33MHz slot of a dual P3/450MHz machine, disk performance was drastically cut while CPU usage wasn't much affected.
Modern hard drives are pushing 70MB/s transfer rates, so even two of them can saturate the classic PCI bus. PATA, SATA, and SCSI can all support high RAID transfer rates if their controllers are connected to the system by wide-enough / fast-enough interfaces and smart choices are made about [not] sharing channels.
BTW, at least a few of the common Linux filesystems are smart enough to automatically configure themselves efficiently when formatted on top of a RAIDed partition.
It's better to have a combination of both hardware and software RAID. You can take better advantage of a larger server (especially with multiple I/O buses) if you add a couple of independant RAID controllers, then bind them together with software RAID. Raid 50 comes to mind... So you can treat each controller and it's respective drives as individual volumes in the metaraid, spreading out the chance of data loss due to an adapter dying; simultaneously getting a nice performance boost.
THIS THING CAN TURN ON A DIME, MACROSSZERO STYLE ALSO FUCK BETA, ~NYORON
RAID5 is almost always better when offloaded (unless you have like mad SCSI controllers for your direct-attached discs)
THIS THING CAN TURN ON A DIME, MACROSSZERO STYLE ALSO FUCK BETA, ~NYORON
Completely agree, but I would add an important piece of advice:
/etc/raidtab !!
If you use software raid, BACK UP
It seems like trivial info, but when I lost my os partition with a raid0 set attached, I had a hell of a time trying to figure out what the old raidtab looked like. If you get it wrong (eg in reverse order) when you try to guess, you can end up with directory listings that look fine, but you're corrupting the disk with every write.
Seems crazy, and it may have been an older incarnation of software raid, but I ended up having to re-rip 50 dvds as punishment. Make sure you back it up !!
Servlet v2.4 container in a single 161KB jar file ? Try Winstone
You just spent $960 on the drives (8 x $120). So obviously, you can afford to spend a few dollars. So you probably can spend about $100 more and get a 3Ware raid card (afterall, you saved a lot on the drives themselves.) Since reliability is important, and you got a great deal on the drives (I hope you remember that only 1 mail-in rebate per address when you send in for your refunds), so spend a small fraction more to get something that works - hardware RAID with a real controller.
I would be very interested in doing this (in the near future) but can someone confirm that this will work without any hassles in Linux? I tried doing a setup a long time ago with external drives and ran into all sorts of problems.
The issues were related to the external controller itself and not linux, but would like to find this out before I went down the road again.
..don't panic
I've stuck 4 7,200rpm IDE drives in a case... and promptly killed two of them within days. I had to add a rear exhaust fan to the case, a PCI slot blower, and I removed the blanking panels in front of the drives to get more airflow. The drives now stay merely warm to the touch (instead of HOT), and the drives have been fine ever since.
8 of those suckers are going to get toasty without plenty of auxilliary cooling.
DRM 'manages access' in the same way that a prison 'manages freedom'
Anger problem?
The question is, can two cheap power supplies be used in standard case? The question is NOT whether you can pay $2000 for special equipment.
Obviously both power supplies would be attached to the case with the standard screws. That would provide a hundreds amps worth of common ground connection. Obviously the black signal ground wires would need to be connected to each other with a small additional wire.
I am a real electronics design engineer. I can't think of any reason why this would not work. It would probably be necessary to shut off the power to the hard drives separately.
There would be a little common mode noise, however this is something that the signal ICs in the hard drives can handle.
--
24 wars since WW2: Creating fear so rich people can profit.
I don't know how's it actually done, but it seems to be the parity generation could be done by a on-the-fly counter that tracks bits as their written. It could be done really fast in hardware too. Not so slow in software either. Of course, I'm just throwing stuff into the discussion coz I'm a little curious, and don't know much about the issues in implementing RAID and large arrays. ... Enlighten me?
Then I install the OS on a RAID1 set and the data I care about on a RAID5. One system I have has dual SCSI 2xRAID1 for the system partitions and 3xRAID5 IDE drives.
The CF is /dev/hda and is mounted read-only. If I need to upgrade the kernel I remount it RW and then do what I need and remount back to RO.
This is the most reliable configuration I've come up with so far. CF has no moving parts so it's fairly reliable. Writes are limited to about 1 million. Reads are unlimited.
Compact Flash Readers
http://store.yahoo.com/ituner/cfdisk1c.html
http://store.yahoo.com/ituner/cfdisk5d.html
Some boards don't like the 5D type Converter, since they detect using the cable type (40 or 80). In which case type 1C works just fine.
...and found hardware to be a good thing.
http://www.finnie.org/terabyte/
If you have one large partition and impending drive failure wipes out any cylindar on that drive, all the data on it is shot. That drive won't be used at all during the rebuild... a rebuild of 250Gb. You are at risk if, during any time of the long rebuild, a 2nd drive fails completely or even coughs up a bad cylindar which can't be redirected.
If you have 6 partitions, only the "damaged" one has to be recovered immediately. Obviously you would want to recover them all as soon as possible since that first drive is probably going to bite the dust soon. Even if you do lose the first drive completely and then a 2nd drive during a rebuild, you at least may not lose everything. Any of the 40 Gb blocks which were rebuilt before the 2nd drive died would have been saved.
Getting a slightly different sized drive for an RMA can also be a problem. What if your original 250Gb drives were actually 250.3Gb and the replacement is 250 Gb even? You aren't going to fit that single 250.3 Gb partition onto the replacment drive. And are you going to call the drive manufacturer and complain that your original drives were too big?
I've had issues with this on hardware RAID. I had to back up 600Gb over the network, wipe the entire array out, rebuild it and restore the data. If it had been software RAID, I could have backed up the data from the last partition into one of the others just to be safe, resized the last one, reformatted and copied the data back.
LVM with multiple partitions would have made it even easier.
We have 4 backup servers currently all either 120gb x 8 or 200gb x 8, on anywhere from 600mhz-800mhz processors w/ 256mb ram each.. they are under heavy i/o 24/7 and have performed great. hdparm tweaks are definitly helpful. Throughout our various drive problems in the past software raid has been great to recover from. We've even managed to recover from loosing 3 drives already at once in a raid5 array w/ 1 parity and 0 spare. The systems often have a fairly high load so they are only useful as a fileserver-only type setup but work great. software raid runs incredibly stable and we've been very happy with it
http://interserver.net/
The one really cool feature that's been added to linux recently is the ability to grow your raid. My original drives at home were 120 GB each. I have been slowly buying replacement 200 GB drives for my raid set over the past few months (as my budget allows). Each time I'd buy a new drive I'd mark it as failed in the raid, shutdown linux and replace the drive, and then power back on and hot-add the new drive. After all 4 were replaced I ran the new version of mdadm with linux 2.6.8 and grew the raid set:Suddenly my raid set had grown to cover the full 200 GB of each drive. I just have to say, that is really cool!
-David
There. Now go play some cool javascript games!
What if the house burns down, you're robbed, or a tornado destroys your house? Bye bye to all your data. Don't forget you need to back up your most important data, if not the whole array.
Dedicating a 500MHz pentium to be a file server will outperform juat about all HW raid systems.
The only excuse I'd see for HW raid is if your machine is busy doing other stuff besides serving files (like if your fileserver _is_ your renderfarm) - but if that's your approach you probably have bigger problems anyway.
'maxtor rules': 118,000 hits
Not that Google searches are an accurate gauge of anything.
M
This logic doesn't hold. Let's first talk about the performance.
Also, on any reasonably modern system, the software RAID will be faster. You just have a much faster processor to do the RAID processing for you. The added overhead of the RAID5 processing is nothing compared to a 1-2GHz processor.
The actual RAID processing is relatively easy, and any RAID solution, be it hardware or software, that is worth anything will not have any trouble doing the logic (perhaps the cards mentioned are indeed not worth anything). The processing isn't your limiting factor; it is data thoughput. This is where hardware shines. A lot of extra data has to be shipping in and out to maintain and validate the RAID. This can easily saturate busses. A hardware solution allows the computer to communicate only the "real" data between itself and the hardware device, and then allows that device to take the burden of communicating with the individual drives on their own dedicated busses. Sure, that device can become overwhelemed, but I submit to you that if it does, it was poorly designed.
I am not saying that one shouldn't consider software RAID solutions. Just don't consider them because you think the performance will be better.
Now lets talk about data recovery.
I've lost 4 drives out of a 12 drive system at the same time, and Linux has let me piece the RAID back together and I've lost nothing. Was the machine down? Yes. Did I lose data? No. Compare that with a 3ware hardware RAID system where I lost 2 drives. Even thought I probably could have salvaged 99% of the data off that array, the 3ware just would not let me work with that failed array.
Let us be clear: we are talking about RAID5. In RAID5, you simply cannot lose more than one drive without losing data integrity. And it isn't like you can get back some of your files; the destruction will be evenly distributed over your entire logical volume(s) as a function of the striping methodology. So it is quite impractical to recover from this scenario. I don't know what kind of system was being employeed with this 12-drive array that can withstand a 1/3 array loss, but it certainly wasn't a straight RAID5. I can come up with some solutions that would allow such massive failure, but then we aren't comparing apples to apples. I'd be very interested in knowing what the solution was in this example case. It should also be noted that we don't know how many drives were in the system that lost 2 drives, much less what kind of RAID configuration was being used. No conclusion can be derived from the information provuded.
As an aside, more often than not, when we as individuals want a large cheap array, we are less concerned about performance than reliability. We put what we can into the drives, and we hope to maximize our data/$ investment while minimizing our chances for disaster. A software RAID5 is a good solution. Some posts have said that if you can spend so much on the drives, what's stopping you from spending on a nice hardware controller? I submit that perhaps he's broke now! And besides, a controller that can RAID5 8 drives is quite the expensive controller indeed. This has software RAID written all over it.
but where can you find a good, cheap, controller? via and intel southbridges are great, but promise controllers are really, really, flakey.
RTFM and search Google before you start bragging about your 8 250GB disks you bought.
"Hey, I just bought a $5000 B&O sound system with $6000 speakers. What do you think is best: placing my speakers to the left, the middle or more to the right. Would they produce better sound when silver-plated, or can I leave them gold-plated as they are now."
... implement the RAID-5 part of the step-by-step howto in this article. It worked great for me.
I find your ideas intriguing and I wish to subscribe to your newsletter.
Your behavior is offensive.
What is worse is that you are pretending to know something about the subject, and thereby retarding a true discussion.
The "signal ground" is important because there are wires from the power supply that allow the motherboard to control the power supply. That's the "signal". Probably it would be best not to connect those lines to the motherboard, but to install a separate switch for the hard drives.
I'm hoping someone with some experience with this will discuss it.
Also, it's partition based, not disk based (under Linux, at least). This means that with just two drives you can create one two-disk RAID-1 array (for safety) and one two-disk RAID-0 array (for performance). Just create two partitions on each drive, pair the first partition on each drive in a RAID-0 config and the second partitions as RAID-1.
You can't do a single RAID-1/0 array with only two disks though. You could try, but you wouldn't gain anything (in fact, you'd lose).
Hardare raid has reasonable performance, works as it should in simple cases, but when the shit really hits the fan, you're totally screwed.
As a hardware RAID array doesn't have a console, and no option to "ask questions" to the user, it has to automatically DO things as drives are replaced.
With Linux software raid, you end up with the option of TELLING linux what the config is, and possibly recovering some part of your data, should things go seriously wrong. In a hardware RAID, you're totally dependent on the firmware in the card to "do the right thing".
Suppose you configure 7 drives as a RAID, and the 8th as a hot spare. The firmware will mark the drives with a config version and drive number:
1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7 and hot spare 1.0
Next drive 3 breaks.
1.1, 1.2, XXX, 1.4, 1.5, 1.6, 1.7 and hot spare
1.0
and the stuff is reconfigured:
2.1, 2.2, XXX, 2.4, 2.5, 2.6, 2.7 and 2.3
If now the person handling the drives makes a mistake and removes the 4th drive: 2.4 instead of the the third:
3x.1, 3x.2, XXX, 0.0, 3x.5, 3x.6, 3x.7 and 3x.3
so now whe have a broken raidconfig: "3x". No amount of replacing 2.4 will make it fit in, as the array has determined that the raid has been broken.
If you get this far, "datarecvery" is the only thing that can help. Don't write a byte on any drive and try to get things right again. Drives that can be jumpered to "readonly" would be a help. We comercially would just make an image of all the drives and work from there....
I don't care how good your RAID is, or if it's hardware or software. I have seen lightning fry every single component in a box. RAID makes it easy to recover from individual disk failures (which probaably account for most, but not all disk failures), but I'd still be doing some form of backup. Put some of the disks elsewhere and mirror your data to completely different site (if possible).
From that perspsective (that RAID lets you treaat most hardware failures as a nuisance rather than a catastrophe), hardware RAID might be attractive.
Xix.
"Everything is adjustable, provided you have the right tools"
I bought one of these from Newegg. I had a lot of problems with it. I called Silicon Image technical support. They told me that particular chipset did not work correctly, and they would not release working firmware for it.
I told Newegg about this, but they continue to sell them.
Fry's sells them also. I told a Fry's manager that Silicon Image told me they know they don't work correctly. Fry's still sells them.
I would love to find a technically knowledgeable and honest distributor.
I've got a 4x160GB SATA software RAID-5 array (about 450Gb usable) serving up files on my home network right now, running under the 2.6 kernel.
:).
These drives are all crammed into an old Dell that was my Wintendo a couple of years ago. A few months back, the grilles on the drive-bay coolers I installed got clogged up and I lost one of the drives to overheating. Upon replacing the drive, the rebuild took the better part of an evening (but didn't need to be attended). No lost or corrupt data.
The only major problem I had was that the RAID was dirty in addition to being degraded (insert "your mom" joke here), because I brought my machine down hard before realizing what was going on. In theory, I could have done a raidhotremove on the bogus drive and brought things down normally
I ended up having to do some twiddling to get it to rebuild the dirty+degraded array. I don't remember what that was, but as long as you don't do something boneheaded like ignore kern.log messages about write errors to a specific drive, get annoyed that it's taking so long to cleanly unmount the filesystem, and hard-reset the box, that shouldn't be an issue
Speed used to be an issue. It isn't any longer. Modern CPUs can do the XOR calculation faster than most hardware based RAID controllers. Hardware's advantage is that it's easier to configure, you can boot off the array without any problems, and the OS doesn't need to be aware of the RAID.
No, you're not "done period". You'll lose a lot of data, but may still be able to recover some. Likewise when losing one disk in a RAID-0 setup.
Any file that resides entirely outside of the gap in the array can be recovered. How likely that is depends on the details of the filesystem, the striping, and the size of the file (the larger the file, the more likely that a part of it fell into the bit bucket).
Also, not all drive failures are total. You may have a RAID-5 array with one drive that completely failed, and another drive that just has some bad sectors. In that case you should be able to recover most of your data. Or you may have two disks with just a few bad sectors, which is even less bad.
This all depends on being able to force the array to allow access to the device, so that you can mount the filesystem (in read-only mode) and sift through the remains. Some (many? most?) RAID implementations may just give up if two disks in a RAID-5 array (or one disk in a RAID-0 array) are flagged as bad, in which case you really are screwed, even though your data is still there. From what people have been posting here I would guess that Linux SW RAID will let you force it, though I've never needed to try it myself.
Not quite. In my experience, bad sectors are only remapped by the drive firmware on write. Attempts to read bad sectors will return errors. This makes sense if you think about it; you might be trying to recover data, and the sector might be readable once in a hundred tries, but if you're writing to the sector, then obviously, you don't care about the data that's there already, so it's an opportune time to remap it.
--
I recently attempted to set up a software RAID mirroring scheme on my Linux box (late 2.4 kernel; I forget which and I don't have access at the moment). Because I already had data on one of the disks I wanted to use, this is the technique I used to set it up:
/dev/md0 as an array with the newly created partition and a 'missing' device /dev/md0
- partition new, empty disk to create a partition the size I wanted my mirrored array to be
- set up
- copy the data onto
- repartition the old disk
- add the partition on the old disk to the array
The system then did a rebuild, copying the data from the new partition to the old one as desired. It worked perfectly until I rebooted, at which point it forgot about the second disk.
Any suggestions what I might have done wrong?
Save yourself the trouble and don't do it.
Build yourself a bunch of mirror sets, and merge the volumes using LVM/LVM2, and a journalling filesystem.
Trust me, RAID5 corruption SUCKS FUCKING ASS.
At least with RAID 1 mirrors, I can pull half the drives and continue working.
Back in 2003, I ran a Software RAID5 setup under Redhat 8.0 which I later scrapped.
The server had four Seagate Barracuda IV 80Gb drives (RAID optimised versions) connected to a Highpoint Rocketraid 404 controller. The system was a dual Athlon SMP configuration on an ASUS A7M266-D SMP motherboard. The system had 512MB of registered DDR ECC memory
When extracting large tarballs, I would often experience CRC errors at random points within the archive.
When I compared the copy of the archive on the RAID5 filesystem with an original copy, I found differences. This really freaked me out as it may have meant that errors were being randomly introduced into newly written files.
The problem disappeared when I manually disconnected one of the drives, placing the array in degraded mode, and then recopied the original archive.
This led me to suspect that the authors of the RAID5 code in the kernel did not get the implementation of the read/reconstruction algorithm quite right or that the code had nolt been tested properly under SMP configurations. I did not have time (or the patience) to investigate this further.
I abandoned RAID5 and switched to a nested software RAID-1+0 configuration. It works, but I had a bad experience reconstructing the array when one the drives gradually started failing.
Fortunately, my workplace has set aside some money to replace this machine with a new Dell server with inbuilt hardware RAID5 and hot-swappable drive enclosures.
My final advice is: if you have the money, don't settle for second best.
One tricky bit is booting. LILO can't find your kernel if you use Software RAID 5, which leaves you in a bit of a chicken and egg scenario (you want to put your kernel on a RAID 5 partition for the same reason as everything else, presumably). What I did was buy a 16MB compact flash card and a $15 CF TO IDE adapter from Here. I then put the kernel on the CF card and used syslinux as the boot loader. Works like a charm.
Also, as others have said, you may be SOL if you're using hardware raid, the controller dies 3 years down the line, and the manufacturer isn't willing or is unable to get you a replacement. eBay can be a life saver in this situation, but having gone through that I don't care to do it again.
I'm using Software RAID 5 with 5 SCSI disks and I've been VERY happy with the performance and reliability.
Try reading other posts in this discussion.
I've scanned through about half the main posts here and haven't seen the following mentioned. Assuming you're talking about a software raid 5, you can't boot it. You need to set up your root partition on a mirrored software raid or no raid. This includes, /, /boot, /etc, /bin, and /sbin. As far as hardware raid goes, dont. Hardware IDE RAID controller drivers are notorious for their instability, so I'd strongly suggest the software raid.
/, and then another for /home, /usr, /var, and /tmp. It would be even better though if you created a seperate partition for each of those. When I'm dealing with an excess amount of disk space, I generally create a 2 gig root partition (though 1 gig should be enough). Now you're probably going to want to put this mirror'd setup on 3 of the disks (1 as a hot-spare), then that partition space across the other 5 disks for whatever else, i'll just say swap, though 10 gigs of swap is completly rediculous. Also a note on swap space, swap is an automatic RAID, so if you create 2 50 meg swap partitions, the kernel will combine them and access them similar to a raid0.
So basically the setup you're going to want is to create at least 2 partitions per disk, one for
Here's another important note. Those cheap drive's from Fry's seem to have a high failure rate. I bought 4 of the 160 Gig maxtor boxed drives from $59 each about 9 months ago from there, and within a month 1 drive failed. A friend of mine had bought a few of them too and he also had one fail within a short time. The other 3 drives for me haven't given me any problems since then though. I had set mine up on my existing workstation as a RAID 5 with an XFS filesystem on dm-crypted partitions which turned out to be a horrible combination. Whenever I had a power failure I would lose all the data due to the way XFS stored its MBR. Switching to ext3 solved this problem. Anyways, even after the disk failure though, the data was fine (didn't even notice the disk failure until about 2 months later). Oh yah, the reason I mentioned this is because if you're getting 8 cheap disks from Fry's, there'll be a good chance 2 or more of them will fail within a short period of time, so I would definitly think about using one or two of them as a hot-spare.
Anyways, for details on how to set up a software raid, check out the linux software raid howto (google it), and it'll give you step by step instructions.
I've been doing sw raid5 on maxtor max attach machines running linux. It runs great. The only thing is that you MUST follow rules of IDE software raid, 1 disk per device. Your going to need at least 4 IDE controllers if you intend to put all 8 disk in the same puter. All masters, period. Do not bother with slave disks in the array. And save yourself some trouble and use a distro that can install on RAID.
Your RAID array will not help if your machine is stolen, struck by lightning, multiple-disks fail simultaneously, and so on.
Having spent around $1000 on disks, you might want to consider putting a similar setup in another friend's house, and doing automated backups of important files, so when the unthinkable happens and your RAID array fails, you still have your most important data.
The most important thing when setting up such a server is to have sufficient cooling. I have 7 drives mounted in this server, and apart from the PSU fan I installed one extra fan. I used a midi tower case, with 4 drives installed in the top 3 5,25" slots, and 3 more (with atleast 0.5" space between them) in the 3.5" bays below. I left the top 5.25" slot and the floppy drive slot open for better ventilation (I removed the CD-ROM and floppy drive as they're not needed).
Cooling is very important, without keeping some of the slots open, temperature of the top drives could easily go above 55C, which is the max operating temp of the drives I use. Operating them above this will significantly reduce their life span. With the slots open I can keep them all below 40C.
Temperature is easily monitored with SmartMonTools. This package can also be used to run regular self tests of your drives, which will help detecting drives that are about to fail (happened to me once already and as it was within warranty I got a free replacement). I didn't lose any data because the drive was only about to fail, but hadn't failed yet when the replacement arrived. After replacing the drive, the raid array automatically reconstructed the drive I took out, working just as expected.
My advice is: If you are not sure about sofware raid5 do as I did: Try on vmware (virtual computer software). You'll be able to see if your system runs well with little of ram, lot of ram, drive recovery...
You'll be able to test anything and restore images if somethin goes wrong.
Some hardware RAID controllers can do this too - I run a server with an HP NetRAID 3i (or something) controller with five HDD's. Two are split in one RAID1 partition and one RAID0 partition, the rest are a RAID5 array.
If you need a really safe solution, stick with software RAID:
1) Linux SW-RAID is very well tested. It's very unlikely that a software bug will trash your data. HW-RAID Controllers have a firmware that can be buggy. It does not happen often, but if it does you're hosed (dataloss, no solution: closed source).
2) Consider the situation where your RAID-Controller fails. If it's an older model you won't get a replacement easily. No one guarantees that other controllers are compatible with the data format your defective controller wrote on your disks. So maybe all data is lost if you don't get an exact HW replacement.
To my mind HW-RAID has the advantage to be faster (but only with expensive controllers) and does have a battery buffered RAM which prevents dataloss in case of a power failure.
Maybe you forgot to change the partition type of the 'old partition' to RAID Autodetect? Or maybe you forgot to change the root= kernel parameter in lilo.conf or grub.conf?
HAND.
just joking, but being an expert in one area does not automatically make you an expert in another area. (Not that his advice about trusting brand names and doing you own testing wasn't good, I'm just saying...)
HAND.
I'd buy an old Sun box with hot swap drive bays and go with that. The Solaris software mirror has a 10+ year track record of being solid, and the hot swap drives mean you never have to shut down. Enough hardware for a file server can be found pretty cheap used. You can easily find a used E250 with dual CPU, drives, and plenty of memory for under $2K.
If you want to do software RAID5, expect your writes to be pretty slow on any system. Unlike a mirror that offloads all the work to the drives, the RAID5 requires CPU resources. A hardware RAID5 has a big advantage as it offloads everything from the CPU.
I've also set up a Solaris x86 system with the OS mirrored and a secondary boot, so even if one of the OS disk dies, the system can be booted and used normally. Unfortunately, the instructions on how to do that on Intel hardware isn't that good, so it took a bit of fiddling.
Secondly: do not buy Promise controllers, even the non-RAID ones. Do not buy a controller with a promise chipset. Do not pass go. You won't be able to use more than 3 cards in your computer if you do this.
Thirdly: seeing as you've already spent $1000 on your raid setup, consider spending another $1000:
- 8 drives are HOT. you will want a case that can adequately ventilate them. You'll want one that has a "drive area" up front with fans that suck the air across the drives. You're spending $200 bucks on it. Give up.
- Invest in a motherboard with a lot of PCI slots, if you're going to use multiple controllers...
- Seriously consider getting a 3ware card....
Also, as a side note, if you've bought PATA drives, for the love of god get rounded cables. Otherwise you migght as well fill your case with insulating foam and set it on fire.Yeah, I know, "software raid"... that's nice when you have 4 drives on 2 controllers. but if you're going up to 8, especially with drives of that size, you've already made an investment that a little more money won't hurt. Firstly, the controller's smart enough to not bork when the drive goes tits-up, secondly, it's also smart enought to know beforehand when that happens, and, thirdly, you're getting a controller that works well with linux, and has been rigorously tested in the configuration you'll be using it in. There's no "Oops, this chipset is too stupid to use UDMA if you add a sixth drive" option in the kernel for any 3ware controller.
http://ohlssonvox.8k.com/fdd_raid.htm
I used Linux software RAID and was very satisfied. Success depends of proper config, not all of which is immediately obvious. Some issues
You might want to consider what will happend when you want to add a hd to the array. Do you have enough space to copy over all the data when you reconstruct the array? There is a tool to resize an array but it is beta at most. I hade it fail on me and I had to restore from backup.
This is my biggest gripe with linux software raid.
are out there that are decent, and will work as simple IDE controllers?
I've had difficulty finding anything that has more than two controllers that doesn't force you to use the half-baked raid.
All I'd like is a good ata-133 controller (that's what I have, but others may want to know about sata) that actually has at least 4 IDE chanells that show up as normal IDE to the Linux kernel, rather than forcing me to use their weird raid.
It might be off topic, but it seems you could buy SATA drives and say a 3ware card for just a little bit more and get hardware raid with hot swap (and yes there are linux drivers).
I was crazy back when being crazy really meant something. (Charles Manson)
I've been doing RAID in various ways for about a decade. The hardware vs. software landscape is very different than it was a few years ago:
...) happen to work nicely for RAID calculations as well. This is why you'll see some kernels run through trials to see which of several different parity algorithms is faster on the current CPU. This combined with other tuning done in the RAID code has reduced CPU overhead to who-cares levels.
(1) Hardware RAID -- this used to be the obvious choice; why load up the main CPU doing XOR loops? However, we are now seeing a lot of 'raid' cards that are in effect little more than multi-interface cards with some code in a BIOS rom, forcing the CPU to do all the work anyways. Putting them aside -- and those will be most of the low-end cards -- the higher-end hardware RAID cards just don't provide the bang for the buck that they used to. This is because...
(2) Software RAID has improved dramatically, especially in Linux (and I presume but cannot confirm, in the BSD's). The processor instructions that were added to the CPUs to accelerate graphics (3Dnow, SSE,
The current software RAID implementation on Linux does hot sparing and rebuilds quite nicely. I haven't had a drive fail on a software RAID box, but I've simulated it, and the recovery was exactly according to spec. The only standard gotcha is booting when the boot drive has failed -- software RAID is little help there.
The ultimate solution for many systems (imho!) is LVM on top of RAID -- providing flexible partitioning, the ability to migrate to new devices, and snapshot backups in addition to the peace-of-mind of RAID-- and all for less than 3% CPU utilization.
Consider soft failures... What happens when a fan dies? Your system overheats. Your CPU begins miscalculating every nth number.
Granted, N is pretty big. But it just happened to me on my server. Things generally worked right. But 100 md5sum's on a set of RedHat ISO's turned up a 2% error rate. Generally only a couple of bits out of multiple 650 Meg images. But, you know, random file corruption really mucks everything up.
You are trying to work around bad sectors causing total disk failures. MD should create a 'bad sector table' for each drive, and when block 0 is referenced, it will write to block 9999999 instead.
And vice versa for reading. Then you don't need to do the hack you are describing.
Kashif
Many have posted about the loss of more than one drive being v. bad. So my question is, does SW RAID support RAID 6 or 7? If not, can you do 10 or 50?
Realize that this thread has come and gone, but that makes this comment approriate - RAID systems toward end of life. Dell gives warranties for effectively five years (initial three year period + 2 one year renewals), this means that their equipment actuaries see the writing on the wall rather than unquestioningly accept the 2 million hour numbers spouted by the disk drive manufacturer. Have a replacement strategy in place as you approach the end, factor in how long it will take you to transfer the data that you've accumulated during the years of successfully operation. And as an aside, my biggest problems resulted from the ON-OFF cycle. Implement a source of constantly supplied power as well as some system to actually be able to "hot swap" the drives and the cooling fans, cycling the drives to replace a failed or failing drive may push additional drives to failure.
NFS doesn't serve partitions, it serves files.
My other first post is car post.
Absolutely true, in my experience.
The fans are not balanced correctly even when they are new! We've bought 50 of one model of fan recently and all the ones we've tried, 25 maybe, are unbalanced.
A fan mounted near or on a hard drive MUST be vibration insulated. We use nylon plastic straps.