Your RAID Array Is Degraded: 7 Checks Before You Start a Rebuild
One morning the controller interface, or a monitoring email, shows a single word: degraded. The array is still running, users have noticed nothing, and the replacement drive is sitting on the shelf. The natural move is to swap the drive and start the rebuild, and most of the time it finishes without trouble. This post is about the times it does not: why the rebuild is the most fragile moment in an array's life, and what to check before you start one.
Short answer: A degraded array is not data loss, but it is an array with no redundancy left. Before the rebuild, make sure you have a current backup that actually restores, check the health of the remaining drives, and confirm by serial number which drive you are about to pull. If two drives have dropped, or the array shows as offline, do not force anything.
What degraded means, and what it does not
RAID 5 tolerates the loss of one drive, RAID 6 of two. In the degraded state the array recalculates the missing drive's data from the remaining data and parity on every read. The data is still there; but tolerance has dropped to zero on RAID 5 and to one on RAID 6. On RAID 10 it depends on which drive failed: if the second drive of the same mirror pair goes, the array stops.
What the degraded warning does not tell you is this: the remaining drives are the same age, usually from the same production batch, and have spent years under the same load.
By level, the picture is this:
| RAID level | Drive losses tolerated | After one drive drops | Unreadable sector during rebuild |
|---|---|---|---|
| RAID 0 | None | Array is lostThere is no degraded state | — |
| RAID 1 / RAID 10 | 1 per mirror pair | That pair is unprotected | That sector cannot be corrected; if the other drive of the pair goes, the array stops |
| RAID 5 | 1 | No tolerance | Cannot be corrected; depending on the controller the rebuild stops or the block is marked bad |
| RAID 6 | 2 | 1 drive of tolerance | Corrected from the second parity |
Why is a rebuild risky?
To calculate what goes on the new drive, a rebuild reads every remaining drive from start to finish. Sectors that have not been read for years in normal operation are read for the first time. Three things can go wrong:
1. Latent bad sectors. Manufacturer data sheets usually state the unrecoverable read error rate as at most 1 in 1014 bits for desktop-class drives and at most 1 in 1015 bits for enterprise drives. 1014 bits is about 12.5 TB. That figure is an upper bound and healthy drives usually do better; even so, meeting a single unreadable sector during an uninterrupted read of tens of terabytes is not unusual. On RAID 5 there is no redundancy left to correct that sector; the parity is already being used to calculate the missing drive.
2. A second drive failure. A rebuild is a heavy read load lasting hours, and on large drives days. A drive that is running on the edge may drop at exactly this point.
3. The wrong drive. If the drive pulled as faulty turns out to be healthy, you have lost two drives in one move.
Seven checks before starting a rebuild
The summary first; the detail follows the table.
| # | Check | What to look at | Stop sign |
|---|---|---|---|
| 1 | Event log | Which drive dropped, and when | A second drive that dropped earlier and came back |
| 2 | Backup | Date of the last successful backup; a trial restore | No backup, or it does not restore |
| 3 | Health of remaining drives | SMART counters, SAS error counts | Pending or uncorrectable sectors |
| 4 | The right drive | Serial number, slot, locate LED | Serial number does not match the label |
| 5 | Hot spare and controller | Has a rebuild started by itself; cache battery; foreign configuration | A foreign configuration you cannot explain |
| 6 | Critical data | With no backup, a copy of the most important data first | Read errors during the copy |
| 7 | The new drive | Capacity, sector format, CMR or SMR, old RAID metadata | Smaller capacity, different sector format, SMR |
1. Read the event log: which drive dropped, and when?
In the controller or operating system log, find the slot, serial number and time of the failed drive. What you are really looking for is this: has another drive dropped and come back earlier? If two drives dropped at different times, the data on the first one is stale. Forcing that drive online makes the array look healthy but leaves the file system inconsistent.
2. Verify the backup
"Backups are running" is not an answer. Check the date of the last successful backup and actually restore at least one folder or one database. If there is no backup, or it does not restore, take every following step as if that array were the only copy.
3. Check the health of the remaining drives
The remaining drives will carry the rebuild load. On SATA drives look at the reallocated sector (5), pending sector (197), offline uncorrectable (198) and interface CRC error (199) counters; on SAS drives look at the grown defect list and uncorrected error counts. If one of the remaining drives has pending sectors, the rebuild will very likely stall on them.
| SMART counter | ID | What it tells you | When it matters |
|---|---|---|---|
| Reallocated Sector Count | 5 | Bad sectors already moved to the spare area | When it is non-zero and rising |
| Current Pending Sector | 197 | Unreadable sectors not yet remapped | Any non-zero valueis a risk for the rebuild |
| Offline Uncorrectable | 198 | Sectors that could not be corrected | Any non-zero value |
| UDMA CRC Error Count | 199 | Transfer errors between drive and controller | If it is rising, check the cable or backplane; the drive may be fine |
4. Confirm the drive you will pull by its serial number
Slot number, LED and operating system device name do not always point at the same drive; cables may have been reordered or the backplane mislabelled. Before pulling the drive, read its serial number and slot from the controller output, then use the controller's "locate" function to light that slot's LED and confirm the bay by eye. After pulling it, compare the serial number on the label; if it does not match, put the drive straight back into the same bay and do nothing else. Write the slot number on every drive you remove.
5. Check the hot spare and controller state
If a hot spare is defined, the rebuild may have started without you; watch its progress and the error counters. On hardware controllers check the state of the cache battery or capacitor and whether there is a "foreign configuration" warning. Do not import or clear a foreign configuration without understanding what it is.
6. If there is no backup, take the most critical data first
If the degraded array is still readable and you have no verified backup, copy the most critical data to other storage before the rebuild: first what is small and irreplaceable (database dumps, accounting data), then the rest. If you see read errors or pending sectors on the remaining drives, do not attempt the copy either; shut the array down. The safest route is to power the array down and take a sector-level copy of each member drive; if you lack the hardware or the time, copying the critical data is the minimum precaution.
7. Make sure the new drive is suitable
Its capacity must be at least that of the old one and its sector format (512e or 4Kn) must match the array. Avoid SMR drives for rebuilds: they slow down badly under long uninterrupted writes and some controllers drop the drive on a timeout. Before fitting a drive that was previously used in another array, make sure its old RAID metadata has been cleared.
When should a rebuild not be started at all?
| Situation | Decision |
|---|---|
| One drive down on RAID 5 or RAID 6, backup verified, remaining drives clean | Can be started |
| No backup, but the remaining drives are clean | Copy critical data firstthen rebuild |
| Read errors or pending sectors on the remaining drives, no verified backup | Do not start |
| Two drives down on RAID 5, three on RAID 6; the array shows as offline or failed | Do not start |
| A drive dropped earlier and was brought back; it is unclear which one is current | Do not start |
| A previous rebuild stopped part-way | Do not start |
| The controller failed or was replaced; the array configuration is not recognised | Do not start |
Wherever the table says "Do not start", the array is powered down, the drives are labelled with their slot numbers, and nothing is written to them.
What not to do
| Action | Why it does harm |
|---|---|
| Recreating the array (create / initialize) | Defining a "new array" on the same drives overwrites the old configuration. Even a fast initialization can zero the start and end of the array and a background initialization rewrites parity; a full initialization erases all the data. |
| Forcing the dropped drive online | A drive carrying stale data re-enters the array. |
Running chkdsk or fsck on a degraded or inconsistent array | On an inconsistent array a file system repair makes wrongly calculated data permanent; on an array that is merely degraded it puts heavy read and write load on an array with no redundancy. |
| Swapping drives between bays, pulling several drives at once | The drive order is lost; every extra drive pulled can take the whole array down. |
Trying to "bring back" a Linux array with mdadm --create | The command rewrites the superblocks in every case; if one parameter, or the default data offset of your mdadm version, differs, the data area is overwritten as well. |
| Updating the controller firmware before the problem is resolved | It adds a new variable in the middle of a failure; the array configuration may stop being recognised. |
Commands for reading the state
All of the commands below are read-only; they change nothing on the array.
# Linux software RAID (mdadm)
cat /proc/mdstat
mdadm --detail /dev/md0
mdadm --examine /dev/sd[a-d]1 # compare the "Events" counters of the members
# Drive health
smartctl -a /dev/sda
smartctl -a -d megaraid,0 /dev/sda # drive behind MegaRAID; 0 = DID in storcli output
# Broadcom / LSI MegaRAID (perccli on Dell PERC uses the same syntax)
storcli /c0 show
storcli /c0/vall show
storcli /c0/eall/sall show
storcli /c0 show events
# HPE Smart Array
ssacli ctrl all show config
ssacli ctrl slot=0 pd all show status
In mdadm --examine output, the member whose "Events" value is lower than the others is the drive that dropped out of the array earlier.
If you are sending the drives to a laboratory
- Send every member drive, including the failed one.
- Write the slot number on each drive.
- Note the controller model, the RAID level and, if you know them, the stripe size and file system.
- Add a timeline: which drive dropped when, and what has been tried.
- Put each drive in an antistatic bag and pack them separately with shock-absorbing material.
How an array is rebuilt virtually in the laboratory, and how drive order and stripe size are determined, is described on the RAID data recovery page.
Frequently asked questions
How long does a rebuild take?
It depends on drive capacity, the load on the array at the time and the controller's rebuild priority setting; anything from a few hours to a few days. The longer it runs, the longer the window stays open for a second failure.
I use RAID 6. Do I still need to be careful?
With one drive lost, RAID 6 still has one drive of tolerance; an unreadable sector met during the rebuild is corrected from the second parity. That is why RAID 6 is preferred on large drives. With two drives lost, you are where RAID 5 is after losing one.
Is there a way to prevent this?
Regular consistency scans (patrol read, scrub) find and repair latent bad sectors while redundancy is still there. Test from time to time that monitoring alerts really reach someone. And RAID is not a backup: it does not solve a deleted file, ransomware or a controller failure.
If the array is powered down, leave it down. Analysis is free and nothing is done without your approval. Phone: 0212 916 12 22 · contact page