Difference between a Dataset and a Share?

Status
Not open for further replies.

ChiknNutz

Patron
Joined
Nov 6, 2015
Messages
217
Okay, go ahead and b!tch-$!@p me, but I cannot figure out what the differences are between these two things. Truly, I have searched and found some info, but nothing definitive yet, though I am sure this has been addressed many times. So, can I get a basic synopsis of how these differ and/or how they are used differently?
 

Nick2253

Wizard
Joined
Apr 21, 2014
Messages
1,633
What do you mean by "a share"? Do you mean a "shared folder"?
 

ChiknNutz

Patron
Joined
Nov 6, 2015
Messages
217
Umm, I s'pose.

Here is one thread on the subject that seems to give me some info:
https://forums.freenas.org/index.php?threads/datasets-vs-folders.6475/

From the several similar threads I've found so far, this appears to be a fairly common question or at least misunderstanding. From what I gather, a "share" in Unix-speak is akin to a "folder" in Windows-ease, but not yet entirely sure of how a dataset is different, but it seems it is kinda like a "partition.".
 

adrianwi

Guru
Joined
Oct 15, 2013
Messages
1,231
I'd describe a dataset as a 'folder' and a share as a 'map' to access the folder or dataset from another machine
 

Nick2253

Wizard
Joined
Apr 21, 2014
Messages
1,633
I think somewhere along the way you added some meaning to "share" that it doesn't have.

We talk about "shares" pretty commonly here because a NAS without a share is not a useful NAS. A share is nothing more than a way to access some data remotely. Data might be shared using CIFS/SMB, FTP, AFP, NFS, or any other way. FreeNAS has lots of ways of sharing data.

A dataset is a feature of ZFS. A partition is kind of analogous, but don't think about it that way. What matters is that a dataset is the smallest organizational unit in ZFS that you can apply ZFS properties to. You can snapshot datasets, you can set compression/encryption on a dataset. A dataset can even have child datasets. But you can't do that to half a dataset, like a folder in a dataset, for example.

A dataset appears like a folder in the file hierarchy. And you can manipulate it like a folder. But it's much more powerful than a folder.

Tying that together, you usually share a dataset (otherwise, why have the dataset (ignoring jails and the root dataset)). So, when someone says "My media share is acting up", they usually mean that they created a "media" dataset, then they shared that dataset, and now they have a problem with either their media dataset, the service they are using to share that dataset, or both.
 

solarisguy

Guru
Joined
Apr 4, 2014
Messages
1,125
I think somewhere along the way you added some meaning to "share" that it doesn't have.

We talk about "shares" pretty commonly here because a NAS without a share is not a useful NAS. A share is nothing more than a way to access some data remotely. Data might be shared using CIFS/SMB, FTP, AFP, NFS, or any other way. FreeNAS has lots of ways of sharing data.

A dataset is a feature of ZFS. A partition is kind of analogous, but don't think about it that way. What matters is that a dataset is the smallest organizational unit in ZFS that you can apply ZFS properties to. You can snapshot datasets, you can set compression/encryption on a dataset. A dataset can even have child datasets. But you can't do that to half a dataset, like a folder in a dataset, for example.

A dataset appears like a folder in the file hierarchy. And you can manipulate it like a folder. But it's much more powerful than a folder.

Tying that together, you usually share a dataset (otherwise, why have the dataset (ignoring jails and the root dataset)). So, when someone says "My media share is acting up", they usually mean that they created a "media" dataset, then they shared that dataset, and now they have a problem with either their media dataset, the service they are using to share that dataset, or both.
Yes! And, maybe in simpler language (and simplifying a lot)

@ChiknNutz, Windows speak or Unix (Linux) speak ? When you answer, I will know what language to use.

Confusion comes from shares being done most often on datasets.

Dataset is a ZFS feature, and is kind of like a directory in Windows and Unix. (But only kind of, as it can have its own quotas etc., see above.)

Share is related to making files and directories (or datasets!) available over a network using for example NFS or CIFS (samba, SMB, Windows shares).
 

ChiknNutz

Patron
Joined
Nov 6, 2015
Messages
217
Mostly just a Windows and formerly DOS user (have been at it for a while now in some fashion).

So I am now just trying to get my arms around it all. What I am now trying to grasp are the recommended permissions. Seems like everything defaults to ROOT and WHEEL for the user and group respectively. Seems to me you'd want everything to be kinda "wide open" at the volume level and get more granular at each dataset and such.

In my case, I am creating the usual type of folders: Music, Photos, Shared, etc. Should I make the main volume (I just have one created) use the NOBODY and NOGROUP to start off with? What are the implications of doing so? Is that bad practice?

I guess what I am trying to find are the "FreeNAS Best Practices" manuals somewhere, which I so far haven't found.
 

solarisguy

Guru
Joined
Apr 4, 2014
Messages
1,125
In my opinion, getting the permissions done perfectly right is a major consulting job :D

There are at least two common scenarios that are fairly well documented:
  • having everything wide opened (i.e. one user owns everything and anybody from any Windows client has all access),
  • using Active Directory.

Everything else might be a custom task, as it requires at least some knowledge of your setup and needs.
 

solarisguy

Guru
Joined
Apr 4, 2014
Messages
1,125
P.S.
At home, quite often, it is easier to have (much) more storage, than trying to implement and enforce and negotiate and administer quotas.
 

ChiknNutz

Patron
Joined
Nov 6, 2015
Messages
217
Looking more into Home Directory (relative to a user) and Home Share (relative to a share). Can't seem to find anything really definitive on how these are to be used and how they are supposed to work. In the "Add User" command, there is a checkbox for "Create Home Directory in" and a path. For the "Add Windows Share" command there is a checkbox for "Use as home share" but am not able to figure out how to properly configure these. I have messed around with them both, just not getting it. I ended up deleting the user I created, but now I have a Windows Share (as seen on my desktop PC) that still shows the old user share, but now I can't get rid of it. Within the folder, several files were auto created... a .cshrc file and a .login file etc. Not sure what these are or how to now get rid of the phantom share.
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
Deleting the user doesn't delete the home directory for that user.

A home directory is a space on the server a user has access to. Storage space for that user. Think, making an H drive for all your users on the network where they can store documents that are important to them but don't need to be shared with other users.

The files you see (.cshrc, etc), are typical UNIX home directory shell and profile related files.
 

ChiknNutz

Patron
Joined
Nov 6, 2015
Messages
217
Ya I pretty much "get" what it's for, just doesn't seem very well documented or is not intuitive how to set it up. What I am not figuring out is how to get rid of that directory/dataset now. I have no Share that should be showing it. I currently only have one Share and it is for something else (Media, plex stuff). Right now I am just testing stuff out and will destroy the whole volume as I have planned to add 2 more drives for a total of 6, but am trying to learn how all this works as Unix/FreeNAS are quite new to me (but not PCs in general).
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
To delete it you need to use a protocol to access your data and delete it. You can use cifs, ssh, nfs and many others. I think ssh is the simplest or just using the built in shell in the GUI.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
You can get rid of a dataset by visiting the pool in the storage menu, then selecting the dataset, then click on remove at the bottom.
 

ChiknNutz

Patron
Joined
Nov 6, 2015
Messages
217
That's the thing, the dataset was NOT visible in the pool. I just logged back into it and now it is in fact gone. This was showing up for like 8 hours or so, no idea why it would take so long to "go away".
 
Status
Not open for further replies.
Top