在 zfs 上設定配額不起作用

在 zfs 上設定配額不起作用

我使用的是 FreeBSD 11。

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,從而給系統時間來注意到,會發生什麼情況?

相關內容