4

So I've got a 3TB hard disk with bad sectors attached to my MacBook Pro 2015 via a USB 3.0 to SATA adapter from Unitek.

I'm trying to run PhotoRec (a part of the TestDisk suite) with maybe 10 common file types enabled (most are picture formats, others include .txt and .doc, etc…), and after spending roughly three hours on pass 0, it's finally gotten to pass 1 and is expected to take over 480,000+ (!!!) hours on the recovery.

The timer went down suddenly as maybe 10 different files were found, but the utility seems to have been frozen for the last ~12 hours at this screen:

Frozen screen

Is PhotoRec frozen, or will it resume shortly? How long can I actually expect this job to take? Can I cancel and resume the job? Would that help anything?

Giacomo1968
  • 53,069
  • 19
  • 162
  • 212
Next-Door Tech
  • 1,252
  • 8
  • 22
  • 3
    Why are you running it? If you are experiencing read errors on the disk, the disk will likely fully fail long before photorec finishes. Consider ddrescue instead (which will skip over erroring sectors to recover as much data as possible) and then running photorec over the resulting image. – Bob Sep 05 '18 at 01:21
  • 4
    The estimate is that long due to the bad sectors. How long it will actually take, we couldn't say, it likely will continue to attempt to read a sector until it's successful. This type of utility if done on the actual disk will only make data recovery more difficult. – Ramhound Sep 05 '18 at 01:21
  • Ok, what `ddrescue` command would I use to create a .iso of the drive `/dev/disk2` at `/path/to/image.iso`? – Next-Door Tech Sep 05 '18 at 01:52
  • 1
    @Cancun101 I'd suggest skimming through the [info pages](https://www.gnu.org/software/ddrescue/manual/ddrescue_manual.html) if you have time, or at least taking a look through the [examples](https://www.gnu.org/software/ddrescue/manual/ddrescue_manual.html#Examples). Especially note example 3, which you may need (i.e. Some drives will lock up on a failed read so you might need to manually power-cycle the drive and instruct ddrescue to skip ahead past the damaged sectors by manually calculating a number of blocks to skip. For the drives that respond, ddrescue does that automatically.) – Bob Sep 05 '18 at 02:05
  • Possible duplicate of [Why do damaged hard drives freeze the entire system?](https://superuser.com/questions/954262/why-do-damaged-hard-drives-freeze-the-entire-system) – Bob Sep 05 '18 at 02:07
  • ^ I'm voting this as duplicate because your primary question is asking *why* it's taking so long. If you'd rather ask how to work around it, feel free to edit & vote to reopen, or ask a new question (though I do believe we have questions addressing ddrescue already). Incidentally, this is why we prefer not to have multiple questions in one, because each part is usually better explained elsewhere and duplicating that effort is a bit of a waste of time. – Bob Sep 05 '18 at 02:08
  • No problem, I think I've got the answers I need for now. If I have more questions I'll just make a new post with the new details because I'm dealing with ddrescue now. – Next-Door Tech Sep 05 '18 at 02:11
  • Actually, sorry, I'm retracting the close vote. I just realised it's asking something different ("freezing the entire system"). The answer is still a good read though. – Bob Sep 05 '18 at 02:11
  • Could be the usb to sata adapter too, they can cause problems or just slow things down. If you can directly connect the HD to the (or another) computer it might help – Xen2050 Sep 05 '18 at 02:50
  • When it hits the bad sectors it is trying to re-read the bad sector, depends on how many tries photrec is coded to retry how long it will take, there may be a setting to reduce number of re-trys or skip bad sectors. – Moab Sep 05 '18 at 20:46

1 Answers1

4

It is probably taking so long due to read errors on the source disk (highly likely due to the bad sectors). The target disk may also cause slowdowns if it spins down in the interval between successful read operations.

You can cancel and resume the job. In order to do so you must launch photorec from the same directory where you previously launched it so that it will find the photorec.ses file that stores the session information.

Power cycling may help, but may also load with the crashing disk completely failing.

As others suggested - running photorec with a disk image created by ddrescue is a much safer approach since ddrescue first skips the bad sectors and only tries to read them after reading all the good sectors.

Lobz
  • 41
  • 2