How to recover data from an unallocated hard drive?

I was messing around with a NAS setup using OpenMediaVault with hard drives in a USB Bay and it went a bit wrong.

Now I have a 8TB drive which OMV no longer recognises and when I plug it into my linux laptop it says it’s an “unallocated” hard drive, prompting me to format it.

I’ve seen plenty of solutions that I can buy for windows after a google search, however, is there a way that I can recover my data from this disk on linux ?

Do you know what format the hard drives where formatted in ?

In OMV it says ext4.

If I inspect it with Disks I see:

there is testdisk and ddrescue to recover data, if that helps.

2 Likes

Thanks I’ll look these up and give them a go.

@pavlos thanks for the recommendation of ddrescue, that worked to recover my data to another hdd. I’m still a bit miffed I was able to copy 8TB of data to a hdd and then it becomes unallocated, not once but twice !!

Also noticed that when I format the hdd to ext4 file system in Openmediavault, it reserves a few MBs, when I use Disks or GParted far more space is reserved.

Assume this is the DDRescue you used? By chance have you tried PartedMagic for the reformat/partition? Just learning about them myself but they seem to work in unison with each other.

No I haven’t tried those, the command line is fairly simple, though you can make an error pretty easily when using disks of the same size.
I have since come across several packages / OS that rescue data. DDRescue seemed to work ok, albeit it took 33 hours for a 8TB drive.

What I hadn’t noticed in the past was that the overhead used for the file system can vary dramatically, from 168MB to 300GB on my 8TB drives.

Yes, you can recover data from an “unallocated” hard drive on Linux without needing to format it. The drive appearing as “unallocated” typically means that the partition table is damaged or missing, but the data may still be intact.

You can use tools like TestDisk or GParted to recover the lost partitions and data. These utilities are great for scanning the disk, identifying lost partitions, and rebuilding the partition table without formatting the drive. Found a great article about recover data from unallocated drive on this website. Have a look, maybe that helps

Did you manage to get back your files? If not, don’t worry—it’s often possible to recover data from unallocated drive. I found a guide that explains how to do it step by step: https://www.cleverfiles.cоm/howto/recover-unallocated-partition.html. Hopefully, this will help you or anyone else facing a similar issue. Let me know how it goes or if further assistance is needed!