LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   recover data from raid 0 drives.... (https://www.linuxquestions.org/questions/linux-hardware-18/recover-data-from-raid-0-drives-685267/)

Peter_Karlsen 11-21-2008 05:21 PM

recover data from raid 0 drives....
 
Hi

Until a week ago I had a Maxtor sharedstorage with two 500GB discs in raid 0. The controller board with the embedded linux (I guess) is fried, but the two disk are still working fine.
The problem is the data located on the discs. I really like it back.

I have bought a SATA controller card and put the two discs in a pc running fedora core 9.
I know the two discs from the sharedstorage were running a software raid 0.

Is it possible to mount the two raid 0 partitions on the discs and recover my data?

How would I do it? I have some experience with linux but none what so ever with raid systems.

Can someone help me?

Best regards
Peter Karlsen

Junior Hacker 11-22-2008 02:06 AM

There are data carvers that look for headers and footers of files regardless of the format structure as they don't read the file system, they just go from sector to sector looking for the file extensions you specify in the configuration of the applicable software.
These are photorec which is part of the testdisk package, and foremost. Both of which are usually included in forensics live CDs like the Helix Live CD. You may also install them in another running Linux installation and run them against those drives installed as slave or from an external hard drive enclosure.
Just make sure you have lots of space on a drive other than the one you are recovering from as they can pull out tons of data.
To use photorec, just run the command: photorec from within the directory you want the utility to store the recovered data and go through settings before it starts carving.
Photorec can also be paused to give you time to go through the recovered data and delete what you don't want to make room for more data recovery.

H_TeXMeX_H 11-22-2008 02:48 AM

The only way I can think of is put them back in RAID0, if that doesn't work then there is no hope, sorry. I don't even think data carvers will help much in this case because the data is completely split between the drives.

archtoad6 11-22-2008 06:01 AM

Agree, I doubt photorec/testdisk or foremost can handle the striping of RAID 0; correct me if I'm wrong, please.

Since you think the fried controller is/was running an embedded Linux, your best bet is (IMO) to mount the 2 drives as a Linux s/w RAID 0 array. If you're lucky, your only problem will be learning Linux s/w RAID.

There are some lessons here:
  • It's even more important to back up a RAID 0 array than any other data -- there are n+1 ways to have a catastrophe: n drives, plus the controller itself.
  • H/W RAID, even "real" h/w RAID, is at the mercy of its controller. At the very least, users of such need a back-up/recovery plan in place before it dies or wears out.
  • Know what RAID format a RAID controller is using before putting it into service. Even RAID 5 is useless while its controller is down. This is one of the big reasons why Linux s/w RAID advocates love Linux s/w RAID. -- The "h/w controller" is is just another IDE/SATA controller; if it fails, replace it & keep on trucking.

H_TeXMeX_H 11-22-2008 06:58 AM

Indeed, if you value your data do not put it on RAID0/AID0 (it is not Redundant). Think of it as doubling the chance of you loosing all your data without the possibility of recovery (except maybe by very expensive option done by experts). In your case there may be hope in that hopefully the data has not been corrupted and you can still put the drives back in RAID0 and get your data off.

Peter_Karlsen 11-22-2008 09:01 AM

Thanks a lot for the fast and helpful replies.

I'm completely new to setting up raid.
Can you point me in a direction of where to start?
Is there e good how-to somewhere?

While installing fedora core 9 I had the option to mount the partitions as raid0. At /mnt/md0 I think. The partitions are called /dev/sdd6 and /dev/sde6.

Beside the /mnt/md0 partition it said that it would be formatted so I removed the raid0 setting again in fear of loosing my data completely.

Could I have mounted the partitions in raid0 and kept my data? I can mount all kinds of other old linux partitions during installation while keeping the contents of the partition.

H_TeXMeX_H 11-22-2008 09:51 AM

Quote:

Originally Posted by Peter_Karlsen (Post 3350920)
While installing fedora core 9 I had the option to mount the partitions as raid0. At /mnt/md0 I think. The partitions are called /dev/sdd6 and /dev/sde6.

Beside the /mnt/md0 partition it said that it would be formatted so I removed the raid0 setting again in fear of loosing my data completely.

Could I have mounted the partitions in raid0 and kept my data? I can mount all kinds of other old linux partitions during installation while keeping the contents of the partition.

yes, you could have, now you didn't format them did you ? if so, the data is gone forever...

for a how-to, here's a good one:
http://tldp.org/HOWTO/Software-RAID-HOWTO.html

Peter_Karlsen 12-02-2008 10:25 AM

I found a solution to my problem.

mdadm --create /mnt/md0 --level=0 --raid-devices=2 /dev/sdd6 /dev/sde6

Output said that the partitions were linear raid.
I aborted and changed the command to:

mdadm --create /mnt/md0 --level=linear --raid-devices=2 /dev/sdd6 /dev/sde6
mount /mnt/md0 /data/

Taadaaaaa.. And my data was available to me again.

A big thanks to H_TeXMeX_H for pointing me in the right direction.

What have I learned from all this?
RAID0 and linear RAID sucks.
Maxtor Sharedstorage cannot be recommended to anyone. Twice the embedded controller has broken. Sure Maxtor will send a new one, but your data will be lost unless you break the warranty seal.

Once again thanks a lot for the advice and support.

H_TeXMeX_H 12-02-2008 01:12 PM

Glad to be of help. Really RAID0 doesn't suck performance-wise where it does offer some benefits, but if you value your data do NOT use RAID0 it should be called AID0 because it is not redundant and thus does not make your data more stable but instead more volatile.


All times are GMT -5. The time now is 10:25 AM.