This is the old XigmaNAS forum in read only mode,
it will taken offline by the end of march 2021!



I like to aks Users and Admins to rewrite/take over important post from here into the new fresh main forum!
Its not possible for us to export from here and import it to the main forum!

ZFS and quotas.

Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
Guizas
NewUser
NewUser
Posts: 2
Joined: 06 Jul 2012 01:58
Status: Offline

ZFS and quotas.

Post by Guizas »

Hi guys im seriously going nuts trying to set ZFS up, ill start by saying ive been all over google and my understanding is that a Dataset is similar to a folder inside a Volume, so my questions are simple

Why do i get a error when trying to create a volume telling a dataset with that name does that exist? by what i read i should be able to create the Volume and then the dataset inside that volume.

And then come the disk space quotas, everytime i create a data set with any space quota, then i cannot create a volume for that dataset and the dataset does not show up when igo to the CIFS/SMB mount share.

So basically, confused about Datasets and Volumes, and why when i insert a quota on a data set, i cannot create a volume for it ir it doesnt not show up when i try to mount it.

Many Thanks

Gualter Guizado

aaronb
Starter
Starter
Posts: 26
Joined: 25 Jun 2012 08:16
Status: Offline

Re: ZFS and quotas.

Post by aaronb »

Hi Guizas,

Sorry for the slow reply. I was trying to get enough information assembled while building my NAS so that it would match what you would see.

The short(er) answer for ZFS:
Creating a ZFS system in NAS4Free has several components.
vdevs - the drives you create the pool from.
pool - the collection of vdevs to make a ZFS file system
volumes - used for sharing block-level file systems
datasets - used for ZFS filesystem available for sharing

The confusing part of this operation is the difference between a volume and dataset. Even reading several things about the 2 options, it isn't always clear - especially coming from a windows world. The reasons you would use each options:
Volumes: to share a block device via iSCSI or other method. Think of a volume like a 'raw disk' to be used by another file system.
Dataset: to share the filesystem out. This is what you would use for NFS or CIFS shares.

So, to create a ZFS filesystem:
1. From Disks -> Management
- add each of your disks with a simple description to tell them apart, and set the preformatted file system to 'ZFS Storage Pool Device'.
2. From Disks -> ZFS | Pools | Virtual Device
- create the ZFS vdev. Set your options for RAIDZ1 / mirror / etc here.
3. From Disks -> ZFS | Pools | Management
- create the Pool.
4. From Disks -> ZFS | Datasets
- create your dataset for sharing, add quotas, set compression.
5. Share your dataset via CIFS/SMB.

Unless you are planning on sharing out a block device as opposed to a network share, you can just ignore the volumes tab of ZFS.

It would appear there is an extra step in the interface for NAS4Free which confuses us as compared to the standard documentation on ZFS around the web. The standard docs suggest something like:
Disks -> Zpool -> Dataset
While NAS4Free is:
Disks -> vdevs -> zfsvdev -> Zpool -> Dataset

Functionality is essentially the same, there is just extra layers to making it work.

aaronb
Starter
Starter
Posts: 26
Joined: 25 Jun 2012 08:16
Status: Offline

Re: ZFS and quotas.

Post by aaronb »

As an additional note:
You will find trying to change permissions on a CIFS share to be a bit of challenge.
To set Windows type permissions (from windows), you cannot change the permissions in the root directory of a share, only in a folder.
Thus, the suggestion to make permissions handling easier is:
From NAS4Free
Create your pool.
Create your datasets for shares.
Share your datasets as your shares.
Share your 'pool' - in other words, create a share to the root of the ZFS file system.
- if you are going to use active directory, set that up as well.
- if you are going to use local account, add them next.

From you Windows machine:
Access the pool share, and set the user permissions on each of the dataset folders as needed using the windows dialogs.
Remove any excess users (like everybody).
MAKE SURE YOU LEAVE THE WHEEL (or add you admin account) ON THE FOLDER - otherwise only the user can access the permissions to change it.
Test access with different user accounts - note that you have to disconnect from the share or at least log out of windows to change users who are connecting to the NAS.

If you are done changing your share permissions, then you can un-share your Root.

aaronb
Starter
Starter
Posts: 26
Joined: 25 Jun 2012 08:16
Status: Offline

Re: ZFS and quotas.

Post by aaronb »

Permission recovery and deletion of folders can be handled by the administrator on the NAS4Free box if you lock yourself out.

Go to 'Advanced -> File Manager
Browse to mnt
You should see your ZFS pool there.
Look for your troubled folder
Click on the blue line under the column 'perms', check the boxes to make it accessible again

Guizas
NewUser
NewUser
Posts: 2
Joined: 06 Jul 2012 01:58
Status: Offline

Re: ZFS and quotas.

Post by Guizas »

Sorry aaronb, I have been away for a while, just wanted to say Thank You for loosing so much time explaining everything here, Thank You very very very much seems you went to alot of effort to explain everything here, once again. Thank You so Much.

Defyant
NewUser
NewUser
Posts: 1
Joined: 22 Jul 2012 11:31
Status: Offline

Re: ZFS and quotas.

Post by Defyant »

I'm having a similar issue as Guizas, except I want to share out a device as an iSCSI block device. However it never seems to work, whenever I try to create a ZFS Volume I get "cannot open 'ZFS/Data': dataset does not exist". If I then create the dataset in the Cofiguration -> Detected tab the Volumes information is empty, and no volume shows up when I go to setup an iSCSI target. Any help would be apprecieated.

Edit: Ok, I solved my own problem. Turns out even though the zpool had 10.1TB free it wasn't able to create a 10TB volume. When I tried to create a 9.8TB volume it worked first go with no problems, no dataset necessary.

Post Reply

Return to “ZFS (only!)”