No matter how often I repeat people to keep important things in more than one place … I always hear “no problem”
While you do not squawk at 05:00 AM to recover data from a “burned disc” with status “URGENTLY”
The problem was that when you trying to access the disk at file level…you get a solid flooding in screen and syslog with an I/O error:
end_request: I / O error, dev sda, sector 3500097
Isn’t that a wonderful thing or what?
It is time to discuss what are the differences and similarities tricks that can make using dd, dd_rescue, dd_rhelp
The main similarity is that all of this tools examine the hard disk block level and not really interested in the file system, files and so on.
dd : will make a copy of a disk drive with errors, if you set “conv=noerror” so it will keep going after errors. The catch is that it just *removes* the erroneous sectors from its output,
as if they didn’t exist, which totally screws up the file system image. Fsck will tell you just how unhappy it is with such an image; it’s unrecoverable without massive manual work, shifting big blocks of data around.
dd_rhelp : is a complex shell script that runs dd_rescue many times, trying to be strategic about copying the drive. It copies forward until it gets errors, then jumps forward by a big jump looking for either the end of the drive, or more easy-to-read stuff. Once it finds the end of the drive, then it starts working backward, trying to close up the “hole” that it hasn’t read yet. As it encounters errors, it skips around looking for more error-free parts of the drive. It only reads each sector once. It reads the logfile output of dd_rescue to see what happened and to figure out what to do next.
dd_rescue : It reads and copies bigger blocks until it sees an error, then slows down and goes back, and reads single sectors. After a while it speeds up again. It can also read backward, and can quit after it gets some specified number of errors.If it gets an error reading a sector, it doesn’t write to that sector of the output file, but it skips past it to write the next good one, so everything stays in sync. It seeks the input and output in parallel so it makes an exact copy of the parts that it can read.
so lets try with:
dd_rescue /dev/bad_hdd /dev/new_hdd
or if we want to use an image file
dd_rescue /dev/bad_hdd /mnt/new_hdd/image_of_bad_hdd.img
the process will take hours of reading/writing and rasping ….and if it done correctly try to check/fix your filesystem with fsck:
fsck -y /dev/new_hdd
or an image
fsck -y /mnt/new_hdd/image_of_bad_hdd.img
you will see long output in screen …all you can do is to watch and pray for it
Then reboot…then pray even harder 🙂
Read more at: http://ubuntu-rescue-remix.org/node/51