Linux Labs EspañolES

Storage: disks, LVM and RAID Labs

Simulated: replace a failed RAID 1 member

Practitioner12 minSimulated terminalRHEL and Debian families

Objective

md0 is back to [UU] and mdadm reports it clean, using the new disk that was already installed.

Requirements

  • Runs in the simulated terminal below. The replacement disk is /dev/sdd, already partitioned like the healthy member.

Steps

  1. Read /proc/mdstat and mdadm --detail to find the failed member.
  2. Remove the failed member from md0.
  3. Add the partition of the new disk and follow the rebuild.
  4. Confirm the clean state.
Simulated terminal
The simulated terminal needs JavaScript.

Not solved yet. Fix the problem, then run the verification commands.

This is a simulation in your browser. It accepts the common forms of each command. The output imitates a real server.

Verification

bash
cat /proc/mdstat
mdadm --detail /dev/md0
Show the solution
bash
cat /proc/mdstat
mdadm --detail /dev/md0
mdadm --manage /dev/md0 --remove /dev/sdb1
mdadm --manage /dev/md0 --add /dev/sdd1
cat /proc/mdstat      # recovery in progress
cat /proc/mdstat      # [UU]
mdadm --detail /dev/md0