Testdisk: How to recover from "Partition: Read error"
STOP ANY ACTION ON THE DRIVE RIGHT NOW. Good. Now you are no longer compounding the problem, let's try to dig ourselves out of the hole.
Realize your disk is likely failing - anything you do to it can only make it worse.
The first step I would take is to get another equal or larger drive and use ddrescue
to try copy off the raw data. Once this is done, you can then pick at it as you like.
ddrescue
is a godsend, as it gives you multiple bites at the cherry by allowing ongoing attempts to pull data off a failing drive.- I start with a forward pass, when it fails, cancel and start a backwards pass, then just keep it running till I run out of time. (If you get into this problem in the future, check logs and S.M A.R.T to bolster a diagnosis of a failing drive)
Once you have copied as much data as you are going to get, you may want to copy your copy and run testdisk
on that; alternatively, if its to far gone, try photorec
to recover partial files.
![user912830823](https://lh4.googleusercontent.com/-7iMWUfNdmUs/AAAAAAAAAAI/AAAAAAAA1hk/tX6vYlQ39Fk/photo.jpg?sz=256)
user912830823
Updated on September 18, 2022Comments
-
user912830823 almost 2 years
I’m trying to fix an issue with a Seagate 6TB HDD (formatted as exFAT with 3.5TB of data) using
testdisk
, but I think I made things worse:- I left files to copy overnight and in the morning my Mac showed a notification the HDD wasn’t ejected properly, and since then, I haven't been able to mount it
Before I used
testdisk
, I was able to see the HDD greyed out in Disk Utility, displaying errors when trying to mount it, but after the below, I no longer can:- When running
testdisk
for the first time, it displayed the following
I choseNo partition from this disk must be mounted: Open the Disk Utility and press Unmount button for each volume from this disk
Continue
, with the partition table type automatically detected asEFT GPT
Deep Search
showed a number of errors with the EFI partition, statingsomething is != 1
, with it only completing 0.3% after leaving overnightQuick Search
showed two partitions,EFI
andMS Data
Analysis
>Quickly Search
showed the HDD hadP
in front of itP
conirmed all files were there >Write
>Y
went very quickly, but still unable to see the drive on my Mac
- I wondered if this was due to the message displayed in #1, so I reissued
sudo testdisk
after unmounting viasudo diskutil unmountDisk /dev/disk2
Quick Search
>EFI
andMS Data
detected, butMS Data
showed asD(eleted)
P
conirmed all files were there >P
to replaceD(eleted)
>Write
(took ~10-15s)
The HDD no longer displays in Disk Utility and
diskutil list
doesn't show the EFI partition:testdisk
no longer automatically detects partition type- Depending on the partition type I chose, it shows either:
Intel
:Partition: Read error.
EFI GPT
:Trying alternate GPT
- Depending on the partition type I chose, it shows either:
Quick Search
takes ages to run, whereas before it took ~15-20min, it's now been >3hrs- Data on the HDD is no longer viewable via
testdisk
What is my best course of action in the situation?
-
user912830823 about 4 yearsthanks @davidgo. I was running diskdrill for a couple of days now and it says its gonna take around 300 000 hours (around 35 years) tom complerte. I switched it off.. I wonder if for 6TB its gonna be similar with ddrescue? Also i wonder if i sholud try and find a company that repairs disk. Do they have better chances recovering it?
-
davidgo about 4 yearsall ddrescue does is try and get as much raw data off the disk as possible. Unfortunately you have likely compounded the issues by continuing to stress the failing disk. A specialist company does have a better chance of recovery. For a start they can use a cleanroom to do physical disk operations you are unable to do.
-
JW0914 about 4 years@user912830823 You're getting astronomically high finish times due to physical damage to the platters or heads, as it's essentially stalling while trying to read bad/damaged sectors. Install
smartmontools
, then issuesudo smartctl -a /dev/disk2
> Review the S.M.A.R.T output for damage (will be below the S.M.A.R.T values) > Run S.M.A.R.T short and long tests viasctl="sudo smartctl"; disk="/dev/disk2"; $sctl -t short $disk && $sctl -a $disk; $sctl -t long $disk && $sctl -a $disk
(Short test takes 1min, check Long progress via$sctl -a $disk | grep progress
)