Course contentsShow
← Linux
Lesson 705 of 1,8197. Storage Management and Logical VolumesFree lesson

Handling multiple array failures

Implement manual recovery steps for arrays that have exceeded their parity limits.

In this lesson, you will learn how to manually intervene and force the assembly of a degraded RAID array that has lost more drives than its parity can recover.

The Reality of Multi-Disk Failure

In a typical RAID-5 setup, you can lose one drive, or in RAID-6, two drives, before the array fails completely. When you exceed these limits, the kernel marks the array as "failed" and refuses to assemble it automatically. This prevents you from inadvertently corrupting data, but it also locks you out of your storage. Manual recovery is a high-stakes operation intended only for data salvage.

Forcing Assembly

When an array won't start because it is missing too many members, you can use mdadm to force the assembly. This instructs the kernel to ignore the missing drives and try to mount the array using whatever data is currently available on the surviving disks.

First, check the current status of your devices:

mdadm --examine /dev/sd[b-e]1

If the metadata suggests the array is in a failed state, you can attempt to assemble it using the --force flag:

mdadm --assemble --run --force /dev/md0 /dev/sdb1 /dev/sdc1

Understanding the Risks

By using --run and --force, you are essentially telling the system: "I know the array is incomplete, but try to mount it anyway." Because you have exceeded the parity limits, the filesystem on top of this array will almost certainly be corrupted.

Once the array is forced online, do not attempt to write to it. Your primary goal at this stage is to mount the filesystem in read-only mode (mount -o ro /dev/md0 /mnt/recovery) and copy your most critical data to a separate, healthy storage location. The parity data is no longer reliable, and the array structure is likely inconsistent; treat the array as a "dead man walking" and focus entirely on file extraction rather than array repair.

Key Takeaway: When an array exceeds its parity protection, use mdadm --force to recover read-only access for data salvage, as the array is no longer safe for normal operation.