Free data destruction free analysis request →
Services RAID
+32 (0)800 11 400 free analysis request

RAID, NAS and SAN

RAID data recovery

What RAID is, how a NAS uses it, the difference between software and hardware RAID, why a RAID still fails, and what to do and not to do when it happens.

What is RAID?

RAID (Redundant Array of Independent Disks) spreads data over several drives, which work together as a single volume. Depending on the level, that gives more speed, more protection against a failed drive, or both.

That protection relies on redundancy: a copy of the data (mirroring) or a calculated check value (parity), from which the contents of a failed drive can be recalculated.

RAID is not a backup. It protects against a drive failing, not against deleted files, ransomware, a failed controller or a mistake during a rebuild.

The common RAID levels

Each level is a trade-off between speed, capacity and protection.

LevelHow it works Min. drivesCan lose
RAID 0Data split into blocks across all drives (striping). Fast, but without protection.2none
RAID 1Every drive holds the same data (mirroring).2all but one
RAID 5Striping with parity spread across all drives.31 drive
RAID 6Striping with double parity.42 drives
RAID 10Mirrored pairs, striped together.41 per mirror pair
JBOD / spanningDrives chained into one volume, without protection.2none

There are also combinations such as RAID 50 and 60, and vendor-specific variants such as SHR on Synology and RAID-Z on ZFS.

Technical: how parity works (XOR)

In RAID 5 the parity block is the XOR of the data blocks in the same stripe. If one drive fails, its block is the XOR of the remaining blocks and the parity. RAID 6 adds a second, independent check value (usually Reed-Solomon, the Q parity), so two missing blocks can be calculated.

During a rebuild, every block on every remaining drive therefore has to be read without error. A single unrecoverable read error (URE) is enough for a block not to be recalculated.

RAID in a NAS

A NAS is a small server with several drives. Most NAS devices do not use a separate RAID card, but Linux software RAID, often with a volume management layer and a file system on top. A few examples:

  • Synology: Linux software RAID (mdadm) with LVM, and ext4 or Btrfs. SHR (Synology Hybrid RAID) uses this to combine drives of different sizes.
  • QNAP: mdadm with LVM and ext4; QuTS hero devices use ZFS.
  • TrueNAS and other ZFS systems: RAID-Z1, Z2 and Z3, with one, two or three parity drives.
  • Other brands, such as Netgear ReadyNAS, WD or Buffalo, work in a similar way.

For a recovery this means we have to reconstruct not only the RAID itself, but also the layers above it (LVM, Btrfs, ZFS) to reach your files. We do not need the NAS device itself.

If the RAID volume also uses deduplication, for example Windows Server deduplication, ZFS dedup or that of a backup appliance, reconstructing the RAID is not enough: the deduplication layer must also be consistent again before the files become readable (deduplication issues). That is a typical case of multi-layer recovery.

More about multi-layer recovery and deduplication →

Software RAID or hardware RAID?

Hardware RAID

A separate controller (for example from Broadcom/LSI, Adaptec, HPE Smart Array or Dell PERC) with its own processor and cache, often protected by a battery or flash memory (BBU, flash-backed write cache). The configuration is stored in a vendor-specific format.

Software RAID

The operating system manages the RAID: mdadm on Linux, ZFS, Windows Storage Spaces or dynamic disks. The configuration is easier to read, and the drives are not tied to one controller.

Firmware or "fake" RAID

RAID configured in the motherboard BIOS, such as Intel RST. It looks like hardware RAID, but the work is done by a driver in the operating system.

For recovery the type matters less than people think: we reconstruct the data directly from the drives, independently of the controller or device they were in.

Technical: where the RAID configuration lives (metadata)

Linux software RAID (mdadm) keeps a superblock on every drive: with version 1.2, the default, 4 KiB from the start of the drive or partition; with the older versions 0.90 and 1.0 at the end. Hardware controllers use the DDF format (Disk Data Format) or their own format, usually at the end of the drive. Intel RST (IMSM) also places its metadata at the end.

If that metadata was overwritten, for example by re-initialising the RAID, the data itself is usually still there. The parameters then have to be derived from the data.

Why a RAID still fails

A RAID protects against one fault, but in practice we mostly see these causes:

  • A drive failed months ago without anyone noticing (degraded array). When the second one goes, the protection is gone.
  • A second drive fails during the rebuild. Drives of the same age and batch are put under heavy load.
  • Unreadable sectors (bad sectors, URE) on a drive that seemed "fine", stopping the rebuild halfway.
  • A failed controller, or a firmware update of the controller or NAS that goes wrong.
  • Human error: drives put back in the wrong order, or the RAID recreated by mistake.
  • Ransomware or deleted files: the RAID then does exactly what it should, and copies the problem.

Your RAID or NAS fails: what now?

Do

  • Shut the system down, so the drives are not damaged further.
  • Note the order of the drives, for example with a label per bay.
  • Note what happened and which messages you saw.
  • Send in all drives, including those reported as failed.

Don't

  • Do not start a rebuild or force a drive online.
  • Do not create a new RAID or volume, and do not initialise anything.
  • Do not run chkdsk or fsck.
  • Do not swap drives between bays, and do not write anything to them.

How we recover a RAID

  1. A copy of every drive. We never work on the original drives, but on a complete copy (image) of each drive. No further damage, and you can already rebuild your system in the meantime.
  2. Repair failed drives first. If a drive is physically damaged, we open and repair it in our Class 1 lab until a usable copy can be made.
  3. Which drives belong together (RAID-set discovery). If we receive drives from several RAID sets, hot spares or unlabelled drives, we first determine which drives belong to the same set and what role each one plays.
  4. Determine the parameters. Drive order, stripe size, parity rotation and start offset: we derive them from the data itself, including with entropy scanning. A working controller is not needed.
  5. Reconstruct virtually. We rebuild the RAID in software, together with the layers of the NAS or operating system, until the file system is readable again.
  6. Check and deliver. You see the list of recovered files before you pay.
Technical: deriving the parameters

The stripe size (or chunk size) is usually between 16 KiB and 1 MiB; mdadm defaults to 512 KiB. For RAID 5 there are several parity layouts, such as left-symmetric, the mdadm default, and left-asymmetric or right-symmetric.

We derive them from recognisable structures: where partition tables, file system structures and file headers land on the individual drives reveals the drive order, the stripe size and the parity layout.

Entropy scanning measures how random the data in each block is. Compressed or encrypted data and parity score high; empty regions, text and file system structures score low. Where those values change at fixed intervals, they reveal the stripe size and the position of the parity, even when there are no recognisable structures.

Frequently asked questions about RAID

Is RAID the same as a backup?

No. RAID protects against a drive failing. It offers no protection against deleted files, ransomware, a failed controller or a failed rebuild. For that you need a separate backup.

Two drives failed in my RAID 5. Is everything lost?

Not necessarily. Often one of the failed drives is still partly readable, or it failed long before the other. After an analysis we know whether the data can be recovered.

Do I need to send the controller or the NAS?

No, the drives are enough. We reconstruct the RAID independently of the controller or NAS. Do send all drives, including the failed ones, and note their order.

Can't I just start the rebuild myself?

If all other drives are healthy, it may work. If there is another weak drive, the rebuild can make that one fail too, or write wrong data over good data. When in doubt, shut the system down and request an analysis first.

Does this also work for Synology, QNAP or a server with hardware RAID?

Yes. We recover software RAID from NAS devices, hardware RAID from server controllers, as well as ZFS, Btrfs and LVM.

What does a RAID recovery cost?

That depends on the number of drives, their condition and how the system is built. The analysis is free and without obligation: you hear what is wrong and what it costs before you decide anything.

Has your RAID or NAS failed?

Shut the system down and request a free analysis, or call us. We tell you what is wrong and what it costs, before anything happens.