SvennD
ZFS quota
April 19, 2017

ZFS quota

Posted on April 19, 2017  •  1 minutes  • 212 words  •  Suggest Changes

ZFS is loaded with useful features, just a while ago I took a peak at setting quotes. Using just a few commands you limit the amount  of storage a certain pool can take.

First let’s check if there is no quota set :

zfs get quota

This would result in something like :

# zfs get quota
NAME                                                       PROPERTY  VALUE  SOURCE
huginn                                                     quota     none   default
huginn/dataset                                           quota     none   default
huginn/[email protected]_2017-04-01_00:00:02_monthly      quota     -      -
huginn/[email protected]_2017-04-10_00:00:01_daily        quota     -      -
[...]
huginn/[email protected]_2017-04-19_14:00:01_hourly       quota     -      -
jbod1                                                      quota     none   default
jbod1/users                                                quota     none   default
jbod1/users/servers                                        quota     -     -

As you see, no quota’s. Now let’s add one :

zfs set quota=5TB jbod1/users/server

The format : zfs set quota=$size $pool

Let’s check again :

[[email protected] HG00731]# zfs get -r quota jbod1/users/someuser
NAME                                                       PROPERTY  VALUE  SOURCE
jbod1/users/server                                      quota     5T     local
jbod1/users/[email protected]_2017-04-01_00:00:02_daily   quota     -      -
jbod1/users/[email protected]_2017-04-02_00:00:01_daily   quota     -      -
jbod1/users/[email protected]_2017-04-03_00:00:01_daily   quota     -      -
jbod1/users/[email protected]_2017-04-03_13:00:01_hourly  quota     -      -
jbod1/users/[email protected]_2017-04-03_14:00:01_hourly  quota     -      -

Simple enough; now some practical warnings :

Support

If you enjoyed this website, consider buying me a Dr. Pepper

Buy me a Dr PepperBuy me a Dr Pepper