ZFS file undeletion without snapshot

Status
Not open for further replies.
Joined
Feb 24, 2013
Messages
8
I'm still in the midst of setting up freenas so I have yet to set up snapshots or any back up options. I know, I know. Let the scolding begin.

However, I had a problem with my plugins jail so I had to delete and reinstall it. I received, and noted a warning that I would lose all data in the jail. But to my understanding, the 1TB of movies and music I lost was not in the jail, it was located elsewhere and accessed by the jail via a mountpoint. But I have lost all such files.

Perhaps the fault is due to my misunderstanding, but I believed such data was not actually located within the jail. The end result is I have lost the data before I set up any backup system.

I have read on the forum elsewhere and saw very clear answers that there is no way to recover deleted files on ZFS without having snapshops or other backups set up. But I'm asking again incase there are any utilities or other methods which have been found to work since then.

Grateful for any help.
 

survive

Behold the Wumpus
Moderator
Joined
May 28, 2011
Messages
875
Hi shanghaiultra,

First let me say I'm sorry for your loss.....as you have seen there is no "undelete" for ZFS, the data is gone.

What version of FreeNAS are you running right now? I ask because as I recall there was a bug in one of the older versions that exhibited this behavior....when you deleted the jail the system followed the mount points and deleted any data that was there along with the jail.

That said, while it's still fresh please take some notes about what *exactly* you did while it's still fresh in your mind in case one of the FreeNAS guys follows up with some questions about what happened.

-Will
 
Joined
Feb 24, 2013
Messages
8
Hi shanghaiultra,

First let me say I'm sorry for your loss.....as you have seen there is no "undelete" for ZFS, the data is gone.

What version of FreeNAS are you running right now? I ask because as I recall there was a bug in one of the older versions that exhibited this behavior....when you deleted the jail the system followed the mount points and deleted any data that was there along with the jail.

That said, while it's still fresh please take some notes about what *exactly* you did while it's still fresh in your mind in case one of the FreeNAS guys follows up with some questions about what happened.

-Will

Thanks for your response Will. I also read about the bug elsewhere during my searches for a solution, that's what made me think it wasn't total carelessness on my part. I'm using FreeNAS-8.3.1-BETA2-x64 on an AMD system with 4gb of memory.

Detail wise all I can really remember is that my plugins service would no longer start. I got an error message on the console about the IP address, but I can't remember exactly what. I tried a new IP for the jail but to no avail. I tried upgrading the jail but it had no effect. Then I wiped the jail again and installed a new version - I think I installed the very latest version of the jail and not the specific one for the version of Freenas I'm running.

Only this morning did I discover that all my movie and audio files had disappeared - as I said it wasn't what I expected at all. I have an old windows machine which had some of the data on it from before which I can recover but that is on around 60% of it.

At the end of the day I am at fault for not putting the relevant back up procedures in place - freenas is a great system and I appreciate all the work that has gone into making this product.
 

paleoN

Wizard
Joined
Apr 22, 2012
Messages
1,402
At the end of the day I am at fault for not putting the relevant back up procedures in place
Yes and no. Yes, you should have backups, particularly when running a BETA. No, this is a bug - ticket #2024, I believe. The fix made it into BETA3.

It's too late now, but I would always suggest taking a snapshot of any mounted datasets before mucking around with the jail.

Condolences.
 
Joined
Feb 24, 2013
Messages
8
Yes and no. Yes, you should have backups, particularly when running a BETA. No, this is a bug - ticket #2024, I believe. The fix made it into BETA3.

It's too late now, but I would always suggest taking a snapshot of any mounted datasets before mucking around with the jail.

Condolences.

Quick and very noob question about Snapshots. To take a snapshots I'm guessing you need to have the equivalent amount of free space on your system for snapshots to work? So if you have a dataset which has 600mb in it, you need a spare 600rmb elsewhere on your system? Or is there compression involved?
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,525
No, when you take a snapshot it takes up a few kilobytes of space. If you delete or otherwise modify any data the snapshot size will start increasing in size accordingly because the snapshot will be the only "bookmark" of the old data. When you delete the snapshot the "deleted/modified" data will be lost forever since nothing will be tracking it. If your data never changes you could take snapshots all day and they won't take an appreciable amount of space.
 

krantz

Dabbler
Joined
Jun 2, 2013
Messages
41
This exact thing just happened to me --- I didn´t know the data in the jails was my *Actual* data, and deleted somewhere around 5 GB of beautiful pics of my family... :( are you guys sure there is no undelete tool?
 

tomf84

Dabbler
Joined
Apr 4, 2013
Messages
10
This is an absolutely bonkers bug to allow people to still download ISOs for.

What exact version are you running krantz?

Worryingly, the bug says "could not reproduce, but fixed anyway".

Is it or isn't it fixed?
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,525
You might(and I stress might) be able to rollback your zpool by detaching your zpool in the GUI and trying to import it with the command zpool import (yourpoolname) -nfFX. This command simulates rolling back some transactions, and you will lose any changes after the time the command returns with. If you are okay with the proposed changes remove the 'n' from the parameters and the command will rollback. If that command won't roll back enough, then you are out of luck. If you do this rollback you will have to reboot and auto-import your zpool afterwards to get FreeNAS to be aware of your zpool and auto-mount it in the future.

There are no undelete or recovery tools since ZFS is an enterprise class file system and enterprises keep through and multiple backups.
 

sdspieg

Contributor
Joined
Aug 6, 2012
Messages
168
Does this still work? Because when I try, I get
cannot import '-nfFX': name must begin with a letter
cannot import '-nfFX': name must begin with a letter
 

sdspieg

Contributor
Joined
Aug 6, 2012
Messages
168
zpool import
Code:
[root@freenas ~]# zpool import 
 pool: StephanNAS id: 9220674615556878615 state: ONLINE status: Some supported features are not enabled on the pool. action: The pool can be imported using its name or numeric identifier, though some features will not be available without an explicit 'zpool upgrade'. config: StephanNAS ONLINE mirror-0 ONLINE gptid/d65eb91c-5201-11e2-87a9-3085a943b0e3 ONLINE gptid/d6bde0bf-5201-11e2-87a9-3085a943b0e3 ONLINE mirror-1 ONLINE gptid/ebe6f24f-59ae-11e3-a143-3085a943b0e3 ONLINE gptid/98526e0f-526e-11e2-bbec-3085a943b0e3 ONLINE  
[root@freenas ~]#  
 

sdspieg

Contributor
Joined
Aug 6, 2012
Messages
168
This is what I have (I detached the volume)
[root@freenas ~]# zpool import
pool: StephanNAS
id: 9220674615556878615
state: ONLINE
status: Some supported features are not enabled on the pool.
action: The pool can be imported using its name or numeric identifier, though
some features will not be available without an explicit 'zpool upgrade'.
config:

StephanNAS ONLINE
mirror-0 ONLINE
gptid/d65eb91c-5201-11e2-87a9-3085a943b0e3 ONLINE
gptid/d6bde0bf-5201-11e2-87a9-3085a943b0e3 ONLINE
mirror-1 ONLINE
gptid/ebe6f24f-59ae-11e3-a143-3085a943b0e3 ONLINE
gptid/98526e0f-526e-11e2-bbec-3085a943b0e3 ONLINE
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,525
It works, if you know what you are doing and are making smart CLI commands for your pool's condition. Just willy-nilly running commands you don't understand can be extremely dangerous. Please start a thread on your issue and I'll see if I can help you there.
 
Status
Not open for further replies.
Top