A while ago, one of my Windows hard drives gave up the ghost. Unfortunately, the last backup I’d done on it was a while ago. Lesson #1: Don’t forget to back things up.
The hard drive had been staring at me on my desk for a while, so I decided to see what I could do about it. My searches led me to CGSecurity and two pages on their website: TestDisk and the Damaged Hard Disk page. They in turn led me to ddrescue.
Here’s what I’ve done so far:
- Have a nice server that has a motherboard advanced enough to hot-mount SATA drives. This is very useful if the disk disappears now and then and needs to be remounted.
- Mount the drive in a spare slot in the server.
- sudo apt-get install lzip because ddrescue is stored in lzip archives
- Grab the latest stable build from the ddrescue download directory. (I used version 1.20.)
- lzip -d then extract the ddrescue tar file.
- cd into the ddrescue directory and configure; make
- Next I tried plain ddrescue: sudo ./ddrescue -n /dev/sde /data/sde_rescue sde_map
- That seemed to be having trouble, so I reversed direction: sudo ./ddrescue -n -R /dev/sde /data/sde_rescue sde_map
- That whirred for a few days. Next I decided to try mounting as a raw device, on the theory that the kernel cache might be obscuring things.
- sudo /sbin/modprobe raw
- sudo raw /dev/raw/raw1 /dev/sde
- sudo ./ddrescue -n -R /dev/raw/raw1 /data/sde_rescue sde_map
So far I’ve theoretically recovered 130M of my 500M disk. When reading the raw device, I don’t get an estimate of time remaining (which was about a year). It will be interesting to see if this actually gets recovered, or if I’m just grabbing random numbers at this point.