I have a 3TB hard drive which had 16 bad sectors according to SMART data. I ran a surface test with HDSentinel, which increased that number to about 100. Then I directly copied directories to a healthy 3TB HDD, by order of importance (using either Robocopy or SynchronizeIt, which both preserve all timestamps including those of directories), which further increased the number of bad sectors to 416. I think that the best course of action would have been to clone it completely to the other HDD, in order to salvage as much data as possible, since each attempt at reading a bad sector seems to make the problem worse, but there's always the risk of the HDD completely failing before the process is over, and some directories here are much more important than others – anyway, what's done is done, and I have successfully recovered what mattered the most.
During the surface test, HDSentinel provided a list of unreadable sectors, with which I identified 6 files affected by bad sectors ; I moved them to a special folder and tried not to touch them yet – well, I say tried, because at first I wanted to move them with Windows 7 Explorer, but that stupid thing insisted on parsing them as they were selected so as to display a preview, which froze the system for a while and added some more bad sectors to the count, so I had to move those files from the command line...
Side question : how can I preventively disable that preview in such a case ?
Now, I have a few options that I know of to deal with those files :
- Either try to copy them directly with Roadkil Unstoppable Copier (which is supposed to skip bad sectors and salvage what is salvageable).
- Or run ddrescue to extract specifically the range of sectors occupied by corrupted files (plus the first 10GB, so as to have the system files, including the MFT, which should allow me to extract the fragmented files without getting a headache – those corrupted files are mostly catch-up TV broadcasts (no longer online) which were downloaded simultaneously, and I guess that's why they have been written interlaced, with thousands of fragments each, despite the HDD having plenty of free space).
In the second case (which is probably the safest at that point), in order to be sure that I'm not missing anything, I would like to get a list of files having at least one sector in the potentially damaged area. The first bad sector identified was number 4131708368, the last was 4157865694, so I want to identify which files are found between sectors 4131440000 and 4158400000, to have a good safety margin.
After reading this thread, I tried two methods :
With nfi.exe (takes sector values as input, I put a step of 8 to get only one value per 4KB cluster)
FOR /L %N in (4131440000,8,4158400000) DO nfi.exe R: %N >>"G:\nfi ST3000DM001 4131440000-4158400000.txt"
But it doesn't work, it displays negative values. This seems to be a problem of 32 bit limit for the incremental calculation, despite the numbers being below 2^32. By making tests I found out that the problem appeared at 2147483648, which is exactly 2^31. Why is that ?
With fsutil (requires cluster values as input, obtained by dividing the sector values by 8) :
FOR /L %N in (516430000,1,519800000) DO fsutil volume querycluster R: %N >>"G:\fsutil querycluster ST3000DM001 516430000-519800000.txt"
This works, and the presentation is more streamlined than with nfi.exe (one line per cluster), but it's excruciatingly slow : about 1 second per value, it would take 936 hours to finish. It seems to be much faster if the cluster values are entered in a row on the same line, but I wouldn't know how to make an incremental count to add all values within the same line without having to type them, and I guess that the poor little cmd.exe would choke with 3370000 values on the same command...
Is there a better method to get what I want ? Does that sound like a safe and sound approach to that kind of issue ?