Thursday 29 July 2021

How to Enable Quota on File Systems in RedHat 8.1 Linux Server


This tutorial will guide you on how to Enable Quota on /home File Systems in RedHat 8.1 Linux server.

Please follow the below steps to enable quota for /home file systems:

1. Edit fstab file using vim editor.

Add usrquota & grpquota on /home mount point line after the defaults with seperated by comma.

[root@worldwidelinux ]# vim /etc/fstab

grpquota

Save and Close the file by pressing Esc key and type :wq! then press Enter key.

2. Reboot your server to reflect the user quota allocation on /home mount point.

[root@worldwidelinux ]# reboot

3. Turn on quota for home file system

[root@worldwidelinux ]# quotaon -avug

Whereas:
-a : All automatically mounted non NFS filesystems in /etc/fstab with quotas will have their quotas turned on.
-v : Display a messfae for each filesystem where quotas are turned on.
-u : Manipulate user quotas.
-g : Manipulate group quotas.
quota

Verify quota is turned on or not using below command:

[root@worldwidelinux ]# repquota -a

Verify quota

soft: Once soft limits reached, it will warn a users(Size should be in KB).

hard: Once hard limits reached, it will not allow users to create files(Size should be in KB).