LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   DDRescue - advice needed in rescuing failed disk (https://www.linuxquestions.org/questions/linux-hardware-18/ddrescue-advice-needed-in-rescuing-failed-disk-881611/)

kayasaman 05-19-2011 10:17 AM

DDRescue - advice needed in rescuing failed disk
 
Hi,

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:

Code:

# /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:

http://comments.gmane.org/gmane.comp....dump.user/407

another example is this:

http://lists.samba.org/archive/linux...ay/007140.html

http://www.linuxquestions.org/questi...-error-312768/

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:

http://www.gnu.org/software/ddrescue/ddrescue.html

http://www.gnu.org/software/ddrescue...ue_manual.html

http://ubuntu-rescue-remix.org/node/80

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:

Code:

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!


Regards

TobiSGD 05-19-2011 10:23 AM

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

kayasaman 05-19-2011 11:43 AM

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:

Code:

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 11:52 AM

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 11:59 AM

Ok cool :-)

Thanks so much for all the help!!!

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


Regards,


Kaya

kayasaman 05-29-2011 04:39 AM

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

Code:

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

I was using the command:

Code:

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:

Code:

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 10:54 AM

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

kayasaman 05-29-2011 11:38 AM

Thanks!

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

http://bashinglinux.wordpress.com/tag/dd_rescue/

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:

http://www.cgsecurity.org/wiki/Advan...kup_SuperBlock

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 03: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 04:49 PM

Quote:

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:

Code:

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:

Code:

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

Code:

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

Code:

e2fsck -p /dev/sdc1
....you 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:

Code:

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:
Quote:

"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 06:58 PM.