Use Quota in Ubuntu 16.04 in normal way

2

0

I was trying to setup quota for my ftp users on fresh Ubuntu 16.04. I was using this flow

But at the end came to flowing error, after running "quotaon /" i got error

quotaon: using //aquota.user on /dev/vda1 [/]: No such process

quotaon: Quota format not supported in kernel.

I found alternative tutorial here which uses

apt-get -y install linux-image-generic
apt-get -y install linux-headers-generic
apt-get -y install linux-image-extra-`uname -r`

kernel overwriting method which i think is not so good approach.

I wondered if there is not present some alternative to "quotaon" ? as it is removed from kernel then there should be some normal alternative functionality to it ? or some other way to enable quotaon without re installation of "linux-image-generic ..." ?

Armen

Posted 2018-12-17T07:11:52.517

Reputation: 73

Answers

1

If you are running the Virtual kernel inside a virtual machine, then this is a known bug that can be fixed by installing the package linux-image-extra-virtual.

Otherwise, a better tutorial on enabling quota is found in the Stack Overflow post Ubuntu quota format not supported in kernel, which is more comprehensive than the one you found.

This does not involve modifying the Linux kernel, but it only causes the quota modules to start with the boot, so that the quota command is enabled. By default these kernel modules are not enabled, so that quota is unavailable.

For completeness, here is the relevant part of the answer:

We can install the full missing linux-generic package:

apt-get -y install linux-generic

Or only the extras packages (I prefer this):

apt-get -y install linux-image-generic
apt-get -y install linux-headers-generic
apt-get -y install linux-image-extra-`uname -r`

We need add the quota modules to start with boot:

echo quota_v1 >> /etc/modules
echo quota_v2 >> /etc/modules

reboot

Check if it's working:

sudo -s
cat /proc/modules | grep -i quota

quota_v1 16384 0 - Live 0xffffffffc037c000
quota_v2 16384 2 - Live 0xffffffffc0377000
quota_tree 20480 1 quota_v2, Live 0xffffffffc0250000

quotaon -pa

group quota on / (/dev/sda1) is on
user quota on / (/dev/sda1) is on

Both quotas are activated.

harrymc

Posted 2018-12-17T07:11:52.517

Reputation: 306 093

Thanks for pointing that This method This does not involve modifying the Linux kernel – Armen – 2019-01-02T07:44:39.687