Linux Labs

Storage / Stage 5 of 12

RAID 1: a disk has failed

Not running Starting usually ~20 s
Leave the lesson

Step 6 of 8 · on a machine · 4 min

A second mirror

A new array needs the same file: it is created and recorded in mdadm.conf right away.

mdadm --create (in the Wiki) builds an array: the device name, the level, the number of disks and the disks themselves. Before creating it, mdadm warns that an array with metadata at the start of the disk may not suit /boot and asks Continue creating array? — for a data array answer y. The --run option answers the question by itself.

bash
sudo mdadm --create /dev/mdN --level=1 --raid-devices=2 DISK1 DISK2

The application's logs need a second mirror, and mdadm.conf already lists the data array.

Exercise · do it

Build a second mirror

The logs need a second mirror. Build a RAID 1 array /dev/md1 from the new disks /dev/loop3 and /dev/loop4 and record it in /etc/mdadm/mdadm.conf, which already holds a line for the md0 array.

Sign in and start The machine is available after signing in

Goals · 0 of 2

  • Build the md1 mirror from the two new disks not done yet
  • Record the new array in mdadm.conf not done yet

Step goals

0 of 2
  • Build the md1 mirror from the two new disks — not done yet
  • Record the new array in mdadm.conf — not done yet
Ubuntu 24.04

Step goals

0 of 2
  • Build the md1 mirror from the two new disks — not done yet
  • Record the new array in mdadm.conf — not done yet
Loading…