I destroyed my dataset

Status
Not open for further replies.

greyleopard

Cadet
Joined
Sep 22, 2016
Messages
4
I feel completely out of my depth. I've had a couple of FreeNAS servers up and running for several months. I use them for storing music and movies. Since I got them working a few months ago, I haven't messed with them. However, a few weeks ago, my Win 7 HTPC that is my media server got BSOD. (FreeNAS stores my media, HTPC plays the media for several zones in the house.) After a couple of weeks, I got HTPC running and solved the problem. However, I was unable to write of my FreeNAS servers. I could only read. My FreeNAS storage consisted of the following volume and datasets:
music
music
music
My recollection is that the first music is the volume, the second was a Unix share, and the third was a cifs share. I initially used the wizard when I set up my storage. After not being able to write new music to the FreeNAS, I began mucking with change permissions in storage on the 3rd music share, trying to create new shares in sharing tab, and modifying permissions. I remembered reading somewhere not to do this and just use the wizard. So, I destroyed the 3rd dataset and was going to run the wizard. I believed the 3rd music was child of the others and was only a permissions dataset. When I deleted the dataset, I still had the music volume and it's child dataset, but the percent available seemed high. The 3rd dataset was gone as it should be. I can't imagine that FreeNAS would overwrite TBs and several disks of data, but the percentages seem to reflect it. I tried to rollback a snapshot to the previous day, but that did nothing. I've turned off my FreeNAS servers. Should I use a fresh boot drive, and start over? Will it see the music on the drives and let me import it?

Thanks for any advise. I would also like to know if there is someone in Dallas I can hire to help me. Once the machines are working, it is usually months until I need to do anything to them. At that point, I've forgotten everything I learned before. I've been reading the manual again, watching the IX videos, and taking the online classes. The more I learn, the less I know.

Charlie
 
Last edited by a moderator:

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
Pool, implicit root data set, then your dataset.

You destroyed your data. And the snapshots.

Restore from backup.

Only other hope is to rollback the whole pool to before your erased the dataset. That’s non-trivial.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
I can't imagine that Freenas would overwrite TBs and several disks of data,
You told ZFS to delete your dataset - that includes its snapshots. What do you expect it to do, read your mind?*

The only way this would be reversible would be with an upcoming ZFS feature, zpool checkpoints, that allows you to roll back the entire state of the pool - with a significant number of strings attached.

* Technically, your data wasn't overwritten. It's still there, but it's a needle in a haystack. And the needle is cut up into many small chunks with no discernible way of piecing them together.
 

garm

Wizard
Joined
Aug 19, 2017
Messages
1,556
You made a serious error in your assumptions, datasets are not just permission schemes, they are file systems.

As the others already said, you deleted your data, roll back from backup and read the manual again.
 

wblock

Documentation Engineer
Joined
Nov 14, 2014
Messages
1,506
Please use different names for different things to make it easier to identify them.
 

greyleopard

Cadet
Joined
Sep 22, 2016
Messages
4
You made a serious error in your assumptions, datasets are not just permission schemes, they are file systems.

As the others already said, you deleted your data, roll back from backup and read the manual again.

Clearly I made a serious error. However, being a novice, the logical structure of the GUI storage screen seems flawed. Unless you truly understand FreeNAS of course. I'm not wanting to get into a pissing contest here, and FreeBSD has been around for a while. But, as I recall, when I created my pool, the system created volume movies, and created a UNIX dataset indented underneath. When I set up my cifs permissions, the system created another dataset under the volume and UNIX permission dataset. Logically, destroying a child dataset should not destroy the parent volume. In fact, the manual states in section 8.1.14:

"Destroy Dataset: clicking the Destroy Dataset button causes the browser window to turn red to indicate that this is a destructive action. The Destroy Dataset screen forces you to check the box I’m aware this will destroy all child datasets and snapshots within this dataset before it will perform this action."

This is not a warning that parent volume will be destroyed. The destroy dataset warning only mentions child datasets! I did not elect to detach or destroy the volume.

Per the manual: "A dataset is similar to a folder in that you can set permissions; it is also similar to a filesystem in that you can set properties such as quotas and compression as well as create snapshots."

Generally speaking, in computer syntax, if a child folder within a folder is deleted, the parent folder doesn't get deleted or destroyed.

Now i know that somewhere else in the manual, or in cyberspace, there is something to counter the very statements I quoted in the manual. But for those who aren't experts, or don't have the manual memorized, it can be a bit confusing. Like I said, I'm clearly out of my depth. And logical assumptions are the mother of all FU's.
 
Last edited by a moderator:

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
it did not delete the parent dataset. If it did that would be a huge bug.

Can you provide a screenshot of what your storage screen looks like or the output of zfs list? Also include a description of what each thing is or what you think it is.
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
But, as I recall, when I created my pool, the system created volume movies, and created a UNIX dataset indented underneath.
There are no datasets on a freshly created pool. It sounds like you never created a dataset you created a share on the root of your pool and when you deleted the share it took all the data with it. That's not a bug it's user error.

Proper workflow would be to create your pool, create your dataset(s) and then share your selected datasets via the protocol of your choice.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
But if the share is created on the top level dataset wouldn't that still take everything out when the share is deleted? It sounds like that's what he did.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Proper workflow would be to create your pool, create your dataset(s) and then share your selected datasets via the protocol of your choice.
If you use the wizard to set it up, creating shares creates datasets to share (and sets the permission types appropriately).
 

garm

Wizard
Joined
Aug 19, 2017
Messages
1,556
“Volume” is a FreeNAS term I’m not so sure why they insist on using. In ZFS there are zpools and vdevs (and zvol but let’s not go crazy). The basis of ZFS is that you “pool” all of your disks together and then create dynamic file systems (datasets) in that pool. To add redundancy, instead of adding disks discretely, we bundle them together in virtual devices that we then add to the pool.

Sins we haven’t seen your layout yet I’ll do this blindly, this is what you did.

Let’s say I have a layout like this

Code:
zpool, name “Tank”
  dataset, name “photos”
  dataset, name “documents”


If I remove any of the datasets I effectively delete the data in that dataset. But this is probably clear. Your layout however is more like this

Code:
zpool, name “Tank”
  dataset, name “photos”
	dataset, name “photos”
  dataset, name “documents”
	dataset, name “documents”


And those children are then shared using some protocol. Those child datasets are not permission layers of the parent datasets, they are their own file systems, like partitions in Windows. Anything written to the share will be written in the child dataset and not in the parent. When you deleted the child dataset you deleted the data in that file system as well.
 

adrianwi

Guru
Joined
Oct 15, 2013
Messages
1,231
From his layout:

> music
> music
> music

my guess would be that he named the zpool music and then created a dataset called music. In the Storage tab, the zpool has two lines at the very top showing total space and usable space. It looks like he deleted the dataset music, thinking the data was still stored in the music zpool, but now knows it wasn't! I think the advice to give the zpool a name that won't be the same as any datasets would have avoided this.
 

greyleopard

Cadet
Joined
Sep 22, 2016
Messages
4
Thank you all for your responses. Garm and Adrian are both correct in there conclusions. I did see them as permissions only, and I like the analogy of Dataset being partitions and not folders. Your explanations helped me to understand and it is quite logical. I turned off both my machines after the disaster, and a friend looked for a way to recover the files. He was unsuccessful and I'll begin to rebuild soon. I have a backup of music as it was only about 1TB. As for the movies, I'll add them as I get them. I'm looking at this as spring cleaning in November. Thank you again.
 
Status
Not open for further replies.
Top