Tag Archives: disk quota on ubuntu 20.04

Disk Quota on Amazon EC2

The Linux AMIs available for AWS EC2 may not have the packages required for activating Disk Quota.

This article is based on Ubuntu 20.04.

There are many articles and suggestions on the internet. Following one of the suggestions caused my system to become read-only. Lastly found a solution which looks the most legit, simple and works perfect.

It needs installation of the package “linux-modules-extra-aws

  1. apt-get install linux-modules-extra-aws
  2. apt-get -y install quota quotatool
  3. mount -o remount <disk partition>  e.g - mount -o remount /
  4. quotacheck -avugm
  5. quotaon -avug
  6. Edit the fstab file and add the necessary
    • nano /etc/fstab
    • add the following to the end of the existing parameters ,usrjquota=quota.user,grpjquota=quota.group,jqfmt=vfsv0
    • Save the file
    • Please note - wrong entry in the fstab file can make the system unusable. Please check the file first before rebooting.  Use mount -a to check if the entries in fstab file is good.