[SATLUG] 1st Q? - RAID5 quit working - Attempting recovery #2

David Labens adlabens at swbell.net
Fri Aug 21 07:05:18 CDT 2009


Sam,

Thank you.  I found this tutorial:
http://www.debianadmin.com/recover-data-from-a-dead-hard-drive-using-ddrescue.html

and have done 
apt-get install ddrescue

I'll read more on it this evening, before I try to make it work.

Thanks,
David Labens

San Antonio, TX

--- On Thu, 8/20/09, Samuel Leon <satlug at net153.net> wrote:

From: Samuel Leon <satlug at net153.net>
Subject: Re: [SATLUG] 1st Q? - RAID5 quit working - Attempting recovery #1
To: "The San Antonio Linux User's Group Mailing List" <satlug at satlug.org>
Date: Thursday, August 20, 2009, 11:41 PM

David Labens wrote:
> Ok, I've tried to mark the /dev/sdc1 as failed:
> 
> root at RCH-SERVER:/# mdadm --fail /dev/md0 /dev/sdc1
> mdadm: cannot get array info for /dev/md0
> 
> root at RCH-SERVER:/# mdadm --fail /dev/md/0 /dev/sdc1
> mdadm: cannot get array info for /dev/md/0
> 
> 
> & I've tried to remove it:
> 
> root at RCH-SERVER:/# mdadm --remove /dev/md0 /dev/sdc1
> mdadm: cannot get array info for /dev/md0
> 
> root at RCH-SERVER:/# mdadm --remove /dev/md/0 /dev/sdc1
> mdadm: cannot get array info for /dev/md/0
> 
> 
> 
> So, I'm unable to mark the /dev/sdc1 (or /dev/sdc) as failed or removed.
> 
> 
> And, I ran:
> 
> root at RCH-SERVER:/# cat /proc/mdstat
> 
> Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
> md0 : inactive sde1[0](S) sdc1[4](S) sdb1[2](S) sda1[1](S)
>       976783360 blocks super 1.0
> 
> unused devices: <none>
> 
> And ...
> 
> root at RCH-SERVER:/# mdadm --assemble --scan
> 
> mdadm: /dev/md/0 assembled from 2 drives - not enough to start the array.
> 
> 
> Can I just remove /dev/sdc and replace it with the new drive, then run:
> sfdisk -d /dev/sdb | sfdisk --force /dev/sdc (to copy the partition layout), 
> and then run:
> mdadm --manage /dev/md0 --add /dev/sdc1 (& not touch the system until it's finished)
> 
> 
> 
> ????? - Or is there something else that I'm missing?
> 
> THANKS!!!
> David Labens
> 
> San Antonio, TX

I think the issue is that those commands can only be run on an active array.  mdadm has already failed 3 of the drives.  To my knowledge the only way around this is to force it to assemble.  But doing that is a one time shot and can really mess stuff up.  It would have better odds if we could get that bad disk out and copy the data to a new disk.  You can try that for now until someone else (hopefully) chimes in.

sfdisk will only copy partition data, we want all data.

So:
dd if=/dev/sdc of=/dev/newdisk
make sure both disks are unmounted

the problem is that dd will stop completely as soon as there is a read error. ddrescue seems to be a better alternative: http://www.google.com/search?hl=en&q=ddrescue+tutorial&aq=f&oq=&aqi=g10 but I have never used it.  I can try looking at the man page tomorrow. Any one here ever used it?

Sam
-- _______________________________________________
SATLUG mailing list
SATLUG at satlug.org
http://alamo.satlug.org/mailman/listinfo/satlug to manage/unsubscribe
Powered by Rackspace (www.rackspace.com)


More information about the SATLUG mailing list