Linux Labs

Storage / Stage 5 of 12

RAID 1: a disk has failed

Not running Starting usually ~20 s
Leave the lesson

Step 7 of 8 · lab · 25 minmedium

A mirror on one disk

Monitoring reported that the mirror with the accounting documents runs without one disk. The failed disk has been pulled out and a new one attached. Give the array its second disk back so that it also assembles with both after a reboot.

Situation

The accounting documents live in /srv/docs — on the RAID 1 mirror /dev/md0 of two disks. At night monitoring sent DegradedArray: the array runs without one disk. The failed disk has already been pulled out and a new, empty one attached instead. The machine also has a disk with last year's archive attached — it is not mounted, and it must not be touched.

Task

Give the array its second disk back:

  1. The array is clean, both disks are active (2 of 2), the rebuild is over.
  2. The second disk of the array is the new empty disk, the archive on another disk is intact.
  3. /srv/docs is mounted from the array, the documents are intact.
  4. The array line in /etc/mdadm/mdadm.conf matches the current array.
  5. After a reboot the array assembles by itself with both disks.

Once the array has been rebuilt, reboot the machine (sudo reboot) and press "Check": the check looks at how the array was assembled at boot. "Check" waits for the rebuild by itself.

The array state — cat /proc/mdstat, the details — sudo mdadm --detail /dev/md0. There is no internet on the machine.

Lab · on your own

No commands are given in this lab: type them in the terminal yourself. Goals are checked on the machine after every command.

Goals

0 of 5
  • The documents array is clean, both disks are active (2 of 2), the rebuild is over — not done yet
  • The second disk of the array is the new empty disk; the archive on another disk is intact — not done yet
  • /srv/docs is mounted from the array, the documents are intact — not done yet
  • The array line in /etc/mdadm/mdadm.conf matches the current array — not done yet
  • After a reboot (sudo reboot) the array assembles by itself with both disks — not done yet
Ctrl+Enter
Starts the machine node1 · Ubuntu 24.04

The machine is starting

Hints

0 of 3

Lab goals

0 of 5
  • The documents array is clean, both disks are active (2 of 2), the rebuild is over — not done yet
  • The second disk of the array is the new empty disk; the archive on another disk is intact — not done yet
  • /srv/docs is mounted from the array, the documents are intact — not done yet
  • The array line in /etc/mdadm/mdadm.conf matches the current array — not done yet
  • After a reboot (sudo reboot) the array assembles by itself with both disks — not done yet
node1 Ubuntu 24.04

Lab goals

0 of 5
  • The documents array is clean, both disks are active (2 of 2), the rebuild is over — not done yet
  • The second disk of the array is the new empty disk; the archive on another disk is intact — not done yet
  • /srv/docs is mounted from the array, the documents are intact — not done yet
  • The array line in /etc/mdadm/mdadm.conf matches the current array — not done yet
  • After a reboot (sudo reboot) the array assembles by itself with both disks — not done yet
Loading…