bug-ddrescue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-ddrescue] Suggestion: Image size vs. source size sanity check


From: Burkart Lingner
Subject: [Bug-ddrescue] Suggestion: Image size vs. source size sanity check
Date: Wed, 20 Apr 2011 16:44:25 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.14) Gecko/20110223 Thunderbird/3.1.8

Hi Antonio!

Let me add something to the recent suggestions to further improve ddrescue.

When your hard disk gives you trouble you often have to run ddrescue several times, with a good chance of the computer powered down in between runs. On my system the ordering of the /dev/sd* letters varies between different boot-ups, so one time I probably didn't verify the letter (or made a typo) and thus called ddrescue with the wrong imaging source parameter. ddrescue then appended the existing image with data from another, larger, hard drive than the one I had originally imaged. I noticed the mistake relatively quickly and was able to truncate the image file back to its correct pre-mistake size and manually corrected the log file. Had the wrong drive been smaller than the correct one, ddrescue would have probably started filling the previously bad blocks with data from the wrong disk, making it much harder to recreate the pre-mistake state.

Obviously, what I just described was clearly a usage error on my part. Nevertheless I think ddrescue could be improved to help users not to make the same mistake. It could read the size of the image from the log file and then, if it doesn't match the size of the source device, show a warning like "You said you'd like to image /dev/sda whose size doesn't match that of the existing image. Are you sure you want to continue? (y/n)"

It's not improving ddrescue's core functionality and one might say that it's not the program's duty to prevent human error. However, if it's easy to implement, why not help out error-prone humans... like me :-)

Bye, Burkart



reply via email to

[Prev in Thread] Current Thread [Next in Thread]