0

I'm trying to get an image from a damaged USB stick using ddrescue. The process works for the first 100MB of the drive then gets completely stuck: the ddrescue output is frozen (not moving even for hours).

The ddrescue process is in "D" - Uninterruptible sleep (usually IO) state and signals won't stop it, only unplugging the usb drive will.

It seems the I/O errors don't reach ddrescue, so it can't move on to the next block. Is there a way to make sure the kernel returns an I/O error to ddrescue, so it can move on?

I ran ddrescue with the default options:

sudo ddrescue /dev/sdc /tmp/image_usb_rescue.img /myt/image_usb_rescue.log

Using dd instead of ddrescue led to the same result (process stuck).

I get the following message on dmesg:

[ 2247.230715] usb 1-2: reset high-speed USB device number 15 using xhci_hcd
[ 2247.381353] sd 0:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_TIME_OUT driverbyte=DRIVER_OK cmd_age=1s
[ 2247.381377] sd 0:0:0:0: [sda] tag#0 CDB: Read(10) 28 00 00 05 eb 00 00 00 f0 00
[ 2247.381385] blk_update_request: I/O error, dev sda, sector 387840 op 0x0:(READ) flags 0x84700 phys_seg 30 prio class 0
[ 2252.054160] usb 1-2: reset high-speed USB device number 15 using xhci_hcd
[ 2252.203889] sd 0:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_TIME_OUT driverbyte=DRIVER_OK cmd_age=1s
[ 2252.203912] sd 0:0:0:0: [sda] tag#0 CDB: Read(10) 28 00 00 06 19 00 00 00 f0 00
[ 2252.203920] blk_update_request: I/O error, dev sda, sector 399616 op 0x0:(READ) flags 0x84700 phys_seg 15 prio class 0
[ 2254.610160] usb 1-2: reset high-speed USB device number 15 using xhci_hcd

To make sure it wasn't a USB controller driver issue, I tried the rescue on two different systems (AMD desktop and Intel laptop). The results were the same.

I tried to unplug, plug the USB stick and start ddrescue again with the --input-position option to skip the bad area, it works but the number of issues makes it impossible to do it manually.

4
  • Could you try dd instead? Feb 22 at 2:31
  • 1
    what is your specific ddrescue invocation? what options did you use? check out my answer here on how to get as much data out of ddrescue as quickly as possible: superuser.com/a/786544/171793 Feb 22 at 3:56
  • I edited my question to add the ddrescue command (default options) and dd result (stuck on error, just as ddrescue) Feb 23 at 0:34
  • try using --no-split. if that doesn't do anything, then move onto phase 2, with somthing like ddrescue --direct --max-retries=3 /dev/hda1 imagefile logfile . use the same image and log file you have been working with, so the results merge. Feb 23 at 3:07

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.