Failed Software RAID0 on Linux - Attempting to recover data

0

I have a two disk RAID0 software raid (not hardware raid) that is reported to have failed during boot and my OS won't start.

Using a Live CD, I get the following output :

sudo mdadm -E /dev/sdc1 /dev/sdd1 

/dev/sdc1:
      Magic : a92b4efc
    Version : 1.2
Feature Map : 0x0
 Array UUID : 3710713d:fb301031:84b61247:d1d53e0f
       Name : HP-xw9300:0
Creation Time : Sun Sep  1 15:22:26 2013
 Raid Level : -unknown-
Raid Devices : 0

Avail Dev Size : 1465145328 (698.64 GiB 750.15 GB)
Data Offset : 16 sectors
Super Offset : 8 sectors
State : active
Device UUID : ad427cd2:9f885f57:7f41015f:90f8f6af

Update Time : Sun Jun  8 12:35:11 2014
   Checksum : a37407ff - correct
     Events : 1


 Device Role : spare
 Array State :  ('A' == active, '.' == missing)

/dev/sdd1:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x0
Array UUID : 3710713d:fb301031:84b61247:d1d53e0f
Name : HP-xw9300:0
Creation Time : Sun Sep  1 15:22:26 2013
Raid Level : -unknown-
Raid Devices : 0

Avail Dev Size : 976771056 (465.76 GiB 500.11 GB)
Data Offset : 16 sectors
Super Offset : 8 sectors
State : active
Device UUID : 2ea0199d:cb08d9e7:0830448a:a1e1e348

Update Time : Sun Jun  8 13:06:19 2014
Checksum : 8883c492 - correct
Events : 1

Device Role : spare
Array State :  ('A' == active, '.' == missing)

GParted lists both disks, detects the flags as 'Raid' and lists the data usage.

Can anyone please help me re-assemble just so that I can copy some of the data off that I have not backed up recently?

Thanks

Gizmo_the_Great

Posted 2014-06-08T14:18:14.760

Reputation: 493

Answers

1

RAID 0 (or a stripe) has no redundant information at all. Any information on a failed drive is lost. Your output only shows a volume on a single disk (/dev/sdd1), so you might just have lost at least half your data.

It gets worse. RAID0 is a choice when you decide 'I need maximum performance. Even at a greater risk to loose information when any disk fails'.

To do this information is usually spread across the disks. (Compare the disks to two books. To speed up writing you ask your first secretary (aka the drive controller) to write one words in one book and the other secretary (the second drive's controller) to write the second word on the second book/disk. This double read and write performance.

And if one of the disks fails you loose everything. Which is why RAID0 is only used when you need maximum performance and the data is either unimportant or can be easily restored. (e.g. db scratch tables, temp folders. A gaming rig with all your games savefiles stored elsewhere, ...)

More detailed information can be found on our sister site [SF] in this post.


As to attempting: I would start with mdadm --assemble --scan, but with only one disk detected and RAID0 chances are less than stellar.

Hennes

Posted 2014-06-08T14:18:14.760

Reputation: 60 739

The thing is, though, that so much is identified about the RAID by both mdadm and gparted. It almost seems like it should be accessible but just needs a little shove. Maybe a config file has got screwed somewhere and one little value that it needs is unavailable. I know there are advanced RAID recovery techniques but in this case it looks like it is nearly accessible - just not quite. – Gizmo_the_Great – 2014-06-08T15:27:46.797

Every RAID format except for RAID0 has redundancy. That means there is information to recover even after one disk dies. If the information gets RAID-0 striped (and no RAID-0 appended) then it is over. The only remaining options are backups or very expensive HDD recovery. – Hennes – 2014-06-08T17:48:50.347

0

They are both reporting Device Role as spare which is odd. Looks like some thing went wrong and they were marked spare.

Run smartctl and see if there are any issues with the drives.

Best practice would be to take images of the drives and try to reassemble from the images.

You might experiment with RAID recovery software so you can find the correct chunk size and drive order. Then you can do a mdadm --create with the correct options.

S.Haran

Posted 2014-06-08T14:18:14.760

Reputation: 166