Is it safe to copy files via Testdisk from an unmounted drive?

Using PhotoRec to recover lost data
Forum rules
When asking for technical support:
- Search for posts on the same topic before posting a new question.
- Give clear, specific information in the title of your post.
- Include as many details as you can, MOST POSTS WILL GET ONLY ONE OR TWO ANSWERS.
- Post a follow up with a "Thank you" or "This worked!"
- When you learn something, use that knowledge to HELP ANOTHER USER LATER.
Before posting, please read https://www.cgsecurity.org/testdisk.pdf
Post Reply
Message
Author
blake
Posts: 5
Joined: 23 Sep 2019, 17:03

Is it safe to copy files via Testdisk from an unmounted drive?

#1 Post by blake » 23 Sep 2019, 17:19

Hello,

I have a 4tb portable external WD drive that has bad sectors & I have attempted to make an image of the drive with ddrescue-GUI. Unfortunately, the process has been attempted thrice with ddrescue-GUI stalling or not making any progress for +15 hours. Testdisk reads the drive fine & can see the files when I list them via the 'p' shortcut. Testdisk has been used on the drive only in its unmounted state to avoid writing data on the failing drive.

I tried copying a folder via Testdisk from the faulty drive to a new drive which copied it successfully with 0 failures. I then checked the S.M.A.R.T status of the drive & the current pending sectors haven't increased.

So, is it safe to copy the folders via TestDisk without mounting the drive as Ddrescue-GUI is facing problems? Or should I attempt making an image of the failing drive with TestDisk?

Sponsored links

User avatar
cgrenier
Site Admin
Posts: 4972
Joined: 18 Feb 2012, 15:08
Location: Le Perreux Sur Marne, France
Contact:

Re: Is it safe to copy files via Testdisk from an unmounted drive?

#2 Post by cgrenier » 24 Sep 2019, 05:59

As the disk had bad sectors, nothing is 100% safe. It's better to copy the most precious files first.

blake
Posts: 5
Joined: 23 Sep 2019, 17:03

Re: Is it safe to copy files via Testdisk from an unmounted drive?

#3 Post by blake » 24 Sep 2019, 06:11

Thank you for your response @cgrenier.

Copying the most important files is what I intend to do..as ddrescue is hanging with the drive being in 'D' state for hours, creating an image is becoming difficult.

I wanted to know whether Testdisk will cause more harm to the drive (like increasing the raw read errors) while copying the data while the faulty drive is unmounted?

recuperation
Posts: 333
Joined: 04 Jan 2019, 09:48
Location: Hannover, Deutschland (Germany, Allemagne)

Re: Is it safe to copy files via Testdisk from an unmounted drive?

#4 Post by recuperation » 24 Sep 2019, 08:12

blake wrote:
24 Sep 2019, 06:11
Thank you for your response @cgrenier.

Copying the most important files is what I intend to do..as ddrescue is hanging with the drive being in 'D' state for hours, creating an image is becoming difficult.

I wanted to know whether Testdisk will cause more harm to the drive (like increasing the raw read errors) while copying the data while the faulty drive is unmounted?
Any access to a dammaged drive is risky and could cause more harm regardless of the software used. I do not necessarily consider an increase of the "raw read errors" as harm to the drive.

The advantage of ddrescue is that it's minimizing head movements by reading sectors in a linear way unless it hits faulty sectors where it tries to jump over the affected area. Furthermore if the affected drive contains lots of small files, ddrescue could reduce the time needed to copy the files by copying the drive. If the "on time" used for recovery puts a broken drive under stress any strategy to minimize that time is good.

The risk is real. I had two Samsung S1 Mini drives (1.8''-drives) that I used as mobile drives. They both broke most probably due to my handling. I remember modifying the ddrescue parameters, rerunning ddrescue into another rescue file.
The second run gave me errors at places where the first run succeeded.

blake
Posts: 5
Joined: 23 Sep 2019, 17:03

Re: Is it safe to copy files via Testdisk from an unmounted drive?

#5 Post by blake » 24 Sep 2019, 09:31

recuperation wrote:
24 Sep 2019, 08:12

I do not necessarily consider an increase of the "raw read errors" as harm to the drive.
The Raw Read Error rate was 235 before copying files & went up to 531 after Testdisk completed the copying. Is that ok? Shouldn't unmounting a drive reduce the read errors (if not at all)?

Yes, ddrescue seems to be my best bet, but unfortunately it freezes at 30% when a forward pass is run, with no progress showing up in the terminal window. It does not even start the process when started from backwards (initially, when ran backwards, it would recover data @ 105kb/s estimating around 210 days for a 4tb drive) I had to reboot the system as ddrescue would show up as 'D' state in the Process Manager & would not close or be terminated.

Currently using photorec to recover files of partial image file created by ddrescue. Photorec seems to find more files on this .img file than testdisk (although testdisk retained the file structure, & was faster.) Why is that?

Thinking of doing a fresh attempt via ddrescue after photorec finishes as I have only two other drives of 4tb file size - one for image creation & one for file restoration from the image created. Is that my best move forward? The data is certainly important, but not valuable for +1000$ required by recovery companies.

Thank you for your help!

recuperation
Posts: 333
Joined: 04 Jan 2019, 09:48
Location: Hannover, Deutschland (Germany, Allemagne)

Re: Is it safe to copy files via Testdisk from an unmounted drive?

#6 Post by recuperation » 24 Sep 2019, 10:57

blake wrote:
24 Sep 2019, 09:31
recuperation wrote:
24 Sep 2019, 08:12

I do not necessarily consider an increase of the "raw read errors" as harm to the drive.
The Raw Read Error rate was 235 before copying files & went up to 531 after Testdisk completed the copying. Is that ok? Shouldn't unmounting a drive reduce the read errors (if not at all)?
No - if you associate unmounting with no disk activity. If you measured it this way the rate should approach zero. The numbers of "read errors" should never decrease but this is not how the SMART attribute is labeled, it is the "read error rate".
That rate should not decrease due to an idling drive.
Unfortunately I am not aware of the exact definition!

Yes, ddrescue seems to be my best bet, but unfortunately it freezes at 30% when a forward pass is run, with no progress showing up in the terminal window. It does not even start the process when started from backwards (initially, when ran backwards, it would recover data @ 105kb/s estimating around 210 days for a 4tb drive) I had to reboot the system as ddrescue would show up as 'D' state in the Process Manager & would not close or be terminated.
Try to run ddrescue with the direct i/o enabled. See if the drive in question performs differently on a different machine with a different interface.
Maybe the drive where your ddrescue logfile resides is full.
Currently using photorec to recover files of partial image file created by ddrescue. Photorec seems to find more files on this .img file than testdisk (although testdisk retained the file structure, & was faster.) Why is that?
Testdisk uses the meta structures of a file system, Photorec does not. Fragmentation reduces the effectiveness of Photorec. The mode of Photorec is like searching in the dustbin, looking for stuff that seems familiar. The mode of Testdisk is a more tolerant way of file system access.

Thinking of doing a fresh attempt via ddrescue after photorec finishes as I have only two other drives of 4tb file size - one for image creation & one for file restoration from the image created. Is that my best move forward? The data is certainly important, but not valuable for +1000$ required by recovery companies.

Thank you for your help!
Using the old ddrescue logfile you can continue your old run. If you use direct i/o that does not affect the rescue file layout.
If "fresh attempt" means a completely new search that is more risky.
Your best move is to invest in backup drives that you would temporarily use for recovery purposes now.

blake
Posts: 5
Joined: 23 Sep 2019, 17:03

Re: Is it safe to copy files via Testdisk from an unmounted drive?

#7 Post by blake » 24 Sep 2019, 13:28

No - if you associate unmounting with no disk activity. If you measured it this way the rate should approach zero. The numbers of "read errors" should never decrease but this is not how the SMART attribute is labeled, it is the "read error rate".
That rate should not decrease due to an idling drive.
Unfortunately I am not aware of the exact definition!
Oh..thank you for the explanation. I appreciate it! Actually I was expecting the read errors to stay at 235 since the drive was unmounted ( and not 0) but maybe I am wrong to think that.
Try to run ddrescue with the direct i/o enabled. See if the drive in question performs differently on a different machine with a different interface.
Maybe the drive where your ddrescue logfile resides is full.
Could you please explain how to run ddrescue with i/o enabled? This method seems hopeful. I am using ddrescue-GUI which enables direct access. Not sure if they both are the same thing. I searched through the manual but to no avail.
Using the old ddrescue logfile you can continue your old run. If you use direct i/o that does not affect the rescue file layout.
If "fresh attempt" means a completely new search that is more risky.
Your best move is to invest in backup drives that you would temporarily use for recovery purposes now.
Yes, 'fresh attempt' meant a completely new search..I was scanning with the setting of 0 retries for bad sectors, but I shall use the old ddrescue logfile/mapfile to continue where it left off as it is a safer option.

recuperation
Posts: 333
Joined: 04 Jan 2019, 09:48
Location: Hannover, Deutschland (Germany, Allemagne)

Re: Is it safe to copy files via Testdisk from an unmounted drive?

#8 Post by recuperation » 24 Sep 2019, 17:25

blake wrote:
24 Sep 2019, 13:28
Could you please explain how to run ddrescue with i/o enabled? This method seems hopeful. I am using ddrescue-GUI which enables direct access. Not sure if they both are the same thing. I searched through the manual but to no avail.
https://www.gnu.org/software/ddrescue/m ... isc-access

blake
Posts: 5
Joined: 23 Sep 2019, 17:03

Re: Is it safe to copy files via Testdisk from an unmounted drive?

#9 Post by blake » 25 Sep 2019, 17:05

Thank you for the link. Yes, the ddrescue process is direct access enabled.

I have restarted the process, this time changing the usb ports & it seems to working at the moment @2024 kb/s. I am using the same img file & log file. Fingers crossed!

Post Reply

Who is online

Users browsing this forum: No registered users and 16 guests