A company runs a database server on Linux with a 4-disk RAID 10 array using mdadm. The server recently experienced a power outage. After reboot, the array is not assembling automatically. The administrator runs `mdadm --assemble --scan` and it fails with a message: 'mdadm: /dev/md0 has been found but is not a valid md superblock.' The administrator checks /proc/mdstat and sees no arrays. The disks /dev/sda, /dev/sdb, /dev/sdc, /dev/sdd are present. Running `mdadm --examine /dev/sda` shows no md superblock, but the disk contains data partitions. The administrator suspects that the superblock may be corrupted or that the disks were accidentally overwritten. The administrator has documentation that the array was created with the following parameters: RAID level 10, 4 disks, chunk size 512 KiB, metadata 1.2. What is the best course of action to recover the array?
--assume-clean writes new superblocks but does not modify data areas, preserving data.
Why this answer
Option D is correct because when the md superblock is missing or corrupted on all disks (as confirmed by `mdadm --examine` showing no superblock), the only way to recover the array is to recreate it with `--assume-clean`. This tells mdadm to trust that the data on the disks is already in a consistent RAID 10 layout without performing an initial resync, which would overwrite the existing data. The parameters must exactly match the original creation (RAID 10, 4 disks, chunk 512 KiB, metadata 1.2) to reconstruct the correct data mapping.
Exam trap
The trap here is that candidates mistakenly think `--create` always destroys data, but with `--assume-clean` it reconstructs the metadata without overwriting existing data, making it the correct recovery step when superblocks are lost.
How to eliminate wrong answers
Option A is wrong because `mdadm --create` without `--assume-clean` will initiate a full resync of the array, which would overwrite the existing data on the disks and destroy any chance of recovery. Option B is wrong because `mdadm --examine --scan` will not find superblocks if they are corrupted or missing, as already confirmed by the administrator; this option assumes superblocks are intact but just not being detected, which is not the case. Option C is wrong because using `dd` to backup the first few sectors is unnecessary and does not directly recover the array; data recovery tools are for filesystem-level recovery after the array is reassembled, not for fixing a missing superblock.