6.2 RAID
COS2621 - Computer Organisation · 6. External Memory
RAID
Introduction to RAID
RAID stands for Redundant Array of Independent Disks. It is a technology that combines multiple physical disk drives into a single logical unit for data redundancy and performance improvement. RAID protects against data loss due to drive failures and enhances read/write speeds by distributing data across several disks.
RAID Levels
There are several levels of RAID, each with its own method of data storage and redundancy:
- RAID 0: Also known as striping, this level splits data across multiple disks without redundancy. It improves performance but offers no fault tolerance. If one disk fails, all data is lost.
- RAID 1: This level mirrors data across two disks. Each disk contains an exact copy of the data. If one disk fails, the other can continue to operate, providing data redundancy.
- RAID 5: This level uses striping with parity. Data and parity information are distributed across three or more disks. It provides fault tolerance; if one disk fails, the data can be reconstructed from the remaining disks and the parity information.
- RAID 6: Similar to RAID 5, but it uses two parity blocks, allowing for up to two disk failures without data loss.
Working Example of RAID 5
Consider a RAID 5 setup with three disks: Disk A, Disk B, and Disk C. We want to store the following data blocks:
- Block 1: A1
- Block 2: A2
- Block 3: A3
The data and parity would be stored as follows:
- Disk A: A1 | A2 | P1 (parity of A1 and A2)
- Disk B: A2 | A3 | P2 (parity of A2 and A3)
- Disk C: A3 | A1 | P3 (parity of A3 and A1)
If Disk A fails, we can recover Block 1 (A1) using the data from Disk B and Disk C along with parity P1. The recovery process can be illustrated as follows:
A1 = P1 XOR A2 (from Disk B)
Watch out: Students often confuse RAID levels. Remember that RAID 0 does not provide redundancy, while RAID 1 and RAID 5 do.
RAID in Practice
RAID is commonly used in servers and enterprise storage solutions. For example, a small business might use RAID 1 for its file server to ensure that critical data is protected against disk failures. On the other hand, a data centre might implement RAID 5 to balance performance and data protection.
Conclusion
RAID is an essential technology for data storage, providing both performance improvements and redundancy. Understanding the different RAID levels helps in selecting the right configuration for specific needs.
Check your understanding
- What is the main advantage of RAID 1 over RAID 0?
- How does RAID 5 achieve fault tolerance?
- What happens to data in a RAID 0 setup if one disk fails?
- Explain the difference between parity in RAID 5 and RAID 6.
Test yourself
5 quick questions on this lesson. Pick an answer to see if you're right.
1. Which of the following are characteristics of Blu-ray DVDs? a. They can store more than 20 GB per side. b. They have slightly more storage density than normal DVDs. c. They use a short wave-length 405 nm laser. d. They use a red-blue laser. e. There are two versions available: read-only (BD-ROM) and recordable many (BD-M).
2. What is the primary disadvantage of RAID 0?
3. Which of the following are characteristics of Blu-ray DVDs
4. Which RAID level uses striping with two parity blocks for fault tolerance?
5. In a RAID 5 configuration, how many disk failures can occur without data loss?