Find the answer to your Linux question:
Results 1 to 3 of 3
Hello everybody, I was asked by a friend to help him out with a broken HDD. Its a 2.5" Sata drive of a laptop wich was dropped and now you ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2011
    Posts
    2

    Rescue broken HDD


    Hello everybody,

    I was asked by a friend to help him out with a broken HDD. Its a 2.5" Sata drive of a laptop wich was dropped and now you can clearly hear that something is wrong although you can still acess the drive. I started rescueing the whole disk with ddrescue (GNU) using the following command:
    Code:
    ddrescue --no-split /dev/sdb /media/home/image01 logfile
    The problem is that ddrescue is damn slow (about 5 KB a second, at this rate it would take me 44 days to complete the rescue process) and I guess that some kind of kernel abstraction prevents ddrescue from skippping bad sectors. I have no proof for that and it's just a guessing but I imagine that ddrescue accesses the drive through the kernel which interacts with the drive and as the drive returns bad data, the kernel tries to re-read that data until it finally gives up and returns command to ddrescue which then continue with the next block.

    Am I right with my guess and is there any way of disabling such mechanisms? I read that there is a "--direct" option for ddrescue but the manual states that it's probably taking more time then..?

    In case you need to know something about my kernel. I'm using archlinux kernel 2.6.36.

    Dmesg outputs the following:
    Code:
    ata6.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
    ata6.00: irq_stat 0x40000001
    ata6.00: failed command: READ DMA
    ata6.00: cmd c8/00:00:e0:16:05/00:00:00:00:00/e0 tag 0 dma 131072 in
             res 51/40:29:b7:17:05/00:00:00:00:00/e0 Emask 0x9 (media error)
    ata6.00: status: { DRDY ERR }
    ata6.00: error: { UNC }
    ata6.00: configured for UDMA/100
    ata6: EH complete
    ata6.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
    ata6.00: irq_stat 0x40000001
    ata6.00: failed command: READ DMA
    ata6.00: cmd c8/00:00:e0:16:05/00:00:00:00:00/e0 tag 0 dma 131072 in
             res 51/01:29:b7:17:05/00:00:00:00:00/e0 Emask 0x1 (device error)
    ata6.00: status: { DRDY ERR }
    ata6.00: configured for UDMA/100
    ata6: EH complete
    ata6.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
    ata6.00: irq_stat 0x40000001
    ata6.00: failed command: READ DMA
    ata6.00: cmd c8/00:00:e0:16:05/00:00:00:00:00/e0 tag 0 dma 131072 in
             res 51/40:29:b7:17:05/00:00:00:00:00/e0 Emask 0x9 (media error)
    Any help is appreciated!!

  2. #2
    Just Joined!
    Join Date
    Mar 2009
    Location
    Norway
    Posts
    67
    as a general rule of thumb - whenever you do this, try to make an *exact* copy of the disk before you do anything else!

    Code:
    dd if=/dev/sdb of=/media/home/image01
    If this succeeds, you should have all the data in a binary file which you then can mount as a disk via the loopdev like so
    Code:
    mount -o loop media/home/image01 /some/target/folder/

  3. #3
    Just Joined!
    Join Date
    Jan 2011
    Posts
    2
    Thanks for your reply. I did try to copy files with cp and then with dd first but as both just returend I/O Errors I started to look for an alternative.

    I originally planned to use dd_rescue with dd_rhelper but on the author's homepage I read that ddrescue should be preferred as it is probably faster and not as quirky as the shell script is.

    I'm now with 670 MB (of 192 GB) and got about 260 errors. I was faster (actually the average rate at the moment is at 45 kb/s) but now I' down at 102 B/s again....

    EDIT: Ok, I think I've got all bad sectors behind me now as the data rate went up to 40 MB/s and I've got about 40 GB rescued data.
    Last edited by schneida; 01-21-2011 at 05:47 PM.

  4. $spacer_open
    $spacer_close

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •