[SWLUG] RAID Array data recovery
Matthew Moore
matt at matthewmoore.org.uk
Fri Sep 25 19:45:43 UTC 2009
swlug wrote:
> 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.
>
Yup, that's pretty much what I'm planning on doing. I'm just seeing if
I can get a disk in Cardiff for close to what I'd pay ebuyer. If not
I'll order one and fiddle around with it later on in the week.
I'm sure it's because I've powered off the server mid-write and not disk
failure. I'll dd the data over to a new drive, re-establish the raid
and use some kind of recovery utility to get the data back.
Should work, fingers crossed.
Cheers,
Matt
More information about the Swlug
mailing list