The RAID combines two or more physical drives into a logical unit presented as a single hard drive to the operating system. There are currently six basic RAID levels: RAID 0, RAID 1, RAID 0+1, RAID 1+0, RAID 3, RAID 4, RAID 5 and RAID 6.
The scope of this article is to provide basic information for the levels RAID 5 and RAID 6 and to compare them from point of view of performance and security.
Hot spare is a drive that acts as a stand by drive in RAID 1, RAID 5 or RAID 6 volume. It is fully functional drive that contains no data and is not used during normal operation. If a drive from the volume fails, the controller reconstructs the data from the failed drive to the hot spare drive.
A RAID 5 array is designed to protect against the failure of a single disk within the array. Because of the way that RAID 5 works, the total capacity of one disk is lost to overhead. If, for example, a RAID 5 array contained five 10TB disks, then the array’s usable capacity would be 40TB.
A RAID 5 (with Hot Spare disk) array can be configured to treat one of the disks as a hot spare. Then one of the disks is reserved as a replacement in the event that a disk fails. For the above example with five 10TB disks, this would decrease the example array’s usable capacity to 30TB.
A RAID 6 array is designed to protect against two simultaneous disk failures. However, the price for this extra protection is that two disks' worth of capacity is lost to overhead. As such, a RAID 6 array made up of five 10TB disks would have a usable capacity of 30TB because 20 TB is lost to overhead.
The performance during Normal Operation is measured in IOPS (Input/output operations per second) and as a sum for all the disks (excluding the Hot Spares and decreased for writing parity data) in the array. As a rule of the thumb, the higher the overhead associated with writing parity data (in the above example RAID 5 with Hot Spare causes the same overhead like RAID 6) the lower the IOPS.
The reason for implementing RAID arrays is to secure the data. The level of protection does not directly correlate with the overhead. From the above example both RAID 5 with Hot Spare and RAID 6 have same capacity, but offer different level of protection. In case of failure of RAID 5 array with Hot Spare, the Hot Spare is activated and the rebuild process start immediately. The system can recover from a single disk failure and during the recovery, process is vulnerable to second disk failure. Therefore, RAID 5 and RAID 5 with Hot Spare disk offer the same level of protection – single disk failure. In contrast, if a disk fails at RAID 6 array, the recovery will start only after the faulty disk is replaced manually. However, if during the recovery process second disk fails, the RAID 6 array will stay functional.