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).
Ejecutar edquota usuario
(o edquota -g grupo
) le permite modificar los límites mientras examina el uso actual del espacio en disco.
El sistema de cuotas le permite definir cuatro límites:
two limits (called “soft” and “hard”) refer to the number of blocks consumed. If the filesystem was created with a block-size of 1 kibibyte, a block contains 1024 bytes from the same file. Unsaturated blocks thus induce losses of disk space. A quota of 100 blocks, which theoretically allows storage of 102,400 bytes, will however be saturated with just 100 files of 500 bytes each, only representing 50,000 bytes in total.
dos límites (suave y duro) que hacen referencia a la cantidad de inodos utilizados. Cada archivo ocupa al menos un inodo para almacenar información sobre sí mismo (permisos, dueño, marcas temporales del último acceso, etc.). Por lo tanto, es un límite en la cantidad de archivos del usuario.
Puede exceder temporalmente un límite «suave»; el programa warnquota
, generalmente ejecutado por cron
, simplemente advertirá al usuario que excedieron su cuota. Nunca podrá exceder un límite «duro»: el sistema rechazará toda operación que fuera a exceder una cuota dura.
Si ejecuta edquota -t
puede definir un «período de gracia» máximo autorizado durante el que se puede exceder un límite suave. Luego de este período se interpretará el límite suave como uno duro y el usuario deberá reducir su uso de espacio en disco por debajo de este límite para poder escribir en disco duro.