SOLVED DataSet over Zvol or Vice Versa

Status
Not open for further replies.

gpsguy

Active Member
Joined
Jan 22, 2012
Messages
4,472
It depends on your need. For iSCSI you'd want a zvol. For general purpose storage at it's simplest, you could just use a volume. If you need more control of it, consider using datasets.

From the "Create zvol" section of the manual (http://doc.freenas.org/9.10/storage.html#create-zvol), A zvol is a feature of ZFS that creates a raw block device over ZFS. This allows you to use a zvol as an iSCSI device extent.

Then see, "Create dataset" http://doc.freenas.org/9.10/storage.html#create-dataset, An existing ZFS volume can be divided into datasets. Permissions, compression, deduplication, and quotas can be set on a per-dataset basis, allowing more granular control over access to storage data....


 

SFoskett

Dabbler
Joined
Jul 28, 2016
Messages
37
Datasets are an excellent way to segregate data, especially for file shares like CIFS/SMB, AFP, or NFS. In fact, it's best practice to segment your storage into a single dataset per share for these uses. This way you can apply different compression schemes to each, assign quotas, and take separate snapshots. Very handy!
 

Robert Trevellyan

Pony Wrangler
Joined
May 16, 2014
Messages
3,778
I am wondering, why would anyone want to create DataSet instead of Zvol or vice versa?
What you get with a zvol is something that a client machine can mount as if it were a physical storage device. This might be important in some applications, e.g. virtual machines running on clients. However, getting good performance from this type of setup requires more resources on the FreeNAS box, so you only do it if you really need it.

The more typical usage scenario just needs to provide access to file storage on the network, which is less resource intensive. For that, datasets are used primarily for organization. Most of the settings that affect how shared storage behaves in FreeNAS can be adjusted per dataset.
 

Robert Trevellyan

Pony Wrangler
Joined
May 16, 2014
Messages
3,778
Now that I think about it some more, the two concepts are essentially orthogonal.

Datasets are used to organize storage. Shares are used to make storage available to (multiple) clients. While a share often corresponds 1:1 to a dataset, this is not necessary.

Conversely, a zvol is by definition an object used to make storage available to a single client.
 

Neeraj Saraf

Dabbler
Joined
Jun 3, 2016
Messages
34
Now that I think about it some more, the two concepts are essentially orthogonal.

Datasets are used to organize storage. Shares are used to make storage available to (multiple) clients. While a share often corresponds 1:1 to a dataset, this is not necessary.

Conversely, a zvol is by definition an object used to make storage available to a single client.
Fabulous....thank you so much..
 
Status
Not open for further replies.
Top