So, now that I have quotas enables and MySQL stored in /home with group names set for each user, I expected quotas to work for this scenario. Here's what I see as an example for one domain:
Home disk space used (including sub-servers) -694.82 MB (48 kB by server administrator, 0 bytes by mail / FTP users) Space used by databases 694.87 MB (694.87 MB in this server, 0 bytes in sub-servers) Total disk space used 52 kB
So, it seems like it is subtracting the database from the home disk space, and, then adding it back in the database portion, giving a total that completely excludes the database!
This is on the Eidt Virtual Server -> Quotas and Limits screen.
List virtual servers also shows 52kb used.
This is after I even use check disk quotas from virtualmin to bring them in sync.
Curiously, System Information -> Quotas shows the correct number.
Comments
Submitted by JamieCameron on Sat, 01/28/2012 - 15:07 Comment #1
Wierd, it looks like the database size is being subtracted from actual usage twice!
I suspect the cause is that Virtualmin expects the domain's MySQL data files to be owned by domain groups, but actually they aren't because of your previous issue. The correct fix is to manually chgrp all database directories and their contents to the correct groups..
Submitted by sfatula on Sat, 01/28/2012 - 18:52 Comment #2
There is only one database directory, /home/mysql. Each database within that has a group = it's owner. YOu had said in a previous ticket, this was the way to go to have a hard quota for a given user since the OS would enforce that. And it likely will, but, now it's a Virtualmin issue that needs to be fixed
Submitted by JamieCameron on Sat, 01/28/2012 - 20:11 Comment #3
Do all the files under those database directories also have their groups set correctly?
Submitted by sfatula on Sat, 01/28/2012 - 23:19 Comment #4
Yes, on the particular machine I am speaking of, there is exactly one database!
ls -l total 534536 drwx------. 2 mysql host4 4096 Jan 28 00:17 dspam -rw-rw----. 1 mysql mysql 10485760 Jan 28 00:04 ibdata1 -rw-rw----. 1 mysql mysql 268435456 Jan 28 00:04 ib_logfile0 -rw-rw----. 1 mysql mysql 268435456 Jan 25 17:45 ib_logfile1 drwx------. 2 mysql root 4096 Jan 25 17:45 mysql
host4 is the user who owns the dspam database.
Submitted by JamieCameron on Sun, 01/29/2012 - 00:02 Comment #5
What does
ls -l dspam
show though?Submitted by sfatula on Sun, 01/29/2012 - 09:54 Comment #6
Yep, my fault, when I had the problem of DB being owned by mysql, I changed the group membership of the folder for the database but did not use chgrp -R to change the actual database files.
Submitted by JamieCameron on Sun, 01/29/2012 - 10:46 Comment #7
That's what I thought ... so did this fix the problem?
Submitted by sfatula on Sun, 01/29/2012 - 10:47 Comment #8
Yes
Submitted by JamieCameron on Sun, 01/29/2012 - 11:44 Comment #9
Submitted by Issues on Sun, 02/12/2012 - 11:46 Comment #10
Automatically closed -- issue fixed for 2 weeks with no activity.