Restoring formatted Freenas HDD - maybe TestDisk?

Status
Not open for further replies.

Babo96

Dabbler
Joined
May 12, 2016
Messages
19
Hello Community,
I'm the happy owner of a self built Freenas Server, but by upgrading via USB I accidentally made an enormous mistake, I formatted my main Storage HDD!

I know I should have done Backups etc honestly now that this happened everything is set up for that, but now my big concern is how to get my data back.

I googled and searched around the web to find a solution, there were two coming up:

Photorec - which would be my less preferred solution, I ordered a second Drive to back my data up to so it is possible, so if it is my last rescue I would also be happy to get a small help for that.

TestDisk - which sounds amazing to me a bit like "just recover deleted partitions" but when I ran TestDisk it put out many Partitions so I don't really know which one to choose, I tried a bit with the biggest ones but it didn't work yet.
FreeNASHDD.jpg


Infos about my HDD(s)

Formatted Drive:
WD RED 3TB formerly used in a WD My Cloud and then transferred to my Server

Drive to back up to:
brand new WD RED 3Tb


I'm happy about any answers =D

Thanks a lot in advance Lukas
 

zambanini

Patron
Joined
Sep 11, 2013
Messages
479
such dir ein datenrettungsunternehmen. rechne mit 8-15.000 eur
 

Babo96

Dabbler
Joined
May 12, 2016
Messages
19
An sich danke für die schnelle antwort, warum allerdings so eine Antwort kommt frage ich mich schon, da die Datenrettung mit PhotoRec z.B. funktioniert aber halt sehr aufwendig ist...
 

zambanini

Patron
Joined
Sep 11, 2013
Messages
479
du wirst noch sehen, dass du damit kaum daten vom zfs system runterbekommen wirst.
 

Babo96

Dabbler
Joined
May 12, 2016
Messages
19
du wirst noch sehen, dass du damit kaum daten vom zfs system runterbekommen wirst.
Also gibt es doch noch eine konstruktive Antwort von dir? hätte ich nicht erwartet =P

Soweit ich weiß ignoriert PhotoRec das Dateisystem und sucht datein in den Blöcken der HDD und wie sieht es mit TestDisk aus?
 

styno

Patron
Joined
Apr 11, 2016
Messages
466
Zfs is highly fragmented by nature, I don't really see how a generic recovery program would be able to trace the blocks in a correct order and reconstruct a file. (That said, I have been wrong before so maybe you could be lucky.)

Before you do anything else to that disk, make an image with dd and work on that image.
 

Babo96

Dabbler
Joined
May 12, 2016
Messages
19
Zfs is highly fragmented by nature, I don't really see how a generic recovery program would be able to trace the blocks in a correct order and reconstruct a file. (That said, I have been wrong before so maybe you could be lucky.)

Before you do anything else to that disk, make an image with dd and work on that image.
Thank you for that answer, and thenk you for the dd tip I know dd but didn't think of it =D

Do you have any experience with TestDisk?
 

styno

Patron
Joined
Apr 11, 2016
Messages
466
Do you have any experience with TestDisk?
Not yet ;)
From your post I understand what you have two 3Tb disks in the system. How do you do that backup you are talking about?
Maybe a little more info on the system and how it is setup? (In the forum rules you'll find what info would be needed so we can help you a bit more in detail.)
 

Babo96

Dabbler
Joined
May 12, 2016
Messages
19
Not yet ;)
From your post I understand what you have two 3Tb disks in the system. How do you do that backup you are talking about?
Maybe a little more info on the system and how it is setup? (In the forum rules you'll find what info would be needed so we can help you a bit more in detail.)
The Backup is not my main Problem =D
But I'll tell you anyway, first I'll set up a RAID 1 on my System to have redundancy and then I'll Back up to Crashplan.

My problem is to get my Data Back



My System Specs:
4He 19" Case
i5 4670k
16gb DDR3 RAM
1* 3tb (will be 2* as soon as I got my Data back ;) )
 
Last edited:

ethereal

Guru
Joined
Sep 10, 2012
Messages
762

styno

Patron
Joined
Apr 11, 2016
Messages
466
1* 3tb (will be 2* as soon as I got my Data back ;) )
Ok, auch... Be prepared for the worst case scenario then...

So when you say 'formatted', what EXACTLY happened? Did it just removed the zpool or did it completely reinstalled the OS on that disk? You can always try 'zpool import -D' if the zpool was just removed.
 

maglin

Patron
Joined
Jun 20, 2015
Messages
299
What does the WD my cloud use? I highly doubt it's ZFS. I would guess ext4 or FAT32.

If your data that is currently unavailable is important enough I would clone that disc before doing any recovery that might be destructive.

Start with figuring out the original file format used to find out how to recover. You probably just over wrote the partition table.


Sent from my iPhone using Tapatalk
 

Babo96

Dabbler
Joined
May 12, 2016
Messages
19
Ok, auch... Be prepared for the worst case scenario then...

So when you say 'formatted', what EXACTLY happened? Did it just removed the zpool or did it completely reinstalled the OS on that disk? You can always try 'zpool import -D' if the zpool was just removed.
I actually installed the OS on the disk =(
 

Babo96

Dabbler
Joined
May 12, 2016
Messages
19
What does the WD my cloud use? I highly doubt it's ZFS. I would guess ext4 or FAT32.

If your data that is currently unavailable is important enough I would clone that disc before doing any recovery that might be destructive.

Start with figuring out the original file format used to find out how to recover. You probably just over wrote the partition table.


Sent from my iPhone using Tapatalk
Yes you're right WD uses Ext4 for their NAS.

So the original File System was Ext4 and then ZFS so I really wonder where all those NTFS etc Partitions listed by TestDisk are?
 

maglin

Patron
Joined
Jun 20, 2015
Messages
299
Well installing the OS on that drive is a no go. You have to have a separate drive for the OS. You can't run your is drive in a vdev. I'm sure some of that data is still on there but probably not worth the hassle.


Sent from my iPhone using Tapatalk
 

rs225

Guru
Joined
Jun 28, 2014
Messages
878
If you can recreate the partition table that FreeNAS had on it before, I think you might be surprised how much data you can recover. ZFS writes all important metadata twice, so it is worth the effort. Way better odds than testdisk, I suspect.
 

Babo96

Dabbler
Joined
May 12, 2016
Messages
19
Well installing the OS on that drive is a no go. You have to have a separate drive for the OS. You can't run your is drive in a vdev. I'm sure some of that data is still on there but probably not worth the hassle.


Sent from my iPhone using Tapatalk
Yeah I know that..... I had an successfull installation before and just selected the wrong drive while updating ...
 

Babo96

Dabbler
Joined
May 12, 2016
Messages
19
If you can recreate the partition table that FreeNAS had on it before, I think you might be surprised how much data you can recover. ZFS writes all important metadata twice, so it is worth the effort. Way better odds than testdisk, I suspect.
How do you recreate the partition table?
 

ethereal

Guru
Joined
Sep 10, 2012
Messages
762
why did you not upgrade via the gui ?
 

Babo96

Dabbler
Joined
May 12, 2016
Messages
19
why did you not upgrade via the gui ?
Yeah ..... the main problem was a bad beta Version which more or less killed the whole GUI =( and then after trying to restore the UI i failed reinstalling it so now I feel like an absolute noob =D
 
Status
Not open for further replies.
Top