Disk quota management With multi-user systems, administrators must protect against users filling the disk. Often, users remove unneeded files only when prod- ded. This eventually results in a scarcity of space. Runaway programs may fill up large amounts of disk space as well, often through log files that record errors. It is possible to limit the amount of files, directories and disk space used by a user. 1. Some concepts 1.1. Per device/partition control Disk quotas are managed partition by partition. There is no relation between each partition and quotas setup. Further, you may enable disk quotas on some partitions while disabling them on others. 1.2. User and group quotas You can control disk quota user per user. You can also work at the group level. Both quotas are set up completely independently. A group with a hundred users may have a disk space quota of much less than the sum of the users' quotas. When a file is created by a user, it belongs to that user and to some group. The disk quotas of both the user and the group are updated. A user may have plenty of available disk quota, but the group may be out of quota. Because of that, the user won't be able to use more disk space while active in that group. This will not prevent them from doing work in another group assuming that the space is available. However, they will need to switch to that group before this can occur. 1.3. Group quotas and members default quotas Linuxconf lets you manage quotas with great flexibility. While you can configure the quota limits user by user, most administrators will choose to operate more globally. Further, linuxconf lets you partially fill quota specifications. This lets you use some defaults for a user and override only a single specification (the maximum files allowed for example). 1.4. Disk quota information You can control two aspects with disk quotas: (1) the number of files and directories owned by a user (or group) and (2) the amount of disk space owned. Both options are controlled separately. It is possible to have no limit on one, while enforcing some limits on the other. Each aspect is controlled by three parameters: +o Soft limit The soft limit is a proposed operational limit. The user/group may exceed this limit, but only for a limited amount of time. +o Hard limit This limit can't be exceed. +o Grace period This is the length of time the user/group may exceed the soft limit. It defaults to 7 days, and is expressed in a days:hours:minutes:seconds format. 1.5. Possible values for a limit A given limit may have three values: +o 0 This means no limits. +o -1 This means unspecified. The effective value is inherited from the defaults. +o Some value greater than 0 This is a limit. For disk space, this is expressed in kilobytes, and is true whatever the block size used on the disk. Linuxconf will translate the kilobytes to fit the disk subsystem requirements. 1.6. Effective quotas for users Disk quotas for a user are influenced by three setups: +o The user records Those records are visible in the user account dialog. One record exists per partition with user quotas enabled. +o The defaults for group members Don't confuse this with group quotas. You can set up default values for disk quotas which apply directly to the members of the group. You modify these defaults right in the group account dialog. One record exists per partition with user quotas enabled. +o General default values One record per partition provides the base defaults. Often this will be the only record modified with all users inheriting these values. 1.7. Effective quotas for groups Disk quotas for a group are influenced by two setups: +o The group records These records are visible in the group account dialog. One record exists per partition with group quota enabled. +o General default values One record per partition provides the base defaults. Often this will be the only record modified with all groups inheriting these values. 2. Enabling disk quotas You have to enable disk quotas on each partition where you want this level of control. This is done in the "Filesystem configurator." Pick the menu "Access local drive" and then pick each partition where you want to enable disk quotas. In the dialog, you will find a checkbox for user quotas and another for group quotas. Again, these quotas (user and group) are completely independent and may be enabled separately. 3. Related commands Here are the different commands you may want to use to manipulate disk quotas: +o quotaon,quotaoff This lets you turn on and off quotas on a partition. +o repquota This prints a status report for the different users or groups. +o quotacheck This checks a partition and updates the status of each group and user. This command is normally run right after an fsck at boot time. +o edquota This is a bare bones quota management utility. It allows you to edit a user record or group record directly. DO NOT USE THIS. It has no concept of defaults and any changes made with it may be overwritten by Linuxconf.