Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Mainly Debian, some Fedora for the bleeding edge fix
Posts: 92
Rep:
Software RAID5 disasters
Hi
Does anybody have any realworld experince running RAID5 in software on a Linux system? I know how to configure it, and i know what it is supposed to do. But i would like to know how the system handles it if one of the disks suddenly dies.
Im running a mailserver, and i am thinking of setting it up with RAID5 on three ordinary IDE (PATA) disks. But if the whole thing comes crashing down anyway if one of the disks dies, its hardly worth the hassle.
There is a lot of speculation on the net, but im looking for a "real" story, and i havent got the cash to bash one of my disks against the wall to see what happens
If a drive dies in a RAID 5, the array will be much slower calculating the parity information. I think the best way and probably the safetiest way is remount it as read-only until you can put in a replacement drive. You can setup a big shmfs to store the incomming mail until you replace the dead drive and the array has finish recreating the lost data on the new hard drive.
Using three hard drives for RAID 5 will just crash the array if a hard disk dies. There is no reduntancy. You need at least four hard drives to provide you the reduntancy that RAID 5 provides. PATA has no hotswapping, so you have to first stop the mail service, umount the drive, stop the RAID array, and then power down to remove the dead drive. All of this can take 10 minutes if you are ready to replace the drive. I suggest using SATA or SCSI.
I have not setup RAID, but I have read almost everything about it.
Distribution: Mainly Debian, some Fedora for the bleeding edge fix
Posts: 92
Original Poster
Rep:
Thanks for the great link, i will look into it.
It's just kind of hobby server with some friends, colleagues, and relatives using it so far. so i will just use the hardware at hand for it.
I have been runnning software RAID0 on my desktop machine for years now (reiserfs) and it works flawlessly.
btw, you do only need three drives for RAID5 unless you want a hot spare running.
You need three drives to keep a RAID 5 array running. No, the fourth one is not hotspare. If you use four drives, one drive can go and the RAID 5 array will still be up.
Distribution: Mainly Debian, some Fedora for the bleeding edge fix
Posts: 92
Original Poster
Rep:
hmm, im not sure if we mean the same thing, but RAID5, by definition is fault tolerant. This is because parity is calculated and written to one, and only one spare disk. to perform these calculations we need as a minimum 2 more disks beside the one with the parity information (i know the parity is spread across all disks) three disks in all as a minimum.
If you use three disks, one can burn and the remaining will keep running (in theory)
If you use four or five or thirty disks, its the same situation: one (and only one) can burn and the rest will keep the filesystem running.
You are not understanding RAID 5. You need a MINIMUM of 3 drives for RAID 5. If a drive goes, the three drive array will fail or will not function until you add a replacement. You then have to shutdown the computer and replace the failed drive. Hopefully, the RAID array will reconstruct the data from the parity informaton and store it on the replacement drive.
You can use four drives for the RAID 5 array and then on the side have additional drives (hotspares) being connected. When one of the four drive fails, you can use the hotspares to replace the dead drive on the fly.
Distribution: Mainly Debian, some Fedora for the bleeding edge fix
Posts: 92
Original Poster
Rep:
There is NO redundancy advantage if you run four insted og three drives. On the contrary your risk of one drive that fails is greater the more drives you have in the array.
I think that it is you that do not understand RAID 5!! One, and ONLY one disk is allowed to fail in a RAID 5 It doesnt matter whether you have three or thirty disks. If one Fails the rest will reconstruct missing data on the fly. Of course this is a performance hit. But it will work the same way no matter how many disks you have, as long as there is at least THREE disks.
There is a low chance that two drives will fail at the same time in a 4 disk array for RAID 5.
There is a reduntancy advantage with four disk vs three disk in RAID 5. Again, if a drive fails in a four disk RAID 5 array, this array will still keep on going. With a three disk RAID 5 array, the array will stop to function, not actually failing, until you add a drive to replace the dead drive. A mail server needs to be up 24/7. A four disk RAID 5 array will provide this. However no RAID level is fault tolerable, so back-up is needed.
You can setup RAID 5+1 or two RAID 5 and mirror them. This will really bog down the computer and make it useless. You can go with RAID 6 if you feel you are up to it. RAID 6 is in its experimental stages.
I forgot to mention that a software RAID 5 needs multi-processor system.
You have to count on how many queues a PATA drive can handle. PATA can only handle one queue while SCSI and SATA can handle multiple queues. RAID 1 provides multple queues when it is in read state.
If you really want reduntancy use three disk in RAID 1. Anyway, why you need speed (throughput) and capacity for mail?
BTW, if you read something about RAID 0, RAID 5, or other stripping RAID level as being parallelism, this is not true. Parallelism is how many files it can read at once from the disk. RAID 1 provides parallelism.
RAID5 is secure with three drives. It uses two for data, one for parity. When you scale it to many (most storage systems i've seen stop at 16) drives in a single RAID5 set, it still uses only one for parity, the rest for data.
In theory, RAID5 would work fine with two drives, but in practice it's the same as mirroring with twice the IOs to perform a single write.
RAID6 is basically double-parity RAID5, but is hardly mature enough for production.
You'll be fine with software RAID on any sort of hardware, be it PATA, SATA or SCSI, as well as on any sort of CPU as long as you've got enough CPU left for the actual work you want to do.
[EDIT] I forgot to mention that three-disk mirroring/raid1 is rarely supported or actually useful. Using three-disk RAID5 or two-disk mirroring is the norm for this kind of thing. If your application is very write intensive, go for mirroring as writing is the kind of work that really taxes a raid5 setup.
--
/Jesper, who works with about 250 TB of RAID5 protected storage
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.