Rebuild
A rebuild is the process where a RAID array recreates all the data from a failed disk and writes it onto a replacement disk, using the disks that remain.
Why does a parity rebuild read every disk?
To recreate one disk with parity, the array reads the matching blocks from all the others, stripe by stripe, across the whole array. So a rebuild is exposed to read errors on every remaining disk, from start to end.
Can a rebuild start on its own?
Yes. When a disk is marked faulty and a hot spare is configured, Linux software RAID starts recreating the failed disk’s data on the spare straight away.
When shouldn’t you start a rebuild?
When the array is a degraded array, the data matters and there is no current backup. Copy the data off first, then replace disks or start the rebuild. The rebuild reads every remaining disk from start to end, and a RAID 5 array that is missing one disk has no redundancy left, so one more unreadable disk stops the missing data from being calculated. If a rebuild has already failed, see RAID data recovery.
From the lab
Observed
A Drobo DRDS2-A stopped working when a second drive failed during a rebuild. A Drobo starts rebuilding as soon as a disk is inserted, and here the map of where its data blocks sit had changed. The damage was limited: after the drive problems were fixed, a full scan of the disk pack brought back first unnamed files, then folders with their file names.
From R3's lab records
Related terms
Common misconceptions
Is a rebuild the same as recovering my data?
No. A rebuild restores the array’s redundancy from data the array can still read. It doesn’t bring back deleted files, and it writes to the replacement disk, so it isn’t a way to read a failed array safely.