Arch Linux RAID - ryzendew/Linux-Tips-and-Tricks GitHub Wiki
Arch Linux RAID Guide
Complete beginner-friendly guide to RAID configuration on Arch Linux, including software RAID setup, RAID levels, and RAID management.
Table of Contents
Understanding RAID
RAID Levels
Common RAID levels:
- RAID 0: Striping (performance)
- RAID 1: Mirroring (redundancy)
- RAID 5: Striping with parity
- RAID 6: Double parity
RAID Setup
Install mdadm
Install RAID tools:
# Install mdadm
sudo pacman -S mdadm
# Load module
sudo modprobe raid456
Create RAID Array
Create RAID 1:
# Create RAID 1
sudo mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sda1 /dev/sdb1
# Check status
cat /proc/mdstat
Format and Mount
Format RAID:
# Format
sudo mkfs.ext4 /dev/md0
# Mount
sudo mount /dev/md0 /mnt/raid
RAID Management
Monitor RAID
Check status:
# Check status
cat /proc/mdstat
# Detailed info
sudo mdadm --detail /dev/md0
Add Disk
Add to array:
# Add disk
sudo mdadm --add /dev/md0 /dev/sdc1
# Grow array
sudo mdadm --grow /dev/md0 --raid-devices=3
Troubleshooting
Failed Disk
Replace disk:
# Mark as failed
sudo mdadm --fail /dev/md0 /dev/sda1
# Remove
sudo mdadm --remove /dev/md0 /dev/sda1
# Add new
sudo mdadm --add /dev/md0 /dev/sdd1
Summary
This guide covered RAID setup, management, and troubleshooting.
Next Steps
- Arch Linux Filesystem Management - Filesystems
- Arch Linux LVM - LVM
- ArchWiki RAID: https://wiki.archlinux.org/title/RAID
This guide is based on the ArchWiki. For the most up-to-date information, always refer to the official ArchWiki.