Not suspending at limit

deltaned

Verified User
Joined
Jan 23, 2004
Messages
102
Hi,

In my package i activate suspend at limit.
Now I see there are a few customers over his limit but no suspending.

Is it possible to let this block automaticly?

Maybe an option to build in: a customer can`t use mre diskspace than add to his account?
Now I have a customer who buy 40 MB diskspace and use 200!
(and not suspending)
 
Hello,

Bandwidth is the only thing that justifies suspension as it's something that cannot be decreased. If DA was to suspend based on disk quotas, then the user wouldn't be able to login to remove the items. You should have been notified about the over usage, so manual suspension should work. Comments on this functionality are welcome if anyone has suggestions.

John
 
DirectAdmin Support said:
Bandwidth is the only thing that justifies suspension as it's something that cannot be decreased. If DA was to suspend based on disk quotas, then the user wouldn't be able to login to remove the items. You should have been notified about the over usage, so manual suspension should work. Comments on this functionality are welcome if anyone has suggestions.

Disk space shouldn't need suspension.... they should be limited in all aspects anyway - ftp, mysql, filemanager and the users directory itself should all be locked to a maximum quota - moment they hit that nothing should be able to be done...

With an unnamed other panel FTP gives errors, file manager wont upload and any attempt to write to MySQL (therefore using extra space) corrupts the table and disallows any further writing - doesnt purposely corrupt the table - its just happens when attempting to write to a table.

The downside to that is you have to log into mysql and use the FIX command - Only takes 2 seconds however can be annoying.

Besides that I think thats the best way :)

Chris
 
I don't think MySQL data will be affected because it is created and stored by MySQL daemon running under 'mysql' user and consequently is not counted as user's data.
 
Hello,

Anything that is run as the username while writing will be blocked when the quoat limit is hit. The include ftp, filemanager, email if it's on the same partition, cgi's or anything else that is run under that user ID.

If anyone knows if mysql does have a disk space limiting feature, do tell :)

John
 
Hi John,

if that can be build in it would be great!
Now an user can use more, but doesent pay for it.
 
Agreed. That's why emails notifications are sent out right now. Admins/Resellers always have the power to click "suspend" if Users don't cough up the cash :)

John
 
The problem is not to get a payment.
The problem is that an user can use the diskspace as mutch as he wants.
It doesent block after 40 mb as axample.
A customer buy 40 MB diskspace but he upload: 120 MB, no problem it doesent stop.
 
Hello,

If the system quotas are enabled and working correctly, then he'll only be able to upload 40 meg of data.

Type:

quota -v username

to see how much he's using of his quota. The only things that will let him go over are mysql databases, and emails if they are on a different partition than the quotas. Anything he uploads with ftp or the filemanager will be blocked when he hits his limit, *if* the system quotas are working correctly.

John
 
Hello,

I mentioned quota problems somewhere, but didn't get a resolution yet.

Could you please elaborate on how to set up DA to manage quotas on FreeBSD once the kernel is recompiled and /etc/rc.conf, /etc/fstab files are configured?

Thank you.
 
Hello,

Once you have everything ready to be used with quotas, then just reboot (or remount the partitins) so that the quotas are loaded up, then you need to create the quota files:

Code:
/usr/sbin/quotaoff -a
/sbin/quotacheck -avug
/usr/sbin/quotaon -a

John
 
Thank you for your reply, but that didn't help :)

I naturally rebooted the system for the new kernel to take effect, that means quotacheck was performed during the boot process.

"quota -v username" shows current usage, but the limit is not set:
Code:
[root@/tmp webcart]# quota -v redguitars
Disk quotas for user redguitars (uid 1009):
     Filesystem   usage   quota   limit   grace   files   quota   limit   grace
              /       0       0       0               0       0       0
           /usr    4790       0       0             777       0       0
 
Hello,

Then you need to resave the users settings in DA:

Reseller Panel -> List / Modify Users -> username -> modify user username's data -> "Save".

John
 
Thanks, but I actually tried that too before posting.

I also did it through Admin, not as reseller (admin->Show All user->username->Modify user) and it didn't help either.
 
Just an idea: does DA set quotas for all partitions or for a specific one? If later, where can I define it?

I recall disk partitioning discussions where you advised to have only 1 partition. Is it possible that DA only tries to set quotas for / partition?

Thank you.
 
Hello,

If you only have 1 partition, then your life will become much simpler. The quota partition should be defined in:

/usr/local/directadmin/conf/directadmin.conf

quota_partition=/

If nothing is set, it will default to /home. You can see what's currently setup by typing:
Code:
/usr/local/directadmin/directadmin c | grep quota_partition
John
 
Thank you for your reply, but I am not looking for easier ways :)

I actually saw FreeBSD system shutting down because of that. Since then I make sure that at the very least /var and /tmp do not reside on root partition.

Anyway, here is a list of my partitions (/home is just symb. link to /usr/home):
Code:
[root@/usr/local/directadmin/conf webcart]# mount
/dev/ad0s1a on / (ufs, local, with quotas)
/dev/ad1s1e on /export (ufs, local, soft-updates)
/dev/ad0s1e on /tmp (ufs, local, soft-updates)
/dev/ad0s1g on /usr (ufs, local, with quotas, soft-updates)
/dev/ad0s1f on /var (ufs, local, soft-updates)
procfs on /proc (procfs, local)
linprocfs on /usr/compat/linux/proc (linprocfs, local)
[root@/usr/local/directadmin/conf webcart]#
[root@/usr/local/directadmin/conf webcart]# /usr/local/directadmin/directadmin c | grep quota_partition
quota_partition=/usr
[root@/usr/local/directadmin/conf webcart]#

I changed quota_partition from / to /usr (as you can see above) and resaved user settings, but it still doesn't work.
 
Hello,

what does "repquota -a" return? Have you re-saved the user settings so it sets up the limits? If you want to manually test what DA is doing, here is what it runs to setup a quota limit on FreeBSD:
Code:
/usr/sbin/edquota -e /usr:1234:1234:0:0 bob
See if that does anything to setup a limit.

John
 
Thank you for your reply.

Code:
[root@/usr/local/directadmin/conf webcart]# edquota -e /usr:1234:1234:0:0 redguitars
[root@/usr/local/directadmin/conf webcart]# quota -v redguitars
Disk quotas for user redguitars (uid 1009):
     Filesystem   usage   quota   limit   grace   files   quota   limit   grace
              /       0       0       0               0       0       0
           /usr    5856*   1234    1234   7days     819       0       0
so edquota seems to work just fine.

"repquota -a" returns a list of users (which I wont post here for obvious reasons) where "used" column has non-zero numbers while soft/hard limit columns have zero for all users but redguitars.

I then modified redguitars user via DA, changing disk space and it still reflects the old quota (1234).
 
Back
Top