No Quota?!

Hi,
not sure if this is a bug or if it belongs to Iworx/NodeWorx/SiteWorx or OS so I post here.

Centos 4.1 is our distro.

There seems to be no quota set on our SiteWorx accounts.
In NodeWorx -> SiteWorx -> Accouts, all are listed as having used 0 MB.
When a SiteWorx account clicks on Disk Space (…siteworx/stats.php?mode=realtime&graph=storage) from their main page, it gets them to an empty page.

If I run “quota -gs <username>” it returns for all accounts:

Disk quotas for group <groupname> (gid <id>): none

On the initial install I prepared /home with quota settings as per the install documentation:

[root@box]# cat /etc/fstab |grep home
/dev/rootvg/homelv /home ext3 defaults,usrquota,grpquota 1 2

I also activated quota and have the aquota.group and aquota.user files under /home

Same goes for /var

I have a weak experience with quota so I’ll be happy for any pointers.

Thanks
-tsl-

Try rebuilding the quota tables (as root)


quotacheck -cugvmf -F vfsv0 /home

Then edit your /home/interworx/iworx.ini, and look for the line “partition=” and make sure it says:

partition="/home"

Then, rerun storage.pex:

/home/interworx/cron/storage.pex

See if that helps.

Thanks Socheat,
it partially helped.

As root I ran “quotacheck -cugvmf -F vfsv0 /home”

In iworx.ini I changed

[quota]
partition="/"

to

[quota]
partition="/home"

and ran “/home/interworx/cron/storage.pex” as the iworx user

In NodeWorx the SiteWorx accounts page now shows used space.

From SiteWorx the empty page remains though, when clicking on Disk Space!

A “quota -gs <username>” still says “… none”
A “repquota /home” displays:


*** Report for user quotas on device /dev/mapper/rootvg-homelv
Block grace time: 7days; Inode grace time: 7days
Block limits File limits
User used soft hard grace used soft hard grace

xxxxxx – 48312 0 0 152 0 0
xxxxxx – 16 0 0 4 0 0
xxxxxx – 21084 0 0 664 0 0
xxxxxx – 308568 0 0 20072 0 0
account1 – 68 0 0 13 0 0
account2 – 16984 0 0 2864 0 0
account4 – 68 0 0 13 0 0
account5 – 72 0 0 14 0 0

I’m also a bit curious as to where the SiteWorx users databases should be located?
Our SiteWorx user db’s are located under /var/lib/mysql/ but I can see directories called /home/<account>/var/<domain>/database/
Where should they be located exactly?

If they should be under /var/lib/mysql, is NodeWorx calculating the quota for the db’s aswell when “partition” in iworx.ini is set to /home ?

Thanks
-tsl-

A “quota -gs <username>” still says “… none”

Run:


/home/interworx/cron/storage.pex --syncquota

A “repquota /home” displays:

You’ll need to use “repquota -g /home”

I’m also a bit curious as to where the SiteWorx users databases should be located?
Our SiteWorx user db’s are located under /var/lib/mysql/ but I can see directories called /home/<account>/var/<domain>/database/
Where should they be located exactly?

If they should be under /var/lib/mysql, is NodeWorx calculating the quota for the db’s aswell when “partition” in iworx.ini is set to /home ?

The should be in /var/lib/mysql which is the default MySQL spot. If you change user quotas to use /home the DBs in /var won’t be included in the quota’d total tsl.

Chris

Thanks for the info Chris

but hmm,

repquota -g /home still shows no limits

I changed back to partition="/" in iworx.ini and ran:

quotacheck -cugvmf -F vfsv0 /home
quotacheck -cugvmf -F vfsv0 /var
su - iworx
/home/interworx/cron/storage.pex --syncqouta

Used Diskspace in NodeWorx->SiteWorx->Accounts shows 0 MB used again for all accounts!

Is this an issue with CentOS, LVM and quota or is there something in Iworx-CP that is not quite right?

-tsl-

I changed back to partition="/" in iworx.ini and ran:

This is why NodeWorx is reporting 0 storage. If you keep it at /home it’ll be fine.

repquota -g /home still shows no limits

If you repquota now (aftering doing all the quotachecks) is the output still 0? And could you paste the output in a post pls.

OK, I changed it back to partitions="/home" and ran the quota checks again. Now NodeWorx shows used space, but I don’t believe the space used for the users db’s are included…right?! So how is this controlled?


[root@box home]# repquota -g /home
*** Report for group quotas on device /dev/mapper/rootvg-homelv
Block grace time: 7days; Inode grace time: 7days
Block limits File limits
Group used soft hard grace used soft hard grace

root – 43052 0 0 12 0 0
apache – 128 0 0 14 0 0
vchkpw – 3128 0 0 40 0 0
iworx – 315400 0 0 20286 0 0
account1 – 12576 0 0 147 0 0
account2 – 17300 0 0 2951 0 0
account3 – 6328 0 0 479 0 0
account4 – 160 0 0 38 0 0

Same goes for /var

-tsl-

I don’t believe the space used for the users db’s are included…right?! So how is this controlled?

If you split MySQL storage and web content storage on 2 partitions then there is no way to track both under the account’s storage umbrella.

Chris

Opps, this is not good!
It could be that we get customers with huge databases and they are still under their NodeWorx limits due to small web and email content.

What if I move mysql to somewhere under /home and create a symlink?

Something like:
[/var/lib] # ln -s /home/db/mysql mysql

That would probably work with the quotas i guess (or hope). Would Iworx-CP have any problems with this setup?

-tsl-

It could be that we get customers with huge databases and they are still under their NodeWorx limits due to small web and email content.

yep ;).

Something like:
[/var/lib] # ln -s /home/db/mysql mysql

quotas are partition based so symlinks across partitions won’t fix the issue tsl. The best solution is to copy your /var/lib/mysql to /home and then symlink from /var/lib/mysql => /home/mysql for example.

Chris

I was under the assumption that quotas were handled by the group name associated with files anywhere on the server root filesystem? Although even if that is true I guess that the mysql files are mysql:mysql so that wouldn’t help either.

For some reason i thought the mysql data was counted :rolleyes:
What would happen if I changed the group on the /var/lib/mysql files to the group which they belong and leave the owner alone would that make a difference?

quotas are partition based so symlinks across partitions won’t fix the issue tsl. The best solution is to copy your /var/lib/mysql to /home and then symlink from /var/lib/mysql => /home/mysql for example.

Yes, thats what I meant :slight_smile:

Justec,
the MySQL db files created by the users gets

mysql:<groupname>

So quotas should work, if not on separate partitions.

-tsl-

That’s not how it works, unfortunately :frowning:

It can only count one partition

partition=/whatever

In this case the /home is a completely different physical disk partition from / (root) so they are not counted. It is merely mounted as /home

It would work the way you are thinking if the box was like my old one with only two partitions

/ (root)
/boot

But it isn’t :frowning:

I’m also in this boat except my home directory is in the /chroot partition and databases are in /var



/  	/dev/sda3  	
/boot 	/dev/sda1 	
/chroot 	/dev/sda8 	
/tmp 	/dev/sda7 	
/usr 	/dev/sda6 	
/var 	/dev/sda5 	


Ah well, not much we can do about it. Chris’s workaround seems to make sense to me.