Sub topic 10
RAID 1: Mirroring for Redundancy
This chapter assumes you know what striping, mirroring, and parity mean at a basic level, and that you have read the RAID 0 chapter. It covers how RAID 1 works, what it costs, how it fails, and how it appears on the A+ Core 1 exam.
What RAID 1 does
RAID 1 writes every block of data to two drives at the same time. Each drive holds a complete, identical copy of the data. The pair is called a mirror, and the controller presents it to the operating system as one volume.
If one drive fails, the other still has everything. The volume stays online. The user may notice nothing except a warning from the controller or the operating system.
The key facts for the exam:
- Minimum drives: 2. A classic RAID 1 uses exactly 2.
- Fault tolerance: one drive can fail without data loss.
- Usable capacity: the size of one drive.
- Overhead: 50 percent of the raw capacity is spent on the copy.
How reads and writes behave
Writes must reach both drives, so write speed is about the same as a single drive. The controller does extra work, but the two writes happen in parallel. Some software implementations are slightly slower.
Reads can be faster. A good controller can serve different read requests from different drives at once. Many simple implementations read from only one drive, so do not assume a speedup. On the exam, the safe summary is: reads may improve, writes do not.
| Property | RAID 1 behavior |
|---|---|
| Minimum drives | 2 |
| Fault tolerance | 1 drive |
| Usable capacity | Size of one drive |
| Read performance | Same as, or better than, one drive |
| Write performance | About the same as one drive |
| Cost per usable TB | High (twice the drives needed) |
Capacity: the smaller drive wins
A mirror can only be as large as its smallest member. If you pair a 2 TB drive with a 1 TB drive, the controller mirrors 1 TB and the extra 1 TB is wasted. For best results, use two drives of the same size, and ideally the same model.
The capacity formula from the capacity chapter reduces to one line for RAID 1:
def raid1_usable_tb(drive_sizes_tb):
"""Return usable capacity in TB for a RAID 1 mirror."""
if len(drive_sizes_tb) != 2:
raise ValueError("A classic RAID 1 uses exactly 2 drives")
return min(drive_sizes_tb)
print(raid1_usable_tb([2, 2])) # 2
print(raid1_usable_tb([2, 1])) # 1What happens when a drive fails
A failed mirror is called a degraded array. The volume still works, but it has no redundancy. A second failure at this point loses the data.
The recovery steps are:
- Notice the failure. Controllers report it through an LED, an alert, or management software.
- Identify which physical drive failed. Check the controller utility rather than guessing, because pulling the healthy drive breaks the array.
- Replace the failed drive with one of equal or greater capacity.
- Let the controller rebuild. It copies all data from the surviving drive to the new one.
- Confirm the array returns to a healthy state.
The rebuild is a simple copy, which makes RAID 1 easier to recover than parity-based levels. The surviving drive still works hard during the rebuild, though. If it is the same age and model as the failed drive, it is at elevated risk. That is one reason to keep the degraded window short.
A hot spare, covered in a later chapter, lets the controller begin the rebuild automatically without waiting for a technician.
What RAID 1 does not protect against
Mirroring copies everything faithfully, including mistakes. These problems hit both drives:
- Accidental deletion of a file.
- Ransomware that encrypts files.
- Corruption caused by software bugs.
- Fire, theft, or a power surge that damages both drives.
- Controller failure, in some cases.
For these reasons RAID 1 is not a backup. The dedicated chapter on that topic expands on this.
Where RAID 1 is used
RAID 1 suits small systems where uptime matters and capacity needs are modest:
- Operating system boot drives in servers.
- Small business file servers or workstations.
- Systems with exactly two drive bays.
- Situations that need simple, fast recovery.
It is a poor choice when you need maximum capacity per dollar or maximum write speed. RAID 5 or RAID 10 fits those cases better.
Checking a mirror in practice
On Linux with software RAID (mdadm), you can read the array state from the kernel:
cat /proc/mdstatA healthy two-drive mirror shows [UU]. A degraded one shows [U_] or [_U], where the underscore marks the missing drive. During a rebuild, the output includes a progress percentage.
Common mistakes
- Treating a mirror as a backup, then losing data to a deletion or ransomware.
- Mixing drive sizes and expecting the full capacity of both.
- Pulling the wrong drive from a degraded array.
- Ignoring a degraded warning for weeks, then losing the second drive.
- Replacing a failed drive with a smaller one, which the controller will reject.
Exercises
Exercise
A technician installs two 4 TB drives and a 2 TB drive as RAID 1 members: the mirror is built from one 4 TB drive and the 2 TB drive. How much usable capacity does the volume have, and how many drive failures can it survive?
Show answer
The usable capacity is 2 TB, because a mirror is limited by its smallest member. It can survive one drive failure. The extra 2 TB on the larger drive is unused.
Exercise
A server with a RAID 1 boot volume reports a degraded array. The technician replaces the failed drive. Name what the controller does next, and why the array is still at risk until that step finishes.
Show answer
The controller rebuilds the mirror by copying all data from the surviving drive to the new drive. Until the copy completes there is only one good copy of the data, so a failure of the surviving drive would cause data loss.
Exercise
A user's files on a RAID 1 volume were encrypted by ransomware. Explain why the mirror did not help, and name what would have.
Show answer
RAID 1 writes every change to both drives, so the encrypted files were copied to the mirror immediately. A separate, versioned backup stored offline or off-site would have allowed recovery.