ZFS set userquota behaving strangely

Hi all,

I have tried setting a userquota for my users which is working, but not quite as expected.

I set a quota on myself with the command:

zfs set userquota@chris=10M pool/data

When I run zfs userspace pool/data I can see that the quota has taken effect.

But for some reason, it lets me transfer files large than 10MB across. I transferred a 40MB file across just fine, and the userspace shows used: 39.2M and quota: 10M. Now, if I go and try transfer something else across like a 3MB file, that fails due to not enough space, so it seems the quota is working in a way.

Also, if I transfer a 387MB file across, it will get part way through and then run out of space, saying that 274MB more space is needed, but why was it able to get down to 274 when the limit is 10?

Am I misunderstanding the way ZFS quotas work?

Thanks, Chris.
 
This may have something to do with it:
Code:
         Enforcement of user quotas may be delayed by several seconds. This
         delay means that a user might exceed their quota before the system
         notices that they are over quota and begins to refuse additional
         writes with the EDQUOT error message. See the userspace subcommand
         for more information.
From zfs(8).
 
Back
Top