Monday to Saturday 8:00–19:00, Sunday closedFree courier collection throughout Switzerland · drop-off in Lugano, Zurich and Sant'Antonino

NAS and RAID

Pulled the wrong disk from a RAID: the first 10 minutes

It happens in server rooms and small offices alike: a RAID 5 is degraded, someone goes to replace the failed disk and pulls the healthy neighbour instead. The array drops offline. In most cases nothing is lost yet. What decides the outcome is what happens next, and above all whether anything is written to the disks.

Published 3 min readBy Mirush Murataj

Cover of the RecDati guide: Pulled the wrong disk from a RAID: the first 10 minutes
Stop: no new array, no initialisation, no rebuild started by hand.

In short

  • Stop: no new array, no initialisation, no rebuild started by hand.
  • If the pulled disk was healthy and nothing was written, putting it back in the same slot often brings the array back.
  • Save the controller log and the disk metadata before you touch anything else.

What the controller sees

A RAID controller, or Linux mdadm, keeps a counter of changes on every member disk. When a member disappears, the remaining members keep counting and the missing one stays frozen at its last value. In a RAID 5 that was already degraded, pulling a second disk leaves too few members to serve the data: the virtual disk goes offline, but the data on the disks is still where it was.

The danger starts when the array is brought back the wrong way. A controller that sees a stale member may decide to rebuild onto it, or offer to import a "foreign" configuration that no longer matches the disks.

Three situations, three different answers

SituationWhat it meansFirst move
Array offline, nothing written sinceTwo members missing, data unchangedPut the healthy disk back in its original slot
Array online and degraded againThe controller accepted the disk backCopy the important data now, then replace the failed disk
A rebuild has started onto the wrong diskThe controller writes parity over good dataStop the server and call a lab before the rebuild goes further

What to do right now

  1. Do not shut down in panic, but stop the services that write to the volume (databases, file shares, backups).
  2. Take a photo of the bays and note the serial number of every disk and its slot.
  3. Export the controller log: perccli /c0 show termlog or storcli /c0 show events on Dell and Broadcom controllers, ssacli ctrl all show config detail on HPE Smart Array, mdadm --examine on every member for Linux software RAID.
  4. Check which disk really failed: the one with media errors in the log and SMART, not necessarily the one with the amber light.

Putting the disk back: when it helps

  • Hardware RAID (Dell PERC, Broadcom MegaRAID, HPE Smart Array): if the healthy disk goes back in the same slot within minutes and the server did not write in between, most controllers bring it back as a member. If the controller instead shows it as "foreign", do not import and do not clear the configuration until you have compared the metadata.
  • Synology and QNAP: the NAS usually shows the pool as crashed or inactive. Reinserting the disk and rebooting often lets DSM or QTS see the original members again. Do not use Repair, which starts a rebuild.
  • mdadm: the reinserted member has a slightly lower event count. mdadm --assemble without --force will refuse it; with --force it is accepted, which is correct only if nothing was written while it was out.

Commands that make it worse

  • Initialize or Create new virtual disk with the same disks: the controller writes new metadata, and on some models zeroes the start of the disks.
  • Force online on the member that was out longest. It carries old data, and the file system becomes inconsistent.
  • mdadm --create "to recreate the same array": if a single parameter differs (order, chunk size, data offset), the result is unreadable.
  • A file system check on a degraded array with a member missing.

How the lab handles it

We image every member read-only, read the RAID metadata from each one and rebuild the array virtually with the exact disk order and stripe size. The stale member is used only for the stripes that the others cannot provide. Nothing is written to your disks.

Avoiding it next time

  • Use the locate function (storcli /c0/e32/s4 start locate, iDRAC, iLO or the NAS interface) so the right bay blinks.
  • Label each bay with the serial number of its disk.
  • Replace a disk only after reading its serial number in the log, and ideally with two people.

See RAID data recovery, server data recovery and Second disk error during a RAID 5 rebuild: what the next 48 hours should look like.

Frequently asked questions

I put the right disk back and the array is still offline. What now?

Leave it offline, export the controller log and do not try other options. A lab can rebuild the array from images of the disks.

The controller shows a foreign configuration. Should I import it?

Only if every disk of the array is present and none was written to separately. Otherwise the import can mark the wrong disk as current.

Is the data lost when a rebuild started onto the wrong disk?

Not entirely. The stripes already rewritten are damaged, but the rest can usually be recovered if the server is stopped quickly.

Official sources and useful links

Is your data important?

Do not try anything that could make the fault worse. The diagnosis is free and you get a fixed quote before any work starts.

Request a free diagnosis RAID data recovery

Device not responding any more? Unplug it and let us take a look.

Get a price