3

I've got an interesting problem...

A friend asked me to recover data from a failing external (usb) hard drive, which i've been doing using the ddrescue utility. However, every few hours the drive stops responding (this is why I'm recovering the data) and read speed drops to 0. At this point if i unplug it for 5 mins and plug it back in I can rerun the ddrescue and continue recovering. Im wondering if there is some way to automate this as the read speed is quite slow and there is a lot of data to recover.

I can power down the drive using:

udisks --unmount /dev/sdd1
udisks --detach /dev/sdd

But I have not found a way to spin up the drive again after its been "detached"

The other problem I havent figured out yet is some way to figure out when the read speed has dropped to 0 and its time to do this powercycle.

Anyone have any ideas?

2
  • 2
    Not what you asked for, but it sounds like a heat related problem. If you haven't already done so remove the drive from the case and run it externally (better ventillation) and see if that improves your up time Oct 17, 2012 at 3:03
  • tried that, and tried removing the usb enclosure all together, connecting via SATA, neither helped.
    – Zenshai
    Oct 26, 2012 at 21:28

1 Answer 1

1

You could try usbctl or uhubctl. Both tools are able to switch off/on usb ports if your usb chipset supports that.

After you switch off and on the port with the external disk, it should be recognized again.

To automate this, one could either monitor process activity with lsof or similar or just simple watch the growing size of the output image file and if size does not change after some time, pkill ddrescue once, wait until it terminated itself, then power off/on the disk and restart the ddrescue process.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .