A friend called me about 10 days ago. "V, I can't access my external disk, Windows won't see it. It lights up and all but I can't find my data". Now, there's a couple of reasons something like this might happen and none of them is good. The standard answer is "format the disk" followed closely by "you should have had backups" with the occasional "you got backups? Good". I've gotten pretty unemotional about delivering such news...
But in this case I just couldn't dismiss it without trying. It was a quarter of a terabyte of photos and movies of our kids, family and friends, with no other copy available. The sentimental value alone...
Now, the disk was spinning up and registering as unformated with the proper capacity so the worst case scenario of stuck heads and scratched plates was fortunately not in play. It being a new disk it was also well inside it's MTBF which left us with software error. A quick check revealed that the NTFS partition table decided to take a vacation to places unknown. Verdict: The data is there, but no-one knows exactly where.
There's a whole bunch of recover-your-deleted-files apps for windows out there, some of which I have used from time to time to salvage my own disks. None has proven satisfactory (one reason I have triple backups of my data). It didn't look like they would work this time, the geometry numbers for the disk where all wrong (I'm not sure but that suggests malaware rather than windows idiocy - somebody correct me).
Then Google turned up TestDisk. Quoting from the site:
"TestDisk is a powerful free data recovery software! It was primarily designed to help recover lost partitions and/or make non-booting disks bootable again when these symptoms are caused by faulty software, certain types of viruses or human error (such as accidentally deleting a Partition Table). Partition table recovery using TestDisk is really easy."
Now, TestDisk is cool,super hero open source software. It does what it says on the tin with all the caveats that dealing with the myriad file systems out there entails and it runs on every platform you would need it on. But it didn't work.
Like I said, the geometry data reported by the disk were all skewed and I couldn't find the data-sheet to type in the proper ones. I didn't really take the time to be honest 'cause TestDisk has a sibling, named PhotoRec.
"PhotoRec is file data recovery software designed to recover lost files including video, documents and archives from hard disks, CD-ROMs, and lost pictures (thus the Photo Recovery name) from digital camera memory. PhotoRec ignores the file system and goes after the underlying data, so it will still work even if your media's file system has been severely damaged or reformatted."
Now, PhotoRec is nameyourchildrenafterthe_developer, freaking awesome open source software. Plug the disk in, plug a second one to copy whatever PhotoRec finds, start PhotoRec and go away for a weekend (it is a 1TB disk we're talking about). When you come back it will have scraped every last byte off the bad disk.
Both tools are the work of Christophe Grenier, and I unequivocally, enthusiastically urge you to donate so that he can keep up the amazing work.
As for my mate? He breathed a deep, deep sigh of relief and went out and bought another disk for backups. I guess he will be more conscientious from now on...