12.4. Configuration of file system quota#

UCS allows the limiting of the storage space available to a user on a partition. These thresholds can be set as either a quantity of storage space (e.g., 500 MB per user) or a maximum number of files without a defined size limit.

Two types of thresholds are differentiated:

Hard limit

The hard limit is the maximum storage space a user can employ. If it is attained, no further files can be saved.

Soft limit

If the soft limit is attained - which must be smaller than the hard limit - and the storage space used is still below the hard limit, the user is given a grace period of seven days to delete unused data. Once seven days have elapsed, it is no longer possible to save or change additional files. A warning is displayed to users who access a file system with an exceeded quota via CIFS (the threshold is based on the soft limit).

If a quota value of 0 has been configured, it is evaluated as an unlimited quota.

Quotas can either be defined via the UMC module Filesystem quotas or a policy for shares, see Configuring file system quota.

File system quotas can only be applied on partitions with the file systems ext4 and XFS. Before file system quotas can be configured, the use of file system quotas needs to be activated per partition, see Activating file system quota.

12.4.1. Activating file system quota#

In the UMC module Filesystem quotas, all the partitions are listed on which quotas can be set up. Only partitions are shown which are currently mounted under a mount point.

The UMC module *File system quotas*

Fig. 12.2 The UMC module File system quotas#

The current quota status (activated/deactivated) is shown and can be changed with Activate and Deactivate.

If quota has been activated on a XFS root-partition, the system has to be rebooted.

12.4.2. Configuring file system quota#

Quotas can either be defined via the UMC module Filesystem quotas or a policy for shares, see Policies. The configuration through a policy allows setting a default value for all users, while the UMC module allows configuration of user-specific quota values.

The user-specific quota settings can be configured with the UMC module Filesystem quotas. The permitted storage quantities can be set with the pencil symbol for all enabled partitions. All the settings are set user-specifically. Add can be used to set the thresholds for soft and hard limits for a user.

The quota settings can also be set with a User quota share policy. The settings apply for all users of a share; it is not possible to establish different quota limits for different users within one policy.

Quota settings that are applied via a quota policy are by default only applied once to the file system. If the setting is changed, it will not be applied automatically on the next user login. To inherit changed quota values, the option Reapply settings on every login can be activated at the quota policy.

Quota policies can only be used on partitions for which the quota support is enabled in the UMC module, see Activating file system quota.


File system quotas always apply to a full partition. Even if the policies are defined for shares, they are used on complete partitions. If, for example, three shares are provided on one server which are all saved on the separate /var/ partition and three different policies are configured and used, the most restrictive setting applies for the complete partition. If different quotas are used, it is recommended to distribute the data over individual partitions.

12.4.3. Evaluation of quota during login#

The settings defined in the UCS management system are evaluated and enabled during login to UCS systems by the tool univention-user-quota run in the PAM stack.

If no quota are needed, the evaluation can be disabled by setting the Univention Configuration Registry Variable quota/userdefault to no.

If the Univention Configuration Registry Variable quota/logfile is set to any filename, the activation of the quotas is logged in the specified file.

12.4.4. Querying the quota status by administrators or users#

A user can view the quota limits defined for a system using the command repquota -va, e.g.:

*** Report for user quotas on device /dev/vdb1
Block grace time: 7days; Inode grace time: 7days
                        Block limits                File limits
User            used    soft    hard  grace    used  soft  hard  grace
root            --      20       0       0              2     0     0
Administrator   --       0       0  102400              0     0     0
user01          --  234472 2048000 4096000              2     0     0
user02          --       0 2048000 4096000              0     0     0

Total blocks: 8
Data blocks: 1
Entries: 4
Used average: 4.000000

Logged in users can use the quota -v command to view the applicable quota limits and the current utilization.

Further information on the commands can be found in the man pages of the commands.