Step 7 of 8 · lab · 25 min
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:
- The array is
clean, both disks are active (2 of 2), the rebuild is over. - The second disk of the array is the new empty disk, the archive on another disk is intact.
/srv/docsis mounted from the array, the documents are intact.- The array line in
/etc/mdadm/mdadm.confmatches the current array. - 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
The machine is starting
Hints
0 of 3Lab 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
Goals are checked on the machine after every command.