[SWLUG] RAID Array data recovery

swlug swlug at alicious.com
Fri Sep 25 19:05:03 UTC 2009


Justin Mitchell wrote:
>
>> If not on to plan B!  I can afford to buy a new 1tb hdd tomorrow if I
>> have too (would rather not, but if it can't be avoided).  I was then
>> thinking it would be possible to recover everything using dd.
>>
>> My plan is:
>>
>> Use dd to copy /dev/md0 to the 1tb hdd
>> Mount the img of /dev/md0
>> Backup the important data on /dev/mdo to my PC
>> Recreate the RAID 5 array from scratch (re-format and re-create)
>> Copy the img of /dev/md0 back to the newly created RAID array
>> Mount the RAID array and all my data is back where it needs to be?
>>
>> Would that work?
>>     
>
> no. the filesystem is corrupt, the disks are fine (at last youve yet to show any disk errors)
>
> the dd would just copy the corrupt filesystem to another disk
> you still wouldnt be able to mount or fsck it.
But if he does a dd copy (or use a utility like 
http://www.fsarchiver.org/ that does compression on free space on the 
fly so you don't take an age creating the image if it's largely just 
0's) then you have a bit-wise copy you can return to. Then completely 
wipe and format the drive (check your SMART info first to be sure that 
you're not working with a defective drive) and then "de-archive" the 
files back from the archive image.

You can mess about with how you extract your files, eg 
http://www.cgsecurity.org/wiki/TestDisk, then without worrying about 
corrupting the disk further.

HTH

pbhj
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.lug.org.uk/pipermail/swlug/attachments/20090925/68358886/attachment.html>


More information about the Swlug mailing list