Study guide
Technical reference and lesson notes
Purpose of This Lesson
RAID combines multiple independent storage devices into one logical storage configuration. With Amazon Elastic Block Store (EBS), RAID is configured inside the operating system running on an EC2 instance rather than through a native AWS RAID resource.
For certification scenarios, focus primarily on RAID 0 for performance and RAID 1 for redundancy. Understand what each provides, what it costs, and what happens when an underlying EBS volume fails.
Key Concepts
RAID is configured at the operating-system level
AWS does not provide a managed “RAID array” object for EBS. The general process is:
- Create multiple EBS volumes.
- Attach the volumes to an EC2 instance.
- Configure the RAID array using operating-system tools.
- Format and mount the resulting logical device.
The EBS volumes must be usable by the same EC2 instance and are normally located in the same Availability Zone. RAID does not create cross-Availability Zone protection.
RAID 0: striping for performance
RAID 0 distributes data across two or more EBS volumes. Reads and writes can be performed across multiple volumes, potentially increasing aggregate throughput and I/O performance.
Advantages:
- Improved aggregate performance compared with a single volume.
- Increased usable capacity because there is no mirroring overhead.
- Can combine multiple volumes to meet demanding throughput or IOPS requirements.
Risks and tradeoffs:
- Requires at least two volumes.
- There is no redundancy.
- Failure of one member volume makes the entire RAID 0 array unavailable and can result in loss of the array’s data.
- Backups and recovery planning remain essential.
RAID 0 is appropriate only when the workload benefits from striping and the data can be recreated or restored from another source.
RAID 1: mirroring for redundancy
RAID 1 writes the same data to two EBS volumes. If one member fails, the other contains a complete copy of the data.
Advantages:
- Provides protection against failure of one member volume.
- Maintains a complete copy of the data on each mirrored volume.
- Can reduce the risk of an outage caused by a single volume failure.
Risks and tradeoffs:
- Requires at least two volumes.
- Usable capacity is approximately the capacity of one member volume.
- Storage costs are approximately doubled for the same usable capacity.
- RAID 1 does not replace snapshots, backups, replication, or application-level disaster recovery.
EBS already provides underlying durability
EBS volumes are designed for high availability and durability within their Availability Zone, with data replicated within that zone. Consequently, RAID 1 is not automatically required for every EBS workload.
The decision depends on the workload’s availability requirements, recovery objectives, operational model, and whether the additional cost and complexity are justified. RAID 1 may still be selected for a specific operating-system or application requirement, or to provide protection from an individual EBS volume failure at the guest operating-system layer.
RAID 5 and RAID 6
RAID 5 and RAID 6 use parity and are common in some traditional physical-storage environments. They are generally not the preferred approach for EBS-based designs. Parity calculations, write overhead, and recovery behavior can add complexity without being the best fit for EBS’s managed storage model.
For exam questions involving EBS RAID, RAID 0 and RAID 1 are the primary configurations to evaluate.
Exam-Relevant Takeaways
- RAID with EBS is configured by the operating system, not through an AWS-managed RAID service.
- RAID 0 stripes data across multiple volumes for performance and capacity aggregation.
- RAID 0 has no fault tolerance: one failed member can take down the entire array.
- RAID 1 mirrors data across two volumes for redundancy.
- RAID 1 consumes roughly twice the raw storage for a given usable capacity.
- EBS volumes used in a RAID array generally need to be attached to the same EC2 instance and reside in the same Availability Zone.
- RAID does not provide cross-Region or cross-Availability Zone disaster recovery.
- Snapshots and backups are still required for recovery from corruption, deletion, or application-level failures.
- If a question emphasizes maximum throughput and the data can be reconstructed, RAID 0 is usually the relevant choice.
- If it emphasizes protection from one volume failure, RAID 1 is usually the relevant choice.
Architecture Decision Guide
| Requirement | Likely choice | Reason | Main concern |
|---|---|---|---|
| Aggregate throughput across multiple EBS volumes | RAID 0 | Stripes I/O across volumes | Any member failure can make the array unavailable |
| Protection from a single EBS volume failure | RAID 1 | Maintains two copies | Approximately double storage cost |
| Cross-AZ disaster recovery | Neither RAID 0 nor RAID 1 alone | RAID is local to the attached instance and volumes | Use snapshots, replication, or a multi-AZ architecture |
| Recovery from accidental deletion or data corruption | Neither RAID option alone | Mirroring also mirrors corruption or deletion | Use backups, snapshots, and recovery procedures |
| General EBS durability improvement without a specific requirement | Usually no RAID | EBS already provides managed durability and replication | Avoid unnecessary cost and operational complexity |
| Maximum performance for reproducible temporary data | RAID 0 | Uses parallel volumes without mirroring overhead | Data must be recoverable or disposable |
Common Exam Traps
- Confusing RAID 0 with redundancy: RAID 0 improves performance but provides no protection from disk or volume failure.
- Assuming RAID is configured in the AWS console: EBS volumes are created and attached through AWS, but the RAID array itself is assembled in the guest operating system.
- Treating RAID 1 as a backup: A mirror immediately duplicates writes, corruption, and deletion. It is not a point-in-time backup.
- Ignoring capacity overhead: Two 1-TiB RAID 1 volumes provide approximately 1 TiB of usable mirrored capacity, not 2 TiB.
- Expecting RAID to survive an Availability Zone failure: RAID members are normally within the same Availability Zone. It does not provide geographic or AZ-level resilience.
- Selecting RAID 5 or RAID 6 automatically: Traditional physical-server practices do not always translate directly to EBS. Evaluate the EBS design and the actual workload requirement.
- Forgetting the failure domain: RAID 1 can protect against a single member-volume failure, but it does not protect against loss of the EC2 instance’s Availability Zone or a failure affecting the whole application environment.
Real-World Engineer Notes
- Use RAID 0 only when the workload has a clear performance requirement and the data is reproducible, replicated elsewhere, or protected by a tested backup strategy.
- RAID 1 can be useful when an application or operating system requires local mirrored storage, but compare it with application-native replication and managed AWS services.
- Choose suitable EBS volume types and sizes before adding RAID. RAID cannot compensate for an unsuitable volume class, instance EBS bandwidth limit, or attachment limit.
- Monitor the array and its individual EBS members. A degraded RAID 1 array needs replacement and resynchronization planning.
- Test restoration from EBS snapshots. A mirror does not reduce the need to validate recovery procedures.
- Design separately for volume failure, instance failure, Availability Zone failure, and Region failure. Each requires a different resilience mechanism.
Quick Reference Summary
- Configuration layer: Guest operating system.
- RAID 0: Striping; performance and capacity aggregation; no redundancy.
- RAID 1: Mirroring; redundancy; approximately 50% raw-capacity efficiency.
- Minimum members: Two volumes for both RAID 0 and RAID 1.
- Failure behavior: One failed RAID 0 member can make the complete array unusable; RAID 1 can continue with one surviving member.
- AWS scope: RAID does not replace EBS snapshots, backups, replication, or multi-AZ architecture.
- Exam focus: Understand the tradeoff between RAID 0 performance and RAID 1 fault tolerance.
Flashcards
- Q: Where is RAID configured when using EBS volumes?
A: In the operating system of the EC2 instance. AWS provides the EBS volumes but not a managed RAID-array resource.
- Q: What is the primary purpose of RAID 0?
A: Striping data across multiple volumes to improve aggregate performance and combine capacity.
- Q: What happens if one member of a RAID 0 array fails?
A: The entire array can become unavailable because portions of the data are distributed across all members.
- Q: What is the primary purpose of RAID 1?
A: Mirroring data across two volumes to provide redundancy against a single member-volume failure.
- Q: What is the usable-capacity cost of RAID 1?
A: Approximately half of the raw capacity, because each data block is stored twice.
- Q: Does RAID 1 replace EBS snapshots?
A: No. RAID 1 provides immediate mirroring, not point-in-time recovery from corruption, deletion, or ransomware.
- Q: Does RAID provide cross-Availability Zone resilience?
A: No. RAID members are generally used within the same Availability Zone and EC2 instance context.
- Q: Which RAID level is generally associated with performance in EBS exam scenarios?
A: RAID 0.
- Q: Which RAID level is generally associated with protection from one volume failure?
A: RAID 1.
- Q: Why might RAID not be necessary for every EBS workload?
A: EBS already provides managed durability and replication, so RAID adds cost and operational complexity that may not be justified.
Practice Questions
Question 1
A batch-processing application runs on EC2 and uses temporary data that can be regenerated from an Amazon S3 dataset. The application requires higher aggregate disk throughput than one EBS volume can provide. Which design best meets the requirement?
A. Use RAID 1 across two EBS volumes.
B. Use RAID 0 across multiple EBS volumes.
C. Use RAID 1 and disable EBS snapshots.
D. Use a single EBS volume and increase its size only.
Correct answer: B
Explanation: RAID 0 stripes I/O across multiple EBS volumes and can increase aggregate performance. Because the data is reproducible, the lack of RAID 0 redundancy is acceptable. RAID 1 prioritizes redundancy and reduces usable capacity.
Question 2
A team wants to protect an EBS-hosted filesystem from the failure of one EBS volume. The application cannot tolerate an outage while a replacement volume is restored. Which configuration directly addresses this requirement?
A. RAID 0 across two EBS volumes.
B. RAID 1 across two EBS volumes.
C. An EBS snapshot created once per month.
D. A larger single EBS volume.
Correct answer: B
Explanation: RAID 1 maintains a second copy and can continue operating when one member volume fails. A snapshot supports recovery but does not necessarily provide continuous operation during a member failure.
Question 3
An architect proposes RAID 1 on EBS and claims it provides recovery if an administrator accidentally deletes important files. Which response is most accurate?
A. Correct, because RAID 1 retains the previous version of every file.
B. Correct, because the secondary volume is read-only until failover.
C. Incorrect, because the deletion is mirrored to the second volume; snapshots or backups are needed.
D. Incorrect, because RAID 1 cannot be used with EBS.
Correct answer: C
Explanation: RAID 1 is synchronous mirroring, not versioned backup. File deletion or corruption is generally reproduced on both members. Point-in-time snapshots and tested backups address this recovery scenario.
Question 4
A solution requires storage that remains available if an entire Availability Zone fails. The architect creates a RAID 1 array from two EBS volumes attached to an EC2 instance. Does this design satisfy the requirement?
A. Yes, because RAID 1 always places members in different Availability Zones.
B. Yes, because EBS automatically moves the mirror to another Region.
C. No, because RAID 1 protects against a member-volume failure but does not provide cross-AZ resilience.
D. No, because RAID 1 only works with instance store volumes.
Correct answer: C
Explanation: EBS volumes used by an EC2 instance are associated with an Availability Zone, and RAID does not create cross-AZ replication. Use an architecture involving multi-AZ deployments, snapshots, replication, or a service that supports the required failure domain.