Page 1 of 1
Dataset or Volume?
Posted: 06 Oct 2012 05:06
by xthrillho
Hi there,
I'm fairly new to ZFS and Unix/BSD in general. So far I've set up my ZFS pool in RAIDZ of 5x 2TB drives - giving me 9.06T - however I think only 7.5TB would be usable? It doesn't really say anywhere.
Now I'm a bit confused on the differences between volumes and datasets. I have looked on the wiki but there doesn't seem to be much information there.
What I'd ultimately like is the ZFS pool to have two usable volumes. One called "media" which would be around 5-6TB, and one called "files" which would use the remainder (1-2TB?) that are shared out.
I'm not sure if I should be created a single volume, and two datasets? Or two volumes and no datasets?
I tried mucking around but didn't get very far. I managed a single volume called data, but I'd really prefer two separate ones. So I've deleted everything (except for the zpool) so I can start from scratch.
Also I've now noticed this:
Name Size Used Free Capacity Dedup Health AltRoot
data 9.06T 5.00T 2.13T 0% 1.00x ONLINE -
I'm not sure why it's saying used 5T? There is nothing on the drives, they are blank.
Some help would be much appreciated.
Re: Dataset or Volume?
Posted: 06 Oct 2012 07:06
by armandh
drives combine to make virtual devices
Vdevs combine to make pools
I am not totally sure about the second part as
i am a single user and just use the whole pool
I think from what I have read here
pools are carved up in to volumes and data sets.
something akin to partitioning the pool
Re: Dataset or Volume?
Posted: 06 Oct 2012 13:18
by daoyama
Hi,
xthrillho wrote:
What I'd ultimately like is the ZFS pool to have two usable volumes. One called "media" which would be around 5-6TB, and one called "files" which would use the remainder (1-2TB?) that are shared out.
If you have created the volume without sparse, the size is reserved for the volume.
5T is your creation, isn't it?
Note that sparce option of WebGUI is introduced in r308.
I recommend creation of dataset for each shares.
The root pool should not use for storing data.
xthrillho wrote:
I managed a single volume called data, but I'd really prefer two separate ones. So I've deleted everything (except for the zpool) so I can start from scratch.
You can change volume size any time. But be careful, you must shrink a partition on the volume before decreasing the volume. Or just set to use sparse volume, it free reserved area of the volume.
Also, you can create sparse new volume like 10TB on the pool.
The combination of sparse and compression/dedupe is useful if you can compress/dedup the files on it.
if you use dataset, you don't worry about the size of it. The default reservation is none for dataset,
but you can set it any time of course.
However WebGUI is not supported this operation

Yes, I should add it!
Re: Dataset or Volume?
Posted: 07 Oct 2012 05:51
by xthrillho
Will I need to create a volume at all if using Datasets?
Re: Dataset or Volume?
Posted: 07 Oct 2012 23:21
by Onichan
xthrillho wrote:Will I need to create a volume at all if using Datasets?
No, volumes currently are really only useful for iSCSI. If you aren't doing SCSI then it is better to just use a Dataset.
Re: Dataset or Volume?
Posted: 07 Oct 2012 23:50
by daoyama
daoyama wrote:
if you use dataset, you don't worry about the size of it. The default reservation is none for dataset,
but you can set it any time of course.
However WebGUI is not supported this operation

Yes, I should add it!
I have completed. Now r335 have reservation, and r338 have permission on dataset.
Please try next release.
Re: Dataset or Volume?
Posted: 08 Oct 2012 05:40
by xthrillho
I couldn't seem to get it working
What steps exactly should I take?
1) Format drives to ZFS
2) Create the vdev
3) Create the zpool
4) Create two datasets (media and data)
5) Share datasets using AFP
I do not have to worry about volumes at all?
Re: Dataset or Volume?
Posted: 08 Oct 2012 08:25
by shakky4711
Hello,
As far as I understand the FreeNAS/NAS4Free team uses different descriptors compared to the SUN/Oracle origial ZFS documents.
I understand a Dataset should be similar to a ZFS-folder. It is a separate folder wherh you can set individual permissions, restrictions, limits, etc., so perfect for user home.
A volume is better for issues where you have/need a block device, I never needed it, but could be possible to use it for iSCSI targets... someone out there have it running?
Shakky
Re: Dataset or Volume?
Posted: 09 Oct 2012 10:47
by xthrillho
Okay so I've got it all nicely setup and can connect via AFP to each individual dataset. However, I can not write!
I have tried everything I can think of. I have granted user permission to write and access.
Without the datasets I can write just fine. But with the two datasets, I can not write. My OS tells me I do not have permission. Have tried with the username setup in NAS4Free, and also local authentication.
Edit: Same thing under SMB/CIFS
Re: Dataset or Volume?
Posted: 10 Oct 2012 10:31
by daoyama
xthrillho wrote:I have tried everything I can think of. I have granted user permission to write and access.
Without the datasets I can write just fine. But with the two datasets, I can not write. My OS tells me I do not have permission. Have tried with the username setup in NAS4Free, and also local authentication.
Did you check "Access Restrictions" on ZFS dataset?
ZFSdataset1.png
Re: Dataset or Volume?
Posted: 10 Oct 2012 23:24
by xthrillho
Strange - I didn't seem to see that option?
Re: Dataset or Volume?
Posted: 11 Oct 2012 17:29
by daoyama
xthrillho wrote:Strange - I didn't seem to see that option?
Ok, your version is not latest.
I wrote the version in previous post.
Please use 9.1.0.1.344.
Re: Dataset or Volume?
Posted: 11 Oct 2012 23:53
by xthrillho
daoyama wrote:xthrillho wrote:Strange - I didn't seem to see that option?
Ok, your version is not latest.
I wrote the version in previous post.
Please use 9.1.0.1.344.
Have updated and will try tonight. Thank you!
Re: Dataset or Volume?
Posted: 12 Oct 2016 01:49
by danzi
From the Oracel ZFS admin guide:
dataset
A generic name for the following ZFS components: clones, file systems, snapshots, and volumes.
Each dataset is identified by a unique name in the ZFS namespace. Datasets are identified using the following format:
pool/path[@snapshot]
pool
Identifies the name of the storage pool that contains the dataset
path
Is a slash-delimited path name for the dataset component
snapshot
Is an optional component that identifies a snapshot of a dataset