Koozali.org: home of the SME Server

Legacy Forums => General Discussion (Legacy) => Topic started by: CheahCH on September 24, 2004, 01:32:37 AM

Title: Reset Disk Quota
Post by: CheahCH on September 24, 2004, 01:32:37 AM
Is there any way to reset the disk quota for a
particular user in SME 6 ?
Anyone knows where is it stored ? Tks.
Title: Reset Disk Quota
Post by: mrjhb3 on September 24, 2004, 03:34:01 AM
How about the quota tab on the server-manager sreen?
Title: Reset Disk Quota
Post by: CheahCH on September 24, 2004, 11:29:21 AM
Ihe problem is that I suspect the quota is corrupted.
For example I have user A, disk usage is 8Mb, if I delete this user and later receate user A again immediately the disk usage is shown as 8Mb. The user does not have any other files except mail. Mailbox has been fully cleared.
Title: Reset Disk Quota
Post by: byte on September 24, 2004, 11:32:00 AM
if they are corrupt you can rebuild them by typing...

quotacheck -avug

HTH
Title: Reset Disk Quota
Post by: CheahCH on September 24, 2004, 11:36:21 AM
would it have to be in a single user mode ?
Title: Reset Disk Quota
Post by: byte on September 24, 2004, 11:40:07 AM
Yes - Sorry forgot to mention that! as you cannot check a mounted drive
Title: Reset Disk Quota
Post by: CheahCH on September 24, 2004, 12:51:43 PM
Problem solved. Thanks.
For the record these were the steps I took.


1. reboot
2. at menu press crtl-x
3. press 'tab' key
4. choose kernel and load in single mode
   eg smeserver-up single


sh-2.05a# /sbin/quotaon -ap
group qouta on / (/dev/hda3) is on
user qouta on / (/dev/hda3) is on
group qouta on / (/dev/hda1) is off
user qouta on / (/dev/hda1) is off


That will list whether quotas are on or off.

sh-2.05a# quotaoff -a

that will turn all quotas off
Then you can run your quotacheck without it complaining about needing the -f force.

sh-2.05a# /sbin/quotaon -ap
group qouta on / (/dev/hda3) is off
user qouta on / (/dev/hda3) is off
group qouta on / (/dev/hda1) is off
user qouta on / (/dev/hda1) is off

List again making sure quotas are off.

sh-2.05a# /sbin/quotacheck -avug
quotacheck: scanning /dev/hda3 [/] done
quotacheck: checked 31575 directories and 327655 files

When done, just turn things back on.

sh-2.05a# /sbin/quotaon -a
sh-2.05a# /sbin/quotaon -ap
group qouta on / (/dev/hda3) is on
user qouta on / (/dev/hda3) is on
group qouta on / (/dev/hda1) is off
user qouta on / (/dev/hda1) is off
sh-2.05a# reboot