This time, I just didn't want to give up. I googled around for a solution and found dd_rescue, which just skips the failed segments of data. With my second hard drive in hand mounted as /mnt/backup, i used the following command:
$ dd_rescue -b 4k -l hdb1.log /dev/hdb1 /mnt/backup/hdb1.img
This took three days, discarded 41752KB of corrupted data and generated a 100GB hdb1.img file. Originally, /dev/hdb1 was a reiserfs partition. I then needed to rebuild the reiser4 tree with :
$ fsck.reiser4 --rebuild-tree /mnt/backup/hdb1.img
A few minutes minutes later, the image was considered as a healthy reiserfs partition that I could mount on a loop devive:
$ mount -o loop -t reiser4 /mnt/backup/hdb1.img /mnt/test
All the corrupted data, 110 files, was copied to lost+found, with numeric folder names, and the right filenames .I got more than 99% of my data back. Enough to put a happy smile on my face.
thanks to titov


Comments
Post new comment