-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Help] Recovering data based on list of flawed sectors. #55
Comments
Hello, Let's try! If fuse-exfat manages to mount the image, chances are good. First of all, I'd ensure that FS metadata is OK. Does |
Hello, First of all, thanks for the answer. About
Note: I see the output only give the file's name, without its path inside the FS; what if I have multiple files with the same name? The output lacks its context, I guess. As you can see, 409 GiB are free, so the other bad sectors might be inside the empty space. Thanks for support. |
That's strange. This error means cluster bitmap is corrupt, which should not be the case because missing parts start at 0x93B04F1000. Cluster bitmap is located at the beginning of the FS.
You can enable debug output to make diff --git a/fsck/main.c b/fsck/main.c
index 19628e8..f4bbc94 100644
--- a/fsck/main.c
+++ b/fsck/main.c
@@ -26,7 +26,7 @@
#include <inttypes.h>
#include <unistd.h>
-#define exfat_debug(format, ...)
+// #define exfat_debug(format, ...)
uint64_t files_count, directories_count;
I'd do the following:
This will be slow, but unfortunately exFAT does not have a reverse mapping for clusters, i.e. you cannot easily tell which file uses a particular cluster. |
I hope you're fine and safe. :) |
Hello! Sorry, it has been a while without news, but I finally got my scripts working. So, I made two Python files, which can be reused efficiently (I hope it will help someone else too, so this message is kind of a tutorial) (note: GitHub doesn't want Python files, so I "gzip-ed" them):
And that's it. But somehow, I am a bit confused, because the last script didn't find any match on my image with the list of files and the list of flawed sectors. I made two files for some tests, and those work as expected. Sorry for providing some not-so-user-friendly pieces of software, you have to open their content to modify some paths (in the end of the files, before the call for the main function). I hope to hear from you soon, to be sure I didn't miss some information (I was aware about the value in bytes). Thanks again, and have a nice day. |
Oh, I forgot, here are the test files for the 2nd script: |
@relan would you consider adding the linked scripts to |
No, the author said those scripts didn't work as expected.
Recovery utility would be nice to have, but realistically I'll hardly have any time to implement and (more importantly) test it. |
Understood. Either way if you had at least ideas what and how such "recovery" utility should work, just describe it in your own words in a TODO section in |
Hello everyone, Glad those scripts could help someone else.
Uh, no, I said “I [was] a bit confused, because the last script didn't find any match on my image with the list of files and the list of flawed sectors”; which in facts means “no files were corrupted”, which is a good news. However, I might have to rework some part of those Python scripts, IIRC, I think I made some mistakes, or even to update it to Python 3.7 (subprocess module got another update for its run method). Best regards, |
Oh, I misunderstood you then. |
Hello, Beforehand I tried |
I've also succesfully used slightly modified versions of @thican's scripts - note that seek_matches.py (line 37) does not handle non-scraped ranges (status '\') correctly - they should be considered bad sectors as well, since these ranges are not copied by ddrescue. |
Hello,
Note: I was trying to find an email address for this kind of support, but as the Readme file requests it, I am opening a new issue.
TL;DR: Ask help for a tool which can indicate which file (or none) belongs to a sector/block/whatever.
Couple of years ago, one of my HDD was becoming faulty; so I unplugged it, and few days later, I did a recover of its data using GNU's ddrescue. Inside this HDD, only one partition with an exFAT FS, covering almost the whole support (inside an MBR partition table, IIRC).
As a result, I have two files, the first as a RAW data file, a (almost) perfect copy of the partition which I can mount using loop devices (working nicely), and the second as a ddrescue's log file, which contents a list of faulty sectors when trying to recover data from the HDD.
Based on this logfile, I have something like 4 MiB of bad sectors on a 1.4 TiB FS; but the problem is I don't know if those bad sectors were holding data, or were deleted files.
I guess I am looking for a tool which can "reverse" the searching process, and then tells us “this sectors belongs to file "/path/to/file"” or “no content on this sector”. As my final objective, I want to get the list of broken files, and finaly recover the other data from this RAW image to another safe device.
I guess I could try to implement myself this tool, but I don't know the "protocol" behind exFAT, hence my request for support, please.
Hope to hear from you soon.
Here a little paste from the logfile:
The text was updated successfully, but these errors were encountered: