LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 06-07-2005, 10:22 AM   #1
Hamsjael
Member
 
Registered: Aug 2003
Location: Vejle, Denmark
Distribution: Mainly Debian, some Fedora for the bleeding edge fix
Posts: 92

Rep: Reputation: 15
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

thanks

Brian
 
Old 06-07-2005, 05:10 PM   #2
Electro
Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
Read the comments at http://ask.slashdot.org/article.pl?s...&tid=4&tid=106

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.
 
Old 06-08-2005, 01:06 PM   #3
Hamsjael
Member
 
Registered: Aug 2003
Location: Vejle, Denmark
Distribution: Mainly Debian, some Fedora for the bleeding edge fix
Posts: 92

Original Poster
Rep: Reputation: 15
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.
 
Old 06-08-2005, 03:42 PM   #4
Electro
Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
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.

http://www.pcguide.com/ref/hdd/perf/...eLevel5-c.html
 
Old 06-08-2005, 04:02 PM   #5
Hamsjael
Member
 
Registered: Aug 2003
Location: Vejle, Denmark
Distribution: Mainly Debian, some Fedora for the bleeding edge fix
Posts: 92

Original Poster
Rep: Reputation: 15
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.
 
Old 06-08-2005, 04:50 PM   #6
Electro
Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
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.
 
Old 06-09-2005, 08:11 AM   #7
Hamsjael
Member
 
Registered: Aug 2003
Location: Vejle, Denmark
Distribution: Mainly Debian, some Fedora for the bleeding edge fix
Posts: 92

Original Poster
Rep: Reputation: 15
Lightbulb

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.
 
Old 06-09-2005, 07:59 PM   #8
Electro
Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
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.
 
Old 06-15-2005, 04:05 AM   #9
monsted
LQ Newbie
 
Registered: Jun 2005
Posts: 1

Rep: Reputation: 0
Wrong.

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


Last edited by monsted; 06-15-2005 at 04:08 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Software RAID5 - poor write performance & freezing Nitrowolf Linux - Hardware 3 09-25-2005 09:49 PM
Software RAID5: HDD lights always on vapspwi Linux - Hardware 3 09-22-2005 10:25 PM
Filesystem corruption on software RAID5 drkdiggler Linux - General 6 02-23-2004 08:39 PM
adding new hd in raid5 software slack66 Linux - Hardware 1 08-27-2003 12:29 PM
disasters saved acid_kewpie General 7 01-29-2002 04:08 AM


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

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