Website Harddisk Quota

Discussion in 'General' started by calbasi, Nov 12, 2021.

Tags:
  1. calbasi

    calbasi Member HowtoForge Supporter

    Hi, do you know if the Ispconfig home bloc "Website Harddisk Quota" include database size?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    It does not include database size, mysql databases are owned by the user and group 'mysql' and not the 'web' user of the website, so they can not be a part of the website quota.
     
  3. calbasi

    calbasi Member HowtoForge Supporter

    That's estrange, because one of my web accounts has more used space, according home quotes block, than "du -am ." shows...
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    You get the quota usage by with:

    repquota -avug

    This can have several reasons, e.g. the data might be in a partition that ahs no quota enabled or you have multiple partitions where you enabled quota on, which would duplicate the available free memory per website.
     
  5. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    site (and database?) backups can be owned by the website user or by root, so those might be counted in used quota depending on your server configuration.
     
  6. calbasi

    calbasi Member HowtoForge Supporter

    No extra partitions:
    $ df -h

    S. fitxers Mida En ús Lliure %Ús Muntat a
    udev 2,9G 0 2,9G 0% /dev
    tmpfs 597M 61M 536M 11% /run
    /dev/vda1 95G 66G 25G 73% /
    tmpfs 3,0G 0 3,0G 0% /dev/shm
    tmpfs 5,0M 0 5,0M 0% /run/lock
    tmpfs 3,0G 0 3,0G 0% /sys/fs/cgroup
    tmpfs 597M 0 597M 0% /run/user/1000

    Just 3 backup files using about 300Mb when "sudo ls -lhs /var/backup/web8". So that's not the reason.

    Used space:

    $ sudo du -ah /var/www/clients/client1/web8
    3,3G /var/www/clients/client1/web8

    BUT:

    $ sudo repquota -avug
    *** Report for user quotas on device /dev/vda1
    Block grace time: 7days; Inode grace time: 7days
    Block limits File limits
    User used soft hard grace used soft hard grace
    ----------------------------------------------------------------------
    web8 -- 6340964 7168000 7169024 135291 0 0

    And, in the graphic quota report of the ispconfig home, the databases:
    c1epsdesarrollodrupal 1292.6 MB
    c1epsdesarrollotether 1700 MB

    So, if I add the databases weight (3Gb) to the web folder (3,3) + backup folder (0,3Gb) = 6,6Gb (close the 6340964K of repquota)
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    I'm sure this is a coincidence. There must be other files owned by this user outside of the directory /var/www/clients/client1/web8 which are not the database content. The database resides in /var/lib/mysql/ and as you can see, there are no files owned by the user web8 there.
     
  8. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    du will count files owned by any user, repquota reports usage per user.
     
  9. calbasi

    calbasi Member HowtoForge Supporter

    Si "du" should be bigger, but is smaller
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    No, as the files counted in quota can be outside of the directory that you checked with the du command. See my answer in post #7.

    Example: we have two directories /dir1 and /dir2. Both directories contain a file with 1 MB in size, owned by user A. Now you run:

    sudo du -ah /dir1

    the result will be 1MB. But Quota will show you the usage of 2 MB for user A, as user A owns files in /dir2 as well, which you did not count with your du command. du and quota work completely different. Quota is based on the ownership of files, so it counts all files that a user owns inside the partition that has quota support enabled, no matter in which directory of that partition. The du command, counts all files inside a specific directory, no matter which user owns them, so du will not count files that are in another directory even if they are owned by the same user.
     
  11. calbasi

    calbasi Member HowtoForge Supporter

    I understand. But that means there are 3GB "lost" outside web or backup folder... I'll try to find them, but it's an unusual issue! :)
     
  12. calbasi

    calbasi Member HowtoForge Supporter

    I thank you very much for your patience, :) I've learned a bit more about quotes :)
     
  13. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    You can use 'find' to locate the files owned by a user, or not owned by a user with the -user switch and other args as needed.
     

Share This Page