[SATLUG] RAID5 Recovery - ddrescue 3rd round - CMP'd

Samuel Leon satlug at net153.net
Tue Aug 25 09:34:08 CDT 2009


David Labens wrote:
> Sam, the results have not changed.  So, tonight (& I'm off work tomorrow - it's my Saturday, if they don't call us in) I shall follow the next step of instructions you've provided.
> 

Here is an updated guide for the next steps:

First make sure that the raid superblocks are the same for both the old 
and new drive:
mdadm --examine /dev/sda /dev/sdb

Then shutdown, reconnect everything and bring the computer up.  Might 
also make sure that all your disks are linked to the right device names 
as needed (sda,sdb ect)


then force the array to reassemble:
mdadm --assemble --force /dev/md0 /dev/sde1 /dev/sda1 /dev/sdb1 /dev/sdc1


(make sure those drive numbers are right, I copied them from an earlier 
post. Also, if you don't get some output saying that the array *has been 
started* then you need to stop right here.  The output you should get 
should be similar to:
mdadm: forcing event count in /dev/hdd1(2) from 228 upto 232
mdadm: clearing FAULTY flag for device 1 in /dev/md0 for /dev/hdd1
mdadm: /dev/md0 has been started with 2 drives (out of 3).
)

That should bring it up in degraded mode with one failed drive. So then do:
mdadm -D /dev/md0

and that will list some info and at the bottom you will see what drive 
is still removed.  So add it to the array with:

mdadm --add /dev/md0 /dev/sdX

but if there is still more than one drive missing from the array at this 
point never use mdadm --add because something is wrong and that will 
make it worse.

If added correctly, the array should start to resync.  Let it finish and 
  make sure the filesystem on /dev/md0 stays unmounted.  Once it is done 
resyncing check the filesystem (if it is ext3) with:
e2fsck -D -f /dev/md0

You will probably get some errors and have to press "y" a hundred times. 
Any files that are lost will be put in your lost+found folder and will 
be given their inode number as the file name.

Then you can mount the filesystem on /dev/md0. Then you should be done. 
I will be away from the computer today from about 7pm-9pm

Sam


More information about the SATLUG mailing list