RAID Retrieval Tips and Warnings

Recovering data from a RAID is risky business. Whether you are migrating to a new platform due to hardware failure or attempting to rebuild your RAID after loss of meta data, the wrong move could lead to catastrophic data loss. While it’s easy to find well-meaning advice on forums and websites (such as this one), even the savviest of tech gurus may not remember to brief you on the prerequisites and warnings you should be aware of before proceeding. So, before you embark on RAID retrieval adventure, take a moment to read through our general tips and warnings.

Check with the Vendor for Default Settings

One of the biggest challenges of rebuilding a RAID is nailing down the correct parameters. The number of disks, file system and RAID level are usually easy to remember. But the disk order, block size, block order and disk offset can be hard to determine. There are ways to sleuth these RAID parameters out using a hex editor, but you can save yourself a lot of work by trying the default RAID parameters for your hardware. Vendors will often publish this information on the web, or you can contact technical support.

Always Use Read-only Access

If you’ve lost your RAID meta data or had a hardware RAID controller failure but the independent disks in the array are still healthy and intact, then you’re in very good shape. However, writing any new data to the disks can quickly change all of that. This can happen very easily if the disks are mounted in a RAID configuration other than the original RAID configuration from before the failure.  To prevent this from happening, work with your disks using a utility or operating system that will mount them in read-only mode. Better yet, create images of the disks and work with the disk images to build a virtual software RAID. This allows you to experiment with different RAID configurations while leaving the physical member disks untouched.

Backup Track0

If you can’t work with disk images (for example, if the disk capacities are simply too large), then you can provide yourself a bit of a safety net by backing up track0 on each disk before attempting to mount the disks to a new RAID volume. Track0 is where the master boot record (MBR) and bootstrap code reside. This data gets overwritten when you create a new RAID set.  You can back up track0 by saving, copying and pasting or transcribing the first 63 sectors of the disk. This way, if something goes awry, you can roll the track0 back to re-evaluate.

Mount Drives in IDE/AHCI Mode

When working with physical drives, make sure you mount them on a non-RAID controller. That is, mount them as slave drives in IDE/AHCI mode. This will prevent the system from attempting to build them into an invalid RAID configuration. If the RAID controller is built into your motherboard, or if you are migrating to a new motherboard that has RAID capabilities, then you may need to temporarily disable RAID support in the BIOS. If the RAID you are trying to rebuild was your system drive, then you can use a live USB or live CD to boot your system.
These tips and warnings should help you avoid some of the most common mistakes as you attempt to recover your RAID. While they won’t leave you completely without risk, taking the above precautions may allow you enough margin of error to attempt several remedies without destroying your data permanently.