-   Linux - Hardware (
-   -   DDRescue - advice needed in rescuing failed disk (

kayasaman 05-19-2011 11:17 AM

DDRescue - advice needed in rescuing failed disk

I have an Ext3 formatted 750GB Seagate (enterprise SATAII) drive connected to an obsolete PIV (non HT) based server through a PCI SATA adapter card.

This machine runs FreeBSD 8.0 x32 (disk migrated over from a dead Linux box) however since the disk is Ext3 I reckon that Linux would be the best backup solution for it.

The error I'm getting is not dissimilar to this:


# /sbin/dump -0 -f - -I 32767 /dev/hda7 | rsh ...
  DUMP: Date of this level 0 dump: Sun Aug 10 14:39:51 2008
  DUMP: Dumping /dev/hda7 (an unlisted file system) to standard output
  DUMP: Added inode 8 to exclude list (journal inode)
  DUMP: Added inode 7 to exclude list (resize inode)
  DUMP: Label: /cricket1
  DUMP: mapping (Pass I) [regular files]
/dev/hda7: Can't read next inode while scanning inode #212576

Taken from here:

another example is this:

Even though I was running e2fsck on it through the Gentoo based System Rescue CD.

From my reading it occurs to me that I won't be able to recover this disk without either a full format or alternatively the hardware maybe on it's way out!

As a temporary measure I've disconnected the drive for the moment so it's sitting idly in the chassis with no Power or SATA connection.

Having a look through various ddrescue sources:

I am a bit confused as to which backup method I should use???

The disk has only one partition on it spanning the full drive.

My guess would be to do something like so:


ddrescue -f -n /dev/hda /dev/hdb logfile
of course giving correct ID's for the disk.

I think the thing that confuses me most is that this disk is 750GB but I don't have anything similar which means I need to go out and buy a new disk. If I got myself a 1TB or 2TB SATA drive would I still be able to use the above method or would I need to give separate options???

I couldn't find any mailing list for DDrescue so I have no idea really where the best help could be attained from?

Many thanks for any responses!


TobiSGD 05-19-2011 11:23 AM

If your backup disk is similar or larger you will have no problems with the command you mentioned.

kayasaman 05-19-2011 12:43 PM

Thanks Tobi!

What confused me with the above is that I wasn't quite sure if the program copies the raw disk data across to the new raw device or if it creates an image..... due to the MBR of the disk having a fixed size if copied across wouldn't the new disk's MBR either think that the drive is lower capacity then is or would there be some kind of physical mess-up due to more blocks being seen then is allocated at the head of the drive?

I'm guessing if by your statement the tool already allocates for the new size then the procedure would be to first run the above command coupled with:


e2fsck -p /dev/hd_device
after before mounting.

However, coming back to what I mentioned before will the new space then be available for use or would I need to bounce it to another drive then reformat and transfer again before the disk is in a 'stable' situation?

Thanks :-)

TobiSGD 05-19-2011 12:52 PM

I have done that many times, the copying of the partition table will "create" a partition in the same size as on the old disk. The rest of the disk will be unpartitioned. I never had any problems with that, but I think that an e2fsck can not be an disadvantage.

kayasaman 05-19-2011 12:59 PM

Ok cool :-)

Thanks so much for all the help!!!

This was the backup drive for my network so..... lol. Yeah. erm anyway.



kayasaman 05-29-2011 05:39 AM

Hi, coming back to this thread after attempting a recovery; unfortunately I am getting the error:


Bad superblock on device, use alternate superblock....
after e2fsck -p /dev/sdc.

I was using the command:


ddrescue -n -r3 /dev/sdd /dev/sdc logfile
where sdd is a 750GB drive and sdc is a 2TB drive.

I google'd around but unfortunately found no responses to people with the same problem?

At this moment I have got:


dd_rescue -e 1 -A /dev/sdd /dev/sdc
running, which seems to actually work faster. The only thing is that if I get the same error again what do I do?

I guess alternately I could run the command and use a .dd image as output on an already created filesystem then attempt the rescue and mount from there?

Can anyone suggest anything?

Many thanks.

anomie 05-29-2011 11:54 AM

One idea: get System Rescue CD and use testdisk to locate an alternate superblock.

kayasaman 05-29-2011 12:38 PM


Yeah I see that; I actually found it through this thread post responding:

I have the system rescue cd currently in the machine which I was using from the beginning :-) as it's kinda my life line.

We'll see if that works however, as the data should be intact - the error size that ddrescue is coming up with is only ~90kB.

Hopefully the testdisk command will work:

is how to use for 'alternate superblock'.

Cross-fingers :-)

- will have to wait till tomorrow evening though until the thing finishes recopying :-( yeah it takes all be it round 15 hours for 750GB.

anomie 06-02-2011 04:48 PM

Can you post the outcome - including what you did, what worked, what didn't, etc.? These types of threads are often helpful for future reference.

kayasaman 06-02-2011 05:49 PM


Can you post the outcome - including what you did, what worked, what didn't, etc.? These types of threads are often helpful for future reference.
Sure :-)

Sorry I was about to however I just got extremely busy in my personal life and ended up on a semi-vacation!

What happened was that I ran:


ddrescue -n -r3 /dev/sdd /dev/sdc logfile
eventually. As per before.

This coupled together with one thing I missed before which was the command:


e2fsck -p /dev/sdc
The reason for the:


Bad superblock....
message previously was due to the fact that I didn't include the partition number:


e2fsck -p /dev/sdc1 would think out of nearly 10 years UNIX experience I wouldn't have missed that????

Anyway, due to what seemed to be a corrupted file system I needed to run:


e2fsck -y /dev/sdc1
This fixed a lot inode issues and I ended up with quite a few items in the: lost + found directory

I don't know yet what they were as the disk I used is a backup disk and currently disconnected from the machine due to lack of drive and power support within as it's an ancient pre-HT PIV with no SATA so I have an additional PCI based SATA card in there which is compatible with both BSD and Linux.

The crazy thing is however now that I managed to rescue this drive another much newer drive seems to be having I/O issues as through NFS when connected with my Ubuntu notebook I get system freeze on my BSD server.

Once I managed to catch a dmesg output on the TTY claiming:

"Read Error"
however the next time I tried to read from the disk nothing was mentioned however the system just froze :-(

I just rebooted now and am waiting for the disk checks to go through even though last time it claimed the disk was clean....?

To be honest I really need to get the disk into a proper SATA port hardwired on a system board and see what happens then rather then Frankensteining as per what I have done.

Assumptions though is that if my hunch is correct and the disk is suffering from I/O issues then dd_rescue tool will be better as that caters for those kinds of errors much better then ddrescue which seems to cater for block errors better.

That will most likely have to be run through FreeBSD however, as my Gentoo based System Rescue CD may not like the UFS2 partition on it.

Will post more on my findings when I actually have achieved a recovery, will need to buy a new disk first though! :-)

All times are GMT -5. The time now is 12:06 AM.