Lab activity

RAID Configuration

Learn how to configure and manage software RAID on Linux using mdadm, including RAID 1 mirroring, RAID 5 with parity, array monitoring, simulated disk failure, and recovery.

Overview

In this lab, you will learn how to configure software RAID on Linux using mdadm and virtual disk images that simulate physical drives. You will create a RAID 1 mirrored array and format it with ext4, mount the array, and verify data availability. You will then simulate a disk failure, inspect the degraded array, remove and re-add the faulty device, and observe re-synchronization. Finally, you will create a RAID 5 array and inspect its configuration and status.

Learning Outcomes

  • Install mdadm and prepare virtual disk images using loop devices.
  • Create and inspect a RAID 1 array using mdadm --create and mdadm --detail.
  • Format a RAID array with ext4, mount it, and create test files.
  • Monitor RAID synchronization and array health using /proc/mdstat.
  • Simulate a disk failure and inspect the array's degraded state.
  • Remove a faulty device from a RAID array and add it back to observe recovery behavior.
  • Create and inspect a RAID 5 array using three simulated disk devices.

Key Concepts

  • Software RAID: Manage redundant storage arrays using Linux software RAID tools.
  • RAID 1: Mirror data across two devices to provide redundancy.
  • RAID 5: Distribute data and parity across at least three devices to provide fault tolerance.
  • Array monitoring: Inspect RAID configuration, synchronization, and device status using mdadm and /proc/mdstat.
  • Degraded arrays: Understand how a RAID 1 array behaves when a member device is marked faulty.
  • Device replacement and recovery: Practice removing and re-adding a device to observe recovery and re-synchronization.
  • Filesystem integration: Format and mount a RAID device with ext4 and verify that test data remains readable after a simulated failure.

Why Needed?

  • Software RAID helps Linux administrators implement storage redundancy and improve resilience to disk failures.
  • Understanding RAID levels helps administrators select suitable storage configurations for different requirements.
  • Monitoring array health and practicing recovery procedures helps build confidence in storage troubleshooting.
  • These hands-on exercises develop practical storage administration skills relevant to LFCS preparation and real-world Linux environments.