Recovery Of Deleted ZFS Pool

Status
Not open for further replies.

Papasmerf

Dabbler
Joined
Mar 28, 2014
Messages
15
I deleted an ZFS pool that shouldn't have been deleted I would like to know how to recover it. I am not able to re add the array through the GUI or though the command line. I am not 100% sure but I believe the delete all data check box was checked. The hardware configuration is as follows.

FreeNAS 9.2 running on ESXi 5.5, there are 2x hard drives associated with the FreeNAS vm. A very small 8gb drive that is where the OS resides. A second 2TB single drive was created and added to the ZFS pool. A files based iSCSI extent was created and exported out. I have done some poking around on the internet and forums and they run me through the import procedures. I have attempted to do this on both the command line and the gui but with no success. I have made a copy of this vm to try and preserver any chance at trying to get this data back.

Thank you in advance.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
If the "delete all data" checkbox is checked, your only options are 5-figures. Ontrack and such are your ONLY options. There's a reason why my noobie guide says "there are no zfs recovery tools". There really aren't, and any options that involve recovery are certainly an order of magnitude (or more) more expensive than if you had built a whole second system for backups.
 

Papasmerf

Dabbler
Joined
Mar 28, 2014
Messages
15
That may be the option that needs to be taken in the case, the only "file" that was on the pool was the iscsi file based extent. If, and I know this is a big IF, I can recover this file, would it be usable? Can I rebuild a system, upload the file to the new system and create an extent based on this file? I know there is a lot of hypothetical here and I know there is a lot of IFs
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Not exactly. You'll need to get some kind of recovery expert like Ontrack to get the file back. Once they get it back you should be able to put it on a new zpool and, if the recovery is successful, mount the file in iscsi and hopefully it will all work. I will warn you that the "mark disks as new" does overwrite some of the zpool data, so there's a damn good chance your iscsi extent may have a corrupted file system, partition table, lost data, etc.

You're really in a bad way with this and unless this is a work-environment I can pretty much guarantee you that the cost is going to be unreasonably high. Even for a small business, this cost is hard to swallow. The only company I know of to ever do ZFS recovery paid $20k for 450GB of data. They did get something like 96% of it though!
 

Papasmerf

Dabbler
Joined
Mar 28, 2014
Messages
15
Thank you very much for your help, this is a production environment, the iscsi export was full. I figured this was a massive long shot, I was just looking for options, knew this was the outcome minutes after I realized what happened.

I was attempting to do my due diligence, the server that this happened on was the "life boat server". I had pulled everything off the main array to do an update from 9.2 to 9.3. I know this shouldn't have been an issue but I didn't want to chance it. I was planning on completing the software update and then migrating the data back.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Ouch. The reality is that your data itself is very very safe, even during an OS upgrade. That's one of the reasons that the OS is a separate dedicated drive. No matter how screwed up the update goes, the zpool with your precious data is always safe. So you never actually had to move the data.

In fact, the worst thing that could have happened would be that you had to do a reinstall of the old OS and then not had a backup of your config file and had to import your pool and do the iSCSI service setup again. But all of the data would have been there, and intact.
 

ToBeFrank

Dabbler
Joined
Feb 20, 2015
Messages
41
It destroys all the volumes, and then destroys the partition table. It then performs an extra step of overwriting the destroyed partition table with a new one and then destroying it to make sure the partition table is deleted.
 
Status
Not open for further replies.
Top