IRCNow

This is an old revision of the document!


Disk quotas

Disk quotas are used to place limits on the amount of disk space available to certain users and groups. There are two types of quotas - soft and hard quotas.

A soft quota, once threshold is reached, warns the user and sets a grace period time so user can decrease his/her disk usage below limits. After grace period is over, the soft limit is handled as a hard limit - does not allow any more disk allocation.

Currently, IRCNow's shell limits disk usage to 5GB (soft) and 10GB (hard) per user.

Setting up

To enable quotas, We need to use the keywords userquota and/or groupquota to mark the desired filesystem in fstab(5) on which We want to enforce quotas. By default, files quota.user and quota.group will be created at the root of those filesystems.

Example:

/dev/sda.a /home ffs rw,nodev,nosuid,userquota 1 2

Defining thresholds

Thresholds are measured in KB and

To set thresholds, We use edquota(8).

For an individual user:

$ edquota PiRATA
Quotas for user PiRATA:
/home: KBytes in use: 62, limits (soft = 256000, hard = 512000)
        inodes in use: 25, limits (soft = 0, hard = 0)

On the example above, PiRATA can use up to 512MB.

For a group, We need to invoke -g option:

$ edquota -g staff
Quotas for group staff:
/home: KBytes in use: 62, limits (soft = 1000000, hard = 1500000)
        inodes in use: 25, limits (soft = 0, hard = 0)

In this case, all staff users will be able to use up to 15GB of disk space.

Enforcing