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!
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 set quota not reflected in windows share
-
chris.shelton
- Starter

- Posts: 36
- Joined: 08 May 2015 12:01
- Status: Offline
zfs set quota not reflected in windows share
Hi all,
I have managed to set quotas for all of my users by using the command:
zfs set userquota@username=1G pool1/data
and this quota does work because it won't let me transfer anything larger than 1GB onto the share. However, the quota does not seem to have affected the free space information on the share.
It says 14.2GB free of 14.3GB, I thought it would say something along the lines of 0.9GB free of 1.0GB.
How do I get the quota to reflect the free space on the network location once mapped?
Thanks
I have managed to set quotas for all of my users by using the command:
zfs set userquota@username=1G pool1/data
and this quota does work because it won't let me transfer anything larger than 1GB onto the share. However, the quota does not seem to have affected the free space information on the share.
It says 14.2GB free of 14.3GB, I thought it would say something along the lines of 0.9GB free of 1.0GB.
How do I get the quota to reflect the free space on the network location once mapped?
Thanks
- b0ssman
- Forum Moderator

- Posts: 2438
- Joined: 14 Feb 2013 08:34
- Location: Munich, Germany
- Status: Offline
Re: zfs set quota not reflected in windows share
no the default tells you how much free space the filesystem has,
if you want you will have to write your own script to report the size
and call it in samba via "dfree command =" option
if you want you will have to write your own script to report the size
and call it in samba via "dfree command =" option
Nas4Free 11.1.0.4.4517. Supermicro X10SLL-F, 16gb ECC, i3 4130, IBM M1015 with IT firmware. 4x 3tb WD Red, 4x 2TB Samsung F4, both GEOM AES 256 encrypted.
-
chris.shelton
- Starter

- Posts: 36
- Joined: 08 May 2015 12:01
- Status: Offline
Re: zfs set quota not reflected in windows share
Hmm okay thanks for the info. I'm fairly new to this so do you have an example what such a script would look like? Or do you know of any resources that could help me?b0ssman wrote:no the default tells you how much free space the filesystem has,
if you want you will have to write your own script to report the size
and call it in samba via "dfree command =" option
Thanks
- b0ssman
- Forum Moderator

- Posts: 2438
- Joined: 14 Feb 2013 08:34
- Location: Munich, Germany
- Status: Offline
Re: zfs set quota not reflected in windows share
Nas4Free 11.1.0.4.4517. Supermicro X10SLL-F, 16gb ECC, i3 4130, IBM M1015 with IT firmware. 4x 3tb WD Red, 4x 2TB Samsung F4, both GEOM AES 256 encrypted.
-
chris.shelton
- Starter

- Posts: 36
- Joined: 08 May 2015 12:01
- Status: Offline
Re: zfs set quota not reflected in windows share
Great thanks a lot. This looks to do what I am after, I will try it when back in the office tomorrow and post back the result.b0ssman wrote:http://www.linuxtopia.org/online_books/ ... 06_02.html
Thanks again
-
chris.shelton
- Starter

- Posts: 36
- Joined: 08 May 2015 12:01
- Status: Offline
Re: zfs set quota not reflected in windows share
Are you able to provide me with a brief explanation as to what the following is actually getting?b0ssman wrote:http://www.linuxtopia.org/online_books/ ... 06_02.html
df $1 | tail -1 | awk '{print $2" "$4}'
Thanks, Chris.
- b0ssman
- Forum Moderator

- Posts: 2438
- Joined: 14 Feb 2013 08:34
- Location: Munich, Germany
- Status: Offline
Re: zfs set quota not reflected in windows share
see the man page
https://www.samba.org/samba/docs/man/ma ... onf.5.html
https://www.samba.org/samba/docs/man/ma ... onf.5.html
Nas4Free 11.1.0.4.4517. Supermicro X10SLL-F, 16gb ECC, i3 4130, IBM M1015 with IT firmware. 4x 3tb WD Red, 4x 2TB Samsung F4, both GEOM AES 256 encrypted.
-
chris.shelton
- Starter

- Posts: 36
- Joined: 08 May 2015 12:01
- Status: Offline
Re: zfs set quota not reflected in windows share
Okay at the moment I have something like this:b0ssman wrote:see the man page
https://www.samba.org/samba/docs/man/ma ... onf.5.html
#!/bin/bash
zfs get userquota@%U pool1/data | awk '{print $3}'
I realise this won't give me exactly what I want and I am unsure whether the %U will work here to show each individual how much they have left.
Is what I'm trying to get actually possible?
-
chris.shelton
- Starter

- Posts: 36
- Joined: 08 May 2015 12:01
- Status: Offline
Re: zfs set quota not reflected in windows share
zfs userspace pool1/data gives me a list of exactly what I need to be displaying - USED and QUOTA. But I don't know how to display the correct figures for each user...b0ssman wrote:see the man page
https://www.samba.org/samba/docs/man/ma ... onf.5.html
- b0ssman
- Forum Moderator

- Posts: 2438
- Joined: 14 Feb 2013 08:34
- Location: Munich, Germany
- Status: Offline
Re: zfs set quota not reflected in windows share
well this is where you have to start scripting.
the command is passed an argument which contains the path that is queried.
from this path you have to somehow arrive at the username which you then have to grep this list with.
and finally convert the values to the values that samba needs.
if a share with no quota is queries then the default free size has to be returned.
the command is passed an argument which contains the path that is queried.
from this path you have to somehow arrive at the username which you then have to grep this list with.
and finally convert the values to the values that samba needs.
if a share with no quota is queries then the default free size has to be returned.
Nas4Free 11.1.0.4.4517. Supermicro X10SLL-F, 16gb ECC, i3 4130, IBM M1015 with IT firmware. 4x 3tb WD Red, 4x 2TB Samsung F4, both GEOM AES 256 encrypted.