I'm not very familiar with ZFS and need to increase the size of an ZFS share on our FreeNAS.
When i do zpool list
i see that we have 2 ZFS pools:
NAME SIZE ALLOC FREE EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
Volume1 1.98T 1.00T 1003G - 26% 50% 1.00x ONLINE /mnt
Volume2 1.98T 140G 1.85T - 2% 6% 1.00x ONLINE /mnt
The share i want to increase in size is a directory on Volume1
named releases
(should go from 100G to 150G)
[root@axxfile] ~# zfs list | grep releases
Volume1/releases 100G 280K 100G /mnt/Volume1/releases
[root@axxfile] ~# zfs get quota Volume1/releases
NAME PROPERTY VALUE SOURCE
Volume1/releases quota 100G local
To increase the size i did: zfs set quota=150 Volume1/releases
which resulted in:
[root@axxfile] ~# zfs list | grep releases
Volume1/releases 100G 280K 100G /mnt/Volume1/releases
[root@axxfile] ~# zfs get quota Volume1/releases
NAME PROPERTY VALUE SOURCE
Volume1/releases quota 150G local
For some reason the quota is increased from 100G to 150G but the "available space" is still 100G. After asking Google for a solution i found that i increased the ZFS share but the OS does not know this so i need to tell it to the OS with something like
[root@axxfile] ~# growfs -M /mnt/Volume1/releases/ Volume1/releases
growfs: illegal option -- M
usage: growfs [-Ny] [-s size] special | filesystem
As you can see, this does not work because of -M
is not a valid property. I tried continue Googling but was not able to come to a solution. Maybe someone can help me out by explaining what i'm doing wrong or which step i missed?
Maybe its good to know is that we use an old version (9.3) of FreeNAS. An update is planned for nearby future but we where not able to do it yet.
============== UPDATE 1 ============ @Michael Hampton
I notice that refquota is still 100G, that is the problem i guess?
[root@axxfile] ~# zfs get quota,reservation,refquota,refreservation Volume1/releases
NAME PROPERTY VALUE SOURCE
Volume1/releases quota 150G local
Volume1/releases reservation none local
Volume1/releases refquota 100G local
Volume1/releases refreservation none local
[root@axxfile] ~# zfs get -r reservation,refreservation -t filesystem,volume Volume1
cannot open '-t': dataset does not exist
cannot open 'filesystem,volume': invalid dataset name
NAME PROPERTY VALUE SOURCE
Volume1 reservation none local
Volume1 refreservation none local
Volume1/VM reservation none local
Volume1/VM refreservation none local
Volume1/ab reservation none local
Volume1/ab refreservation none local
Volume1/backup reservation none default
Volume1/backup refreservation none default
Volume1/backup/cloneimages reservation none local
Volume1/backup/cloneimages refreservation none local
Volume1/backup/sicherungen reservation none local
Volume1/backup/sicherungen refreservation none local
Volume1/backup/switch reservation none default
Volume1/backup/switch refreservation none default
Volume1/jails reservation none default
Volume1/jails refreservation none default
Volume1/mailserver reservation none local
Volume1/mailserver refreservation none local
Volume1/releases reservation none local
Volume1/releases refreservation none local
After the reply of
@Michael Hampton
i noticed that also arefquota
was set for the share (data set). After i changed therefquota
withzfs set refquota=150G Volume1/releases
the problem was solved.This explains pretty well what the difference is between
quota
andrefquota
:Quota limits the overall size of a dataset and all of it's children and snapshots while refquota applies to only to data directly referred to from within that dataset.
Quota would be useful if you delegated a dataset to another user (with permission to create additional datasets under that one) or if you wanted to limit the overall size of a given dataset. For instance, the /home directory of a multi user file server could be limited to 10TB, which would ensure that the sum of all user home datasets and snapshots of said datasets could not exceed 10TB.
Refquota would be helpful if you had users who tend to overload a specific dataset. In our above example, each users home directory might be limited to a 100GB quota and a 50GB refquota. This would mean their home directory could contain 50GB of data, but the sum of the live dataset and all snapshots couldn't exceed 100GB.
Source: the difference between quota and refquota