-
-
Notifications
You must be signed in to change notification settings - Fork 1
Linux RAID
Mattscreative edited this page Dec 5, 2025
·
2 revisions
Complete beginner-friendly guide to RAID configuration on Linux, covering Arch Linux, CachyOS, and other distributions including software RAID setup, RAID levels, and RAID management.
Common RAID levels:
- RAID 0: Striping (performance, no redundancy)
- RAID 1: Mirroring (redundancy, 50% capacity)
- RAID 5: Striping with parity (redundancy, 1 disk parity)
- RAID 6: Double parity (redundancy, 2 disk parity)
Choose based on:
- Performance: RAID 0
- Redundancy: RAID 1, 5, 6
- Capacity: RAID 0, 5, 6
Install RAID tools:
# Arch/CachyOS
sudo pacman -S mdadm
# Debian/Ubuntu
sudo apt install mdadm
# Fedora
sudo dnf install mdadmLoad RAID module:
# Load module
sudo modprobe raid456
# Make permanent
echo "raid456" | sudo tee -a /etc/modules-load.d/raid.confCreate RAID 1:
# Create RAID 1
sudo mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sda1 /dev/sdb1
# Check status
cat /proc/mdstatCreate RAID 5:
# Create RAID 5
sudo mdadm --create /dev/md0 --level=5 --raid-devices=3 /dev/sda1 /dev/sdb1 /dev/sdc1Format RAID:
# Format
sudo mkfs.ext4 /dev/md0
# Mount
sudo mount /dev/md0 /mnt/raidCheck status:
# Check status
cat /proc/mdstat
# Detailed info
sudo mdadm --detail /dev/md0Add disk to RAID:
# Add disk
sudo mdadm --add /dev/md0 /dev/sdc1
# Grow array
sudo mdadm --grow /dev/md0 --raid-devices=3Replace failed disk:
# Remove failed disk
sudo mdadm --remove /dev/md0 /dev/sda1
# Add new disk
sudo mdadm --add /dev/md0 /dev/sdd1This guide covered RAID for Arch Linux, CachyOS, and other distributions, including setup, management, and troubleshooting.
- Filesystem Management - Filesystem setup
- LVM - LVM setup
- Backup and Restore - Backups
- ArchWiki RAID: https://wiki.archlinux.org/title/RAID
This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.