Question Recovering data from partially wiped EXT4 HDD ?

elsmandino

Distinguished
Jul 16, 2009
50
2
18,530
Hi there.

I have done something stupid and managed to lose access to a large 14TB HDD (formatted to EXT4) with some data that I had yet to backup.

I have an Openmediavault 6 server and I unmounted the drive and then tried to remount it again.

Unfortunately, instead of pressing Mount I pressed Initialize.

I realized after five second or so and immediately switched off the power.

Unfortunately, Openmediavault recognises the disk itself but not the data on it.

Any ideas on how to try and fix the disk or recover the data would be much appreciated.

I am currently running TestDisk but, given the size of the drive, it is going to take over 24hrs to complete.

Is TestDisk going to be my best bet?

I have also read that gdisk, fsck and https://www.r-studio.com/free-linux-recovery/Download.shtml might be worth trying but have no idea what the difference is.

Any pointers would be much appreciated.
 

elsmandino

Distinguished
Jul 16, 2009
50
2
18,530
Have just finished running TestDisk analysis and got the following:

IMG-20230530-162521.jpg

After.jpg

Am I well and truly screwed?
 

elsmandino

Distinguished
Jul 16, 2009
50
2
18,530
Ah crap.

I ran this and there is something there, still:

Code:
root@omvtemp:~# sudo gdisk -l /dev/sdf

GPT fdisk (gdisk) version 1.0.6



Partition table scan:

  MBR: protective

  BSD: not present

  APM: not present

  GPT: present



Found valid GPT with protective MBR; using GPT.

Disk /dev/sdf: 27344699392 sectors, 12.7 TiB

Model: Elements 25A3

Sector size (logical/physical): 512/4096 bytes

Disk identifier (GUID): AA68BD0E-4889-453F-A041-8394B5248F55

Partition table holds up to 128 entries

Main partition table begins at sector 2 and ends at sector 33

First usable sector is 34, last usable sector is 27344699358

Partitions will be aligned on 2048-sector boundaries

Total free space is 2014 sectors (1007.0 KiB)



Number  Start (sector)    End (sector)  Size       Code  Name

   1            2048     27344699358   12.7 TiB    8300
 
Can you show us the Partitions tab in DMDE?

https://dmde.com/

"Initialisation" normally just clears the partition metadata, in which case a data recovery should be very easy. DMDE would normally be able to reinstate the partitions.

R-Linux is a good freeware tool recommended by data recovery pros. We may not need it, though, depending on what DMDE finds.
 

elsmandino

Distinguished
Jul 16, 2009
50
2
18,530
Thanks for this, fzabkar.

I am going to fire up DMDE and see what it comes up with.

Is there any way I can install DMDE directly on Openmediavault itself (given that there is no desktop environment installed)?

If not, I might have to plug the external drive into a Windows laptop instead.
 
I see that you are running PhotoRec. Be advised that PhotoRec is a file carver. It recognises files by their signatures and then carves out the contiguous block of data that follows. It cannot recover file names, nor will it recover fragmented files. A file carver is a tool of last resort and should only be used when the file system's metadata have been totally destroyed.
 

elsmandino

Distinguished
Jul 16, 2009
50
2
18,530
Sorry - yes, posted on a couple of forums as I went into panic mode!

PhotoRec time has shot up to 150 hours, now, so I am just going to let it run and run and see what it can get back - hopefully a lot as I am sure that most of the hard drive 's raw data remains untouched.

Out of interest - has my running PhotoRec now destroyed any chance at all of recovering the partition/file structure of the hard drive, now?
 
PhotoRec doesn't write anything to the source drive, nor should any data recovery tool. Some tools can write to the source, but only if you explicitly tell them to do so. For example, DMDE has a built-in disk editor which will write to the drive, but you have to overcome several hurdles and warnings before it will let you do it. Testdisk can also perform certain repairs, but once again you have to authorise them.