Linux 101 : User's quota



To limit the consumption of disk space, we could assign different values to the below elements:

  • Block soft limit : 5000
  • Block hard limit : 10000
  • Inode soft limit : 250
  • Inode hard limit : 500
Remark:

Soft limits issue only a warning as opposed to the hard limits that result in an error when exceeded.

We start by enabling quotas on the directory in the "/etc/fstab" file: 


We then re-mount our filesystem so that the changes get taken into account:


We create the files needed by the "backup" directory using the below command, so that the quotas could be applied to it: 


We enable quota on the filesystem as follows:


We then limit the use of the filesystem by the user "Albert" for example:


Inside the file, we specify the following:


We could use the below command to check the quotas and the usage of the "backup" directory for each user, including the user "Albert":


Comments

Leave as a comment:

Archive