Quotas are used to restrict the amount of hard disk space occupied by a user or a group. Group level quota can only be applied to primary groups on AlmaLinux / Rocky Linux / Amazon Linux. Quotas only be applied on quota enabled partition. The large web hosting company uses this quota features to device the storage for each users. This makes as useful features for system administrator to use this features. Main as per storage point of view it is helpful. This provides the Linux Disc quotas features for divided the storage with number of users.

Quotas applied:

  1. Based on the number of inodes (number of files ).
  2. Based on the number of blocks (volumes of hard disk space storage).

To check the block size use the command

blockdev – getbsz <partition>

Quotas Limits

There are two Quotas limits:

  1. Soft – Soft quota limits will only warn the user that they have reached their quota limits.
  2. Hard – Hard quota limits will not allow the user. To create any more files or directories. The quota limit is reach.

Steps to Apply Quotas

  1. Create a new partition.
  2. Format the partition.
  3. Create an directory.
  4. Mount the partition on the directory with quotas enabled.
  5. Give full permissions to the partition.
  6. Create the quota database file.
  7. Turn on the quotas.
  8. Assign the quotas to the users or groups.
  9. Applying Quotas on a Partition

To mount the partition with quotas enabled

# mount –o usrquota, grpquota <partition name > <mount point>

Generate the quotas database file

# quotacheck –cugv <mount point>

-c Create new database -g Group
-u user -v Verbose

Turn on the quota

# quotaon < mount point>

Assigning quotas to users and groups

# edquota –u <user name >


# edquota –g <group name>

Disk Quotas for user <username > (uid <uid>)

Filesystem blocks soft Hard inodes soft hard

/dev/hda9 0 0 0 0 0 0

Congratulation now you have enabled Disc Quotas for AlmaLinux / Rocky Linux / Amazon Linux.