Refer to the exhibit. A system administrator wants to replace disk sdb1 in the RAID1 array. After physically removing sdb, which sequence of commands should be used?
Proper sequence: fail, remove, add, run.
Why this answer
Option D is correct because after physically removing the failed disk (sdb), the administrator must first mark the device as failed using `--fail`, then remove it with `--remove`, add the new disk (sdd1) with `--add`, and finally run `--run` to ensure the array is activated if it was stopped or degraded. The `--run` flag is necessary because a RAID1 array with a missing device may not automatically start; this command forces the array to become active so the rebuild can begin.
Exam trap
The trap here is that candidates often forget the `--run` step, assuming the array will automatically start after adding a new disk, or they mistakenly use `--grow` for adding a replacement disk instead of `--add`.
How to eliminate wrong answers
Option A is wrong because it attempts to remove a device without first marking it as failed; `mdadm --remove` on an active device will fail unless the device is already failed or spare. Option B is wrong because it omits the `--run` command; after removing the failed disk and adding a new one, the array may remain in a stopped or degraded state and will not automatically start, preventing the rebuild. Option C is wrong because it incorrectly uses `--grow` instead of `--add` for adding a disk to a RAID1 array; `--grow` is used for reshaping arrays (e.g., changing RAID level or number of devices), not for adding a replacement disk, and the `--manage` flag with `--run` is redundant since `mdadm /dev/md0 --run` is the correct syntax.