Thursday, September 4, 2025

Data disaster recovery with TestDisk.

 I had a special encounter with my data when I was trying to build a NAS RAID with OpenMediaVault and finally move away from my old QNAP.  One of my RAID 1 disk was having some problem.  I purchased these set of 2 x 8TB SATA disk from EBay a few years ago and it was working in my QNAP but I remember there was an issue with this same disk.  It took me a while to get working but once it did, it ran fine.  There wasn't anything wrong physically with the drive itself.  The bad news was I couldn't remember what I did to get it to work on that QNAP.  I was facing the same issue in OpenMediaVault (OMV) as I was on the QNAP.  The second issue, and this was the biggest, I had was that the disk in OMV constantly changing device names upon reboot.  Sometimes it would be sda, sometimes it would be sdb, sdc, sdd, and so on.  That's where my carelessness came in.  I was trying to get the second disk into the RAID 1 array and accidentally ran wipefs on the disk that had my back up data in it.


TestDisk to the rescue!








Found my partition.






Press P to list files. (very important)

TestDisk showing my data is still there.






TestDisk file recovery at work.





Side notes:

  • One thing that would have been nice is to see in TestDisk a progress bar or some kind of indication on how many files are left to copy.  But you're just left guessing how many files there are left.
  • TestDisk doesn't support mapped drives to a network share.  You would have to create a symlink using (mklink in Windows) pointing to your network share if you want your restore files there.


Get TestDisk here.  https://www.cgsecurity.org/wiki/TestDisk_Download


No comments:

Post a Comment

Thank you for your comment.