Files
docudjeex/content/2.general/2.storage/1.raid.md
2025-07-20 17:49:48 +00:00

113 lines
4.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
navigation: true
title: RAID
main:
fluid: false
---
:ellipsis{left=0px width=40rem top=10rem blur=140px}
# RAID
_Redundant Array of Independent Disks_
In computing, RAID (Redundant Array of Independent Disks) is a system that allows multiple hard drives to be combined to improve performance and/or reliability. It works by restructuring and distributing data blocks across the drives.
Originally, RAID systems were hardware-based, meaning a dedicated controller (a specific chip) managed data distribution and RAID operations. Today, most RAID systems (or their equivalents) are software-based. In fact, many software technologies can create RAID-like systems with features not available in hardware RAID, such as automatic repair (data scrubbing), snapshots, and more.
## Different Types of RAID
There are several types of RAID, each offering its own pros and cons. In general, RAID impacts the following five factors:
- Number of drives
- Total storage capacity
- Read speed
- Write speed
- Fault tolerance (resistance to hardware failure)
::alert{type="warning"}
:::list{type="warning"}
- RAID is not a backup system but a service continuity system! It only allows hot-swapping of drives without interrupting your server or restoring from backup. You still need an external backup system.
::
### No RAID
---
<div style="display: flex; align-items: center;">
<img src="/img/global/no-raid.svg" alt="Image" style="max-width: 30%; max-height:230px; margin-right: 20px;">
<ul>
<li>Just your disks, without RAID. Data is stored disk by disk.</li>
<li>If you lose a disk, only its data is lost.</li>
<li>Total capacity is the sum of all disks.</li>
</div>
Use your disks without RAID when you're not afraid of data loss and can tolerate service interruptions between failure and backup restoration.
### RAID 0
---
<div style="display: flex; align-items: center;">
<img src="/img/global/raid0.svg" alt="Image" style="max-width: 30%; max-height:230px; margin-right: 20px;">
<ul>
<li>OS sees 1 drive.</li>
<li>Data is striped across all disks.</li>
<li>If you lose one disk, you lose all data.</li>
<li>High read and write performance (multiplied by number of disks).</li>
<li>Total capacity is the sum of all disks.</li>
<li>Minimum of 2 disks required.</li>
</div>
Use RAID 0 when you prioritize performance and are not concerned about data loss. Ideal for temporary, high-speed storage (video editing, AI workloads, etc). Not suitable for long-term storage, as one failure means total data loss.
### RAID 1
---
<div style="display: flex; align-items: center;">
<img src="/img/global/raid1.svg" alt="Image" style="max-width: 30%; max-height:230px; margin-right: 20px;">
<ul>
<li>OS sees 1 drive.</li>
<li>All disks contain identical data.</li>
<li>You can lose all but one disk.</li>
<li>Improved read speed (scales with number of disks).</li>
<li>Total capacity is equal to one disk (e.g., 2×10TB = 10TB).</li>
<li>Minimum of 2 disks required.</li>
</div>
Use RAID 1 for strong redundancy. Each disk contains all data, so performance remains unaffected during a failure. Once failed disks are replaced, data is quickly restored. However, usable storage is limited to one disks capacity, making it an expensive solution.
::alert{type="success"}
:::list{type="success"}
- __Tip:__ You can combine RAID 1 with other RAID types to create mirrored arrays.
:::
::
### RAID 5
---
<p align="center">
<img src="/img/global/raid5.svg" alt="Image" style="max-width: 40%; margin-right: 20px;">
</p>
- OS sees 1 drive.
- Data is striped with parity blocks for redundancy.
- You can lose 1 disk and recover data.
- Improved read speed (scales with number of disks).
- Total capacity is the sum of all disks minus one (e.g., 3×10TB = 20TB).
- Minimum of 3 disks (4 recommended to reduce capacity loss).
Use RAID 5 when you want reliable storage with 3 to 5 disks and minimal space loss. It tolerates one disk failure but may have degraded performance during recovery, which can take days.
### RAID 6
---
<p align="center">
<img src="/img/global/raid6.svg" alt="Image" style="max-width: 50%; margin-right: 20px;">
</p>
- OS sees 1 drive.
- Data is striped with dual parity blocks.
- You can lose 2 disks and still recover data.
- Improved read speed (scales with number of disks).
- Total capacity is the sum of all disks minus two (e.g., 4×10TB = 20TB).
- Minimum of 4 disks (6 recommended to minimize space loss).
Use RAID 6 in similar situations as RAID 5, especially with 6 or more disks. More disks mean higher failure risk. RAID 6 offers peace of mind by tolerating two simultaneous failures.
## Software RAID
(coming soon)