Product SiteDocumentation Site

9.9. 配额

The quota system allows limiting disk space allocated to a user or group of users. To set it up, you must have a kernel that supports it (compiled with the CONFIG_QUOTA option) — as is the case with Debian kernels. The quota management software is found in the quota Debian package.
To activate quota in a filesystem, you have to indicate the usrquota and grpquota options in /etc/fstab for the user and group quotas, respectively. Rebooting the computer will then update the quotas in the absence of disk activity (a necessary condition for proper accounting of already used disk space).
The edquota user (or edquota -g group) command allows you to change the limits while examining current disk space usage.
配额系统允许设置四个限制:
“软”限制可以被临时超越;当用户超过 warnquota 命令指定的配额,只是给出警告,通常有 cron唤起该命令。“硬”限制不允许被超出:系统将会拒绝任何超出硬配额的操作。
使用命令 edquota -t ,可以设定超过软限制的“宽限期”时长。宽限期之后,软限制将作为硬限制处理,要将数据写入硬盘,用户必须减少磁盘使用量至配额之内。