我使用的是 FreeBSD 11。为了在名为 storage 的池上设置配额,我在终端中输入以下配置:
zfs set quota=10G storage
zfs set userquota@user1=1M storage
问题是当我从 samba 或 sftp 连接时,我可以复制超过 1MB 的文件,但配额不起作用。
答案1
根据zfs
手册页(FreeBSD 11-STABLE from 2017-03-09),
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.
您的测试可能会暴露此行为。如果您尝试在多个交易中超过 的值userquota
,从而给系统时间来注意到,会发生什么情况?