Linux Labs

Storage / Stage 5 of 12 · step 7 of 8

A mirror on one disk

medium ~25 min
Not running Starting usually ~20 s
Report a problem

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.

Visible only to you. Saved as you type.

All notes

Lab goals

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

Hints

0 of 3 open · they open one at a time
Hint 1
Show the solution after 3 failed checks

Leave the lab?

The machine keeps running for 10 more minutes, then it is removed. Files are lost; completed goals stay.

Loading…