ubuntu 18.04 AWS EC2 disk quota's

Discussion in 'Tips/Tricks/Mods' started by nhybgtvfr, Jul 3, 2018.

  1. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    as some of you are aware. getting disk quota's working in ubuntu on ec2 instances is a nightmare. especially now with the aws tuned kernels.
    well, I got this set of instructions direct from aws support, I've tried it out and can confirm it all works. (with some caveats which are commented in below)

    # Locate package with quota modules
    $ dpkg -S quota_v2.ko
    linux-modules-extra-4.15.0-24-generic: /lib/modules/4.15.0-24-generic/kernel/fs/quota/quota_v2.ko

    I didn't get this list of modules, just an empty response, but it proper 'men don't need instructions' fashion, I ploughed on regardless.

    # Verify the latest/stable version of Linux kernel $ apt-cache search linux-generic
    # Remove linux-aws kernel package
    $ sudo apt-get remove linux-image-4.15.0-1011-aws
    # Install new kernel
    $ sudo apt-get -y install linux-image-generic

    I tested on a newly created instance in eu-west-1b, using the 18.04 ami provided by canonical in the aws marketplace.
    it started with Linux-image-4.15.0-0-1009-aws, so I had to remove that one first, which auto-installed 4-15.0-1011-aws, which I then also removed as per the instructions.

    # Reboot
    $ sudo reboot
    # After reboot load the modules
    $ sudo modprobe quota_v1
    $ sudo modprobe quota_v2
    # Verify it is working
    $cat /proc/modules | grep -i quota
    quota_v2 16384 2 - Live 0x0000000000000000 quota_tree 20480 1 quota_v2, Live 0x0000000000000000
    quota_v1 16384 0 - Live 0x0000000000000000
    $quotaon -pa
    group quota on / (/dev/xvda1) is on
    user quota on / (/dev/xvda1) is on
    project quota on / (/dev/xvda1) is off

    obviously, all of this is assuming you've also installed quota and quotatool and edited /etc/fstab as per the perfect server tutorials.
    ahrasis and till like this.

Share This Page