The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

mySQL takes up diskquota?

Discussion in 'General Discussion' started by Necroist, Aug 2, 2004.

  1. Necroist

    Necroist Active Member

    Joined:
    Jul 21, 2004
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    Hi,

    I have a very simple question, does mySQL databases created by an account uses up the disk quota? Meaning if this user has a quota of 100MB, can his database go above 100MB in total?
     
  2. Necroist

    Necroist Active Member

    Joined:
    Jul 21, 2004
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    And, I have a DB that has text in it over 58kb.

    When I enter the cpanel, I see my SQL Disk Usage as 0.00.

    Edit: I understand that all the databases are stored in /var/lib/mysql.

    Must I set /var to have userquota in the /etc/fstab?
     
    #2 Necroist, Aug 2, 2004
    Last edited: Aug 2, 2004
  3. silversurfer

    silversurfer Well-Known Member

    Joined:
    Dec 29, 2002
    Messages:
    274
    Likes Received:
    0
    Trophy Points:
    18
    It is not counted. You have to update it manually.

    Run /scripts/updatemysqlquota
     
  4. Necroist

    Necroist Active Member

    Joined:
    Jul 21, 2004
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    I did that pior to posting here, unfortunately it didn't help :(
     
  5. silversurfer

    silversurfer Well-Known Member

    Joined:
    Dec 29, 2002
    Messages:
    274
    Likes Received:
    0
    Trophy Points:
    18
    Oh, I just read your post again.

    try


    /scripts/fixquotas

    Make sure that in /etc/fstab, your partitions have usrquotas added to /var etc. depending on where's your partitioning. If you don't have a /var partition, you need to enable it for /.
     
  6. Necroist

    Necroist Active Member

    Joined:
    Jul 21, 2004
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    Ah so I do need to put /var with the userquota flag on in fstab.

    Thanks.

    Am I supposed to reboot or is there some commandline that will refresh the quotas to recongize /var as a quota enabled?
     
  7. bigpy2003

    bigpy2003 Well-Known Member

    Joined:
    Feb 22, 2004
    Messages:
    124
    Likes Received:
    0
    Trophy Points:
    16
    With disk quotas, I believe every file with a specific owner is counted toward their quota. I also think that mysql has it's files as group 'mysql'

    so for example:
    chown owner_name_here file.name.ext

    will change the owner of a file, that file *i believe* will be now counted toward their quota
     
  8. Necroist

    Necroist Active Member

    Joined:
    Jul 21, 2004
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    I've did a /var to userquota in etc/fstab,

    restarted the quota thing, did a quota -v, and it now counts /var as a quota enabled path.

    Now, the problem is I did a ./fixqutoas and ./updatemysqlquotas, in my cpanel, I still see my mySQL disk usage as 0.00.

    Did I do anything wrong?

    in my /var/lib/mysql :

    Code:
    drwxrwx---  2 rbox   mysql      1536 Aug  2 21:18 rbox_wpdb
    
    Shouldn't this mean that that db has been chown-ed to the user rbox and it should count into the quota?
     
  9. Necroist

    Necroist Active Member

    Joined:
    Jul 21, 2004
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    bumposaurs.
     
  10. Necroist

    Necroist Active Member

    Joined:
    Jul 21, 2004
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    I'm honestly still getting problems, my SQL Usage just doesn't update itself even though I used like 58kb of mySQL space. It still shows as 0.00
     
  11. bigpy2003

    bigpy2003 Well-Known Member

    Joined:
    Feb 22, 2004
    Messages:
    124
    Likes Received:
    0
    Trophy Points:
    16
    Hmm...maybe consider that 58k is a low amount and that it might ignore anything under #k?
     
  12. Necroist

    Necroist Active Member

    Joined:
    Jul 21, 2004
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    Hi,

    you're right, one of my customer uses a database and I was monitoring his mySQL quota status. I checked his cpanel, and there was indeed a value. But here's the bigger problem.

    when I did a du -h on /var/lib/mysql, I realised he is using 2MB for his db, but according to Cpanel, he was only using 0.01MB.

    I did a ./fixquotas and ./updatemysqlquotas and it still shows the same result.

    Is the value that u see under the mySQL disk usage already counted into the Disk Usage?
     
Loading...

Share This Page