0

I cannot get quota to work on Fresh copy of Ubuntu Pro

mount -o remount / quotacheck -avugm
    quotacheck: Scanning /dev/root [/] done
    quotacheck: Checked 19045 directories and 94713 files 
quotaon -avug
    quotaon: using //quota.group on /dev/root [/]: No such process
    quotaon: Quota format not supported in kernel.
    quotaon: using //quota.use
    r on /dev/root [/]: No such process    
    quotaon: Quota format not supported in kernel.

I have also installed sudo apt install linux-image-extra-virtual with no success finding the quota modules. find /lib/modules/uname -r -type f -name 'quota_v.ko*'

uname -r = 5.4.0-1044-gcp

Any help will be appreciated ?

Donno
  • 31
  • 1
  • 6

2 Answers2

0
sudo apt-get -y install quota quotatool
sudo apt install linux-image-extra-virtual
sudo apt-get install linux-modules-extra-gcp
reboot
quotaoff -a
quotacheck -avugm
quotaon -avug
Donno
  • 31
  • 1
  • 6
0

Install required packages:

sudo apt-get -y install quota quotatool linux-image-extra-virtual  linux-modules-extra-gcp

Add usrquota option to mount options in /etc/fstab:

sudo nano /etc/fstab

Output:

LABEL=cloudimg-rootfs   /        ext4   defaults       0 1

Afterwards:

LABEL=cloudimg-rootfs   /        ext4   defaults,usrquota,grpquota       0 1

Then proceed to remount the filesystem, as in this example we are using / :

sudo mount -o remount /

To examine the file system and build the required files for the quota utility, you will use the quotacheck command. The command will create a file named aquota.user if it is not already in the system. Run the command below:

sudo quotacheck -ucm /

Verify aquota.user has been created under / folder:

sudo ls -ls /

Output:

 8 -rw-------   1 root root  7168 Jul  1 09:51 aquota.group
 8 -rw-------   1 root root  7168 Jul  1 09:51 aquota.user

Check if quota is enabled:

sudo quotaon -v /

Output:

/dev/root [/]: group quotas turned on
/dev/root [/]: user quotas turned on

Version of my reproduction:

$ uname -a 

Linux ubuntupro 5.8.0-1035-gcp #37~20.04.1-Ubuntu

Pit
  • 184
  • 11