Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

In a different question about configuring a RAID array, the author is building a RAID array with 8 drives.

One answer suggests using 7 drives in RAID 5 with one left over as a hot spare. Since RAID 6 protects against two failures, even if they are concurrent, I assumed it would always be a better choice.

When would you use a hot spare instead of an extra parity drive?

share|improve this question
    
The correct answer here of course is that you should use RAID6 with a hot spare (or maybe even 2) –  Mark Henderson Nov 23 '11 at 20:41

7 Answers 7

up vote 4 down vote accepted

The only good reason for having a hot spare in my opinion is if you have several RAID-5/6 arrays and want to share the spare between them. Otherwise, it is a waste.

Many will justify use of RAID-5 + spare vs RAID-6 by performance reasons, but this performance difference is THEORETICAL. From my experience the REAL performance difference between RAID-6 and RAID-5 is negligible or non-existent. I'm talking about hardware RAID with decent controller with at least 8 drives, and system with enough memory to provide good caching. In this configuration write speed is likely be limited by SATA/SAS/SCSI bus bandwidth. So, I cannot take performance as an argument. Everything else speaks in favor of RAID-6.

share|improve this answer
    
+1: I agree. I see no reason to use RAID-5 when RAID-6 is available. Benchmark the hardware. It should be able to do RAID-6 at full speed, or nearly. –  Zan Lynx Nov 23 '11 at 8:11
    
If it's true that the practical performance difference is negligible, then the only compelling reason to use a hot spare is sharing it between several arrays. So I chose this answer. –  Nic Nov 29 '11 at 9:33

Normally, I would suggest avoiding RAID 5 in favor of RAID 10... But to answer your question, this can be a function of your application's needs and requirements, as well as the capacity of the drives.

An example of using a spare instead of dual-parity is when performance is a priority and there is little concern about rebuild time (as with high-capacity disks) or a second failure during RAID 5 rebuild.

share|improve this answer

When performance matters more then the possibility that you may lose two drives quickly. Adding a second parity, means that RAID controller, is going to have to compute that second parity. Although if I was really concerned about performance I probably wouldn't be looking at RAID5 at all.

Also, don't forget, if you are extremely paranoid you could do both RAID6 and hot spare.

Also keep in mind that RAID5 is more common, some controllers don't even support RAID6.

share|improve this answer
    
Current hardware raid controllers deliver the same speed for raid 1 as for raid 5 or raid 6. The speed penalty might have been true for software raid and when processors were slow. –  Nils Nov 22 '11 at 21:12
    
Strictly speaking there are not 2 separate parity calculations in Raid6. It is more like expanding (n-2) bits of data into (n) bits of (data+parity) using a special formula. (It's more akin to Solomon-Reed encoding actually.) These days controllers do this in highly optimized hardware so the performance hit is minimal. If you are doomed to do software-Raid then Raid5 will most likely perform better as that calculation is easier in software. –  Tonny Nov 22 '11 at 21:17
    
Actually yes there are two separate parity calculations. p is typically quickly and easily calculated (XOR) whereas q is a more complex calculation. Not that software raid6 is even considered slow on today's hardware - my laptop reports a parity calculation rate (generation, not rebuild) of 10446 MBps. –  MikeyB Nov 22 '11 at 21:22
    
+1 for your 2nd paragraph - RAID6 with hot spare is the real correct answer –  Mark Henderson Nov 23 '11 at 20:42

Assuming RAID 10 isn't an option, from a strict redundancy standpoint, I would prefer RAID 6 with a cold spare over RAID 5 with a hot spare. The odds of two simultaneous failures are low, but RAID 6 also cuts down on UREs by having better parity data.

From a performance perspective, you can't use the two interchangeably. RAID 6 has a higher write penalty than RAID 5, so your writes will suffer. Also, RAID 6 with two degraded drives in the array (2nd worst case to a complete failure) will perform miserably during a rebuild.

All things considered, if you account for the lower performance of RAID 6 and it's still an option and RAID 10 isn't an option, then I'd say go with RAID 6 and keep at least one cold spare on a shelf somewhere.

share|improve this answer

Have you performance-tested your applications against a RAID5 array running in degraded mode during a rebuild? If not, I think you would find they don't perform very well at all. In some high-i/o performance critical applications, this could mean the application is essentially down until the rebuild is complete. And with very large capacity drives, that could be a very long time. The goal should be to avoid that rebuild situation if possible.

share|improve this answer
1  
With the better raid-controllers you can adjust the rebuild-rate. On production systems with high io load they should be low. On test systems they can be high. –  Nils Nov 22 '11 at 21:17

Basically...

  • If you use raid 5+1.

  • you have a hot swap disk which is like being out of use. So... the disk is not counting work minutes. when it is going to replace another disk, then he will be like a new disk.

  • you cant be sure if the disk will be ok. If it fails when you replace a dead...
  • Raid 5+1 Write = one parity (Less cpu)
  • In case of bad disk, Raid goes in degraded mode and starts rebuild in spare disk. then you replace the spare disk

If you use raid 6

  • Disk is being in use... So disk will always be working and you will be able to monitor his health under work load.
  • Raid 6 Write = double parity (More cpu)
  • In case of bad disk, Raid goes in degraded mode and waiting for you to replace the bad disk. If second disk fails you stay on degraded but with no parity. It will start recovery when a new disk is on the raid.

In some cases of fault cause of power or Temperature in systems with bad airflow, this will make the left devices to work harder than in optimal Status raid.

Take as example Raid 5+1 with 6 disks Load is balanced to 5 disks and 1 is waiting if 1 fails then cpu gets high to recover parity to new disk

Take as example Raid 6 with 6 disks Load is balanced to 6 disks. if 1 fails then cpu is not going higher but disk goes high since load is balanced to 5. if 2 fails then cpu is not going higher again but disk goes high again since lode is balanced to 4 disk

My opinion is to use hot spare ONLY if you have more than 1 raid Volumes in same system so you will be able to use a hot spare in all raid volumes.

share|improve this answer

I go with ewwhite`s answer regarding the rebuild time issue. But when rebuild time is no issue I would use all 8 disks in the raid 5 - that will give even more speed (in normal circumstances). If one drive goes down - hot swap with a new one (this assumes the disks are hot-swappable).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.