LFCS Storage Management Practice Question
A Linux server uses a software RAID1 array /dev/md0 assembled from /dev/sdb1 and /dev/sdc1. The administrator wants to replace the failing disk /dev/sdc with a new disk /dev/sdd without losing data or interrupting service. Which two steps are required to correctly replace the disk in the array? (Choose two.)
⚠ Common exam trap
The trap here is thinking that a new disk can simply be plugged in and will automatically join the array, or that the array must be recreated, when in fact explicit fail/remove/add steps are required.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Mark /dev/sdc1 as failed with mdadm /dev/md0 --fail /dev/sdc1, then remove it with mdadm /dev/md0 --remove /dev/sdc1.
To replace a disk in a RAID1 array, the failed disk must first be marked failed and removed from the array. Then the new disk, partitioned identically, is added with mdadm --add, which triggers a rebuild. These two steps maintain data integrity and restore redundancy without recreating or resizing the array.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Mark /dev/sdc1 as failed with mdadm /dev/md0 --fail /dev/sdc1, then remove it with mdadm /dev/md0 --remove /dev/sdc1.
Why this is correct
Before physically removing a disk from a RAID array, it must be marked as failed and then removed from the array metadata. mdadm --fail tells the kernel to stop using the device, and --remove detaches it from the array. This ensures the array does not attempt to read from or write to the disk being replaced, preventing errors and data inconsistency.
- ✗
Recreate the array with mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sdb1 /dev/sdd1.
Why it's wrong here
Using --create on an existing array overwrites the RAID superblock and destroys the array. This would cause data loss and is never appropriate for a disk replacement. The correct approach preserves the array and its data by removing the failed disk and adding the replacement, allowing mdadm to rebuild the mirror from the surviving disk.
- ✗
Run mdadm --grow /dev/md0 --raid-devices=2 to resize the array after adding the new disk.
Why it's wrong here
The --grow option with --raid-devices changes the number of active devices in the array. In a replacement scenario, the number of devices remains the same (two), so this command is not needed and could cause unintended reshaping. It is used when adding capacity, not when swapping a failed disk for a new one of the same role.
- ✗
Use dmsetup remove /dev/md0 to detach the array, then re-add the new disk.
Why it's wrong here
dmsetup is a device-mapper tool for logical volumes and other mapped devices, not for mdadm software RAID arrays. /dev/md0 is managed by the md driver, so dmsetup remove would fail or target the wrong subsystem. The correct tool is mdadm, which handles fail, remove, and add operations for RAID arrays.
- ✓
Add the new disk to the array with mdadm /dev/md0 --add /dev/sdd1, then monitor rebuild with cat /proc/mdstat.
Why this is correct
After the old disk is removed and the new disk is partitioned identically, mdadm --add incorporates /dev/sdd1 as a spare and initiates a rebuild. Watching /proc/mdstat confirms the resync progress. This step is necessary to restore redundancy; without adding the new device, the array remains degraded and unprotected against a second disk failure.
Quick reference
RAID Level Comparison
| RAID Level | Min Disks | Fault Tolerance | Read | Write | Usable Capacity |
|---|---|---|---|---|---|
| RAID 0 | 2 | None | Excellent | Excellent | 100% |
| RAID 1 | 2 | 1 disk | Good | Moderate | 50% |
| RAID 5 | 3 | 1 disk | Good | Moderate | 67–94% |
| RAID 6 | 4 | 2 disks | Good | Lower | 50–88% |
| RAID 10 | 4 | 1 disk per mirror | Excellent | Good | 50% |
RAID is not a backup strategy — it protects against disk failure but not against accidental deletion, ransomware, or site-level events.
Go deeper
Related to this question
About these practice questions
Courseiva writes every LFCS question from scratch — 406 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Linux Foundation exam blueprint
This LFCS practice question is part of Courseiva's free Linux Foundation certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the LFCS exam.