Disk Quota Terminology Explained

Creating and implementing disk quotas requires a basic understanding of disk quota terminology. This tutorial explains this terminology through examples.

Block Size and Inode Number

There are two types of quota: block size quota and inode number quota.

A block size quota defines the disk size a user or a group can use. For example, if we set a block size quota to 100MB for a user, the user can not use more than 100 MB of disk space.

An inode number quota specifies the total number of files the user or group can create. For example, if we set an inode number quota to 10 for a user, the user can create a maximum of 10 files.

block size

Soft and Hard limits

We have two options to specify the value of block size and inode number quotas. These options are soft and hard limits. A soft limit is flexible. The quota allows the user to use disk space and inode numbers beyond his soft limit for a certain period called a grace period. A hard limit is fixed. The quota does not allow the user to use disk space and inode numbers beyond his hard limit.

hard and soft limits

Configuring and reading a block size limit

The default value is zero. A value of zero turns off the quota limit. If we change it to any number, it implements the quota limit to the specified value. Without any unit symbol, it interprets the value in blocks. For example, if we set the value 100, it interprets it as 100 blocks. We can use K (kibibytes), M (mebibytes), G (gibibytes), and T (tebibytes) unit symbols with the number.

Configuring and reading an inode limit

Similar to block size, inode quota also accepts a value in a number. The default value is zero. A value of zero turns off the quota limit. If we change it to any number, it implements the quota limit to the specified value. Without any unit symbol, it interprets the value as it is. For example, if we set the value 100, it interprets it as 100 inodes. We can use k (10^3), m (10^6), g (10^9), and t (10^12) unit symbols with the number.

Grace period

A user can use resources beyond his soft limit during the grace period. For example, if the grace period is five days, the user can use resources beyond his soft limit for five days.

Disk quota example

A user has the following disk quota configuration.

Block
Soft 1000
Hard 2000
Inode
Soft 10
Hard 15
Grace period 2 days

The above configuration applies a quota as follows:

  • The user can use 1kb (1000) of disk space on the specified partition.
  • He gets a warning if he uses more than 1kb but less than 2kb.
  • He cannot use more than 2kb of disk space.
  • If he crosses his soft limit (1kb), he can not use extra space after 2 days until he brings total usage below the threshold limit.
  • He can create a maximum of 10 files or directories.
  • He gets a warning if he makes more than 10 files or directories but less than 20.
  • He can not create more than 20 files or directories.
  • If he has made more than 10 files or directories, he can not create a new one after 2 days until he brings the total number below 10.

This tutorial is part of the tutorial series 'Linux Disk Quota Management Explained with Examples'. Other parts of this series are the following.

Chapter 01  Basic Concepts of Disk Quota
Chapter 02  Disk Quota Terminology Explained
Chapter 03  How to manage disk quota in Linux Step-by-Step
Chapter 04  Linux Disk Quota Explained with Examples

Conclusion

The basic disk quota terminology includes block size, inode number, soft limit, hard limit, and grace period. The block size is the used disk space. The inode number is the number of created files. A soft limit defines an excepted limit. The user should use resources under this limit. However, he is temporarily allowed to cross this limit. This temporary period is the grace period. A hard limit specifies the fixed limit the user can not cross.

ComputerNetworkingNotes Linux Tutorials Disk Quota Terminology Explained

We do not accept any kind of Guest Post. Except Guest post submission, for any other query (such as adverting opportunity, product advertisement, feedback, suggestion, error reporting and technical issue) or simply just say to hello mail us ComputerNetworkingNotes@gmail.com