Enable quota in a OpenVZ container

Discussion in 'Installation/Configuration' started by Atreides, May 20, 2014.

  1. Atreides

    Atreides Member

    Dear users,

    my ISP 3 in Ubuntu 12.04 LTS doesn't take care about quota limit i setup through the panel.

    The reason is that during the installation I couldn't add the following rule in /etc/fstab:

    Code:
    usrjquota=quota.user,grpjquota=quota.group,jqfmt=vfsv0
    ...because in the fstab wasn't present the partition but only the following values:

    Code:
    proc /proc proc defaults 0 0
    none /dev/pts devpts rw 0 0
    ...while it should be something like this:

    Code:
    # /etc/fstab: static file system information.
    #
    # Use 'blkid' to print the universally unique identifier for a
    # device; this may be used with UUID= as a more robust way to name devices
    # that works even if disks are added and removed. See fstab(5).
    #
    # 
    proc /proc proc nodev,noexec,nosuid 0 0
    # / was on /dev/sda1 during installation
    UUID=44adcfd8-5b7e-4a8a-be9e-b0ff5953b4ee / ext4 errors=remount-ro,usrjquota=quota.user,grpjquota=quota.group,jqfmt=vfsv0$
    # swap was on /dev/sda5 during installation
    UUID=8c3a685a-ed11-4a19-ad2a-9538c0803a87 none swap sw 0 0
    /dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0
    I asked to the forum of my Provider (which is OVH.ie) and they told me that it's because they use OpenVZ. In the forum a user said also that's maybe it's OpenVZ.

    So I'm here asking you help because during the installazione of ISPconfig I read that id case the server has OpenVZ container then "...you should do this on the host system (I'm assuming that the ID of the OpenVZ container is 101 - replace it with the correct VPSID on your system):"

    Code:
    VPSID=101
    for CAP in CHOWN DAC_READ_SEARCH SETGID SETUID NET_BIND_SERVICE NET_ADMIN SYS_CHROOT SYS_NICE CHOWN DAC_READ_SEARCH SETGID SETUID NET_BIND_SERVICE NET_ADMIN SYS_CHROOT SYS_NICE
    do
      vzctl set $VPSID --capability ${CAP}:on --save
    done
    I confirm you that the quota in not setup because I receive the following message at the command quotacheck -avugm:

    Code:
    Cannot find filesystem to check or filesystem not mounted with quota option.

    I don't know where to edit this value, could you please help me?


    In OpenVZ site I found this page but I don't want to make mistakes and I don't know if it's the right place where to solve:
    http://wiki.openvz.org/User_Guide/M..._On_and_Off_Second-Level_Quotas_for_Container

    Thanks
    Best
     
    Last edited: May 20, 2014
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The instructions from the openvz wiki should work for turing on quota.

    This is not required anymore in current versions as the pure-ftpd package has been fixed so that it works with openvz out of the box.
     
  3. Atreides

    Atreides Member

    Hi Till,

    thanks for answering, I got it but my question is different:

    I don't know where to edit this value, could you please help me?

    Thanks
    Bye
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    This value has to be edited in the openvz configuration file of the virtual machine on the host server. If you do not run the host server yourself, then contact your ISP and ask them to turn on quota for your virtual machine.
     
  5. Atreides

    Atreides Member

    Dear Till,

    as you can read in my thread I've setup the server by my own so I need to edit the value my myself.

    The question is still the same:

    I don't know where to edit this value, could you please help me?

    Can you asnwer to this Till?

    Thanks
    Best
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Can you read the text and follow the instructions that is on that page in the openvz wiki that you posted yourself?
     
  7. Atreides

    Atreides Member

    I wouldn't ask help if I knew it, may you help me?
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    From the wiki page:

    the lines that start with # are commands, so you take these commands and execute them on your host server.
     
  9. Atreides

    Atreides Member

    Thanks for the support, I'm gonna try!
     
  10. Atreides

    Atreides Member

    Hi Till,

    I tried with the first command:
    Code:
    vzctl set 101 --quotaugidlimit 100 --save
    but an error message appears:
    Code:
    -bash: vzctl: command not found
    I don't know how to enable the quota, do you have any suggestion?

    Thank you very much!
    Best
     
  11. SamTzu

    SamTzu Member HowtoForge Supporter

    You should run that command on the host, not on the client.
    You should replace the clientID with what ever your client number is.
     

Share This Page