I'm currently engaged with an argument with a coworker over which method is more wise. I'm not going to reveal which side I am on and attempt to describe the issue as evenhandedly as possible.
The argument is over which is more damaging to a drive.
Scenario:
A drive is diagnosed as being unable to mount in Windows but will copy data under Linux. The drive copies and begins to IO. Technician does not notice the drive has IO'd until the copy is finished and he is QCing the drive to make sure all the data reached the destination. There are several files missing.
Technician A wants to use ddrescue to image the drive.
Technician B wants to use ddrescue to copy only the files that the terminal copy missed.
Verbatim arguments (have been cleaned up for grammar and spelling to make it more difficult to determine which I am.)
The script in question is:
Code:
IFS=$(echo -ne “\n\b”);
for file in \
$(\
diff \
<(find /media/source/ -type f | sed ‘s|^/media/source/||’ | sort) \
<(find /media/destination/ -type f | sed ‘s|^/media/destination/||’ | sort) | \
grep ‘^<’ | cut -c3-);
do ddrescue -dvr10 \
/media/source/”$file” \
/media/destination/$(sed ‘s/[^a-zA-Z0-9 .]//g’ <(printf %q $file));
done
Technician A's argument is:
Quote:
There could be some MFT entries themselves for files in I/O areas. These files will be skipped and I don't think your script accounts for that. Also, in the case of fragmented files, instead of a full DD which images smoothly, this script could jump 100+ different places for these files, potentially damaging the platters and making previously recoverable data unrecoverable.
Technician B's argument is:
Quote:
You're arguing that the script will hammer the drive, but the script touches the drive far less than a ddrescue would, in terms of time, sectors and seeks. ddrescue images the entire drive, rather than just the parts that need to be imaged. And file fragmentation is far more rare than you're implying. Even so we both know it's better for a disk to read 50MB is 10 locations than it is to read 320GB.
Thank you for your time.