SOLVED Lost 8TB of data trying to restore user dataset in the GUI

JoeKickass

Dabbler
Joined
Nov 15, 2021
Messages
12
This sad tale begins after importing my pool and finding that the user dataset folders do not show up in the web gui, despite being created with the same version of TrueNAS 12.0 U6

I discovered that I could create a new dataset and it would stay in the web manager, so my intention was to transfer everything to the new TEMP dataset and then re-create the original dataset so I could manage permissions with the web interface.

Along the way I partially rm -rf'd the wrong folder and decided I would try the much-beloved snapshot feature to restore the previous state.
Unfortunately, it did not treat me so well and seems to have erased the TEMP folder without restoring the original dataset contents.

So currently I have a pool that reports it still has all the data (8TB in use) but the original dataset contains config data only, and I can only assume the bulk data is floating somewhere without a folder to link it.

Is there anything to try? Maybe a way to check for what is using the storage?

My first idea was to re-create the TEMP folder/dataset, and see if the data is there, but I wanted to check and see if there is something else I should try first?
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Do you have snapshots?
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Unfortunately, you can only revert to your most recent snapshot.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Have you tried looking in the .zfs snapshots directory on the pool? that way you can see what's in the snapshots.
 

JoeKickass

Dabbler
Joined
Nov 15, 2021
Messages
12
Ok I can see the data folders inside one of the snapshots in the .zfs directory...

Am I to understand the proper procedure for restoring data is to clone the snapshot and transfer data out manually?

In other words, the "rollback" function exists only to destroy data and tempt the ignorant?
Truly a baffling that it exists at all... why not replace it with a macro that clones the snapshot?
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
In other words, the "rollback" function exists only to destroy data and tempt the ignorant?

Rolling something back involves restoring that thing back to how it looked at a previous point in time. This implies that more recent changes would be rolled back, i.e., undone. I cannot imagine a way to "roll back" that wouldn't involve such a thing. How would you deal with changes to files? How would you deal with a system that was dependent on a coherent set of files, i.e. interrelated files?

"Rollback" is a standard term in the IT world with a well-understood meaning. It's unfortunate if you didn't understand what it meant, but it isn't clear that this is the NAS's fault.
 

NugentS

MVP
Joined
Apr 16, 2020
Messages
2,947
Just copy the files out of the snapshot to somewhere else - or am I missing something
 

JoeKickass

Dabbler
Joined
Nov 15, 2021
Messages
12
Just copy the files out of the snapshot to somewhere else - or am I missing something
I'm trying to do that, but is there anyway to do it without having to buy more storage?
When I cut and paste from the cloned snapshot the total used space increases even though the file is removed from the cloned snapshot.

Luckily I'm at 65% so I only need a few TB, but there needs to be a way to restore data without duplicating it, is there a way?
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Copy the change delta between the snapshot and the current dataset to some temporary storage, roll back to the snapshot, then apply the change delta. This will cause the historical blocks that are allocated in all the snapshots to once again be the only copies of those files on the dataset.
 

JoeKickass

Dabbler
Joined
Nov 15, 2021
Messages
12
Thank you to everyone, I managed to recover the data, deleted the cloned shapshot, and then deleted all my snapshots, but somehow I still have 7TB extra used space with no location to attribute it to.

I started a new thread here, thank you again for the help!
 
Top