Destroy Dataset = Delete Files?

Status
Not open for further replies.

ppmax

Contributor
Joined
May 16, 2012
Messages
111
Hi--

Pretty basic question, but I couldn't find the answer in the documentation.

I have a dataset ("media") that has ~450G of files in it. If I destroy this dataset are the files destroyed as well?

Also, is there any advantage or disadvantage to having "more" datasets or "fewer" datasets? In other words, is it preferable to have a single large dataset or a bunch of smaller datasets?

Scenario one:
volume1 //volume
volume1 //dataset
--dataset1
--dataset2


Scenario two:
volume1 //volume
volume1 //dataset
--directory1 //not a dataset
--directory2 //not a dataset



Thanks much--
 
Last edited:

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
If I destroy this dataset are the files destroyed as well?
Yes. Destroying a dataset destroys all its contents--files, zvols, snapshots, etc.
 

nojohnny101

Wizard
Joined
Dec 3, 2015
Messages
1,478
Also, is there any advantage or disadvantage to having "more" datasets or "fewer" datasets? In other words, is it preferable to have a single large dataset or a bunch of smaller datasets?
Not really, the stock answer here would be "it depends". Datasets offer more granular control over permissions, quotas, etc.

To my knowledge, FreeNAS doesn't care how many datasets you have, but obviously don't create more than are necessary.
 

ppmax

Contributor
Joined
May 16, 2012
Messages
111
Thanks for the replies--much appreciated. Im doing a little restructuring and wanted to confirm a few things before rm'ing a bunch of stuff.
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
The naming, amount and attributes, (sharing, compression, etc...) of your datasets should reflect usage. For example, I have;

tank/Media
tank/backups
tank/backups/HOST1
tank/backups/HOST2
tank/distfiles
tank/storage


Each with it's own use and sharing.
 

ppmax

Contributor
Joined
May 16, 2012
Messages
111
awesome, thanks for the additional information. I've been using FreeNAS for years but have never learned best practices (or seen discussions about them).

As I mentioned earlier I'm doing a reorganization of my storage scheme. Instead of 1 dataset with an assortment of subdirs which are share points, I'm creating multiple datasets (which are shared) like your scheme above.

Do you use compression on any of your datasets?
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
awesome, thanks for the additional information. I've been using FreeNAS for years but have never learned best practices (or seen discussions about them).

As I mentioned earlier I'm doing a reorganization of my storage scheme. Instead of 1 dataset with an assortment of subdirs which are share points, I'm creating multiple datasets (which are shared) like your scheme above.
Note that for me, I have separate child datasets for some of my client backups. This allows me to snapshot them individually, and then full backups run faster. (Rsync does not have to copy files that have not changed...) Basically I am using snapshots to perform de-duplication of my backups. Thus, no need to perform any incrementals, since the snapshots are a type of incremental. Kinda confusing until you plan it out and then use it.
Do you use compression on any of your datasets?
Yes, even though for the Media and distfiles it's not really relevant. Basically, ZFS's new default compression algorythm, LZ4, is fast enough and will bailout if it encounters less compressable data, that there is less reason to not use LZ4 compression as a default for the entire pool.
 

ppmax

Contributor
Joined
May 16, 2012
Messages
111
Cool--I'll read up on snapshots...haven't really used those in the past since I had one large dataset with lots of churn.

So you do snapshots and then rsync those to another instance or offsite?

Thanks for all your comments/help
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
...
So you do snapshots and then rsync those to another instance or offsite?
...
No, I simply use the snapshots on my FreeNAS for a history of the client backups. I then copy all
the current datasets, (not the snapshots), to an 8TB disk I use for backup of my FreeNAS. That does
get taken off-site occasionally.
 

Robert Trevellyan

Pony Wrangler
Joined
May 16, 2014
Messages
3,778
Regarding organizing datasets, divide things up as much as makes sense for your needs, but remember most sharing methods don't span filesystems. In that context, a dataset is a filesystem, which means sharing a parent dataset doesn't share a child dataset.
 

gpsguy

Active Member
Joined
Jan 22, 2012
Messages
4,472
Status
Not open for further replies.
Top