Koozali.org: home of the SME Server

diference between quota reported and space used on disk

Offline Stefano

  • *
  • 10,839
  • +2/-0
Re: diference between quota reported and space used on disk
« Reply #15 on: February 10, 2009, 09:13:55 PM »
Thanks for the response, Larieu, sorry for being inarticulate.

I found the UID for one of my "problem" users & you were right:
Disk quotas for user username (uid 5081):
/dev/mapper/main-root

The issue is that everyone writes to the ibays, but I only want to set quotas on home drives. Let's hope enough people ask for this modification.

AFAIK quota is per-partition

since users' home directories and ibays are in the same partition (and also under the same dir /home/ibay/files), it will not be possible.

and I am pretty sure there is a bug about it or a topic here in the forums where Charliebrady explains how quota works

Ciao
Stefano

Offline ktenbrook

  • 14
  • +0/-0
Re: diference between quota reported and space used on disk
« Reply #16 on: February 26, 2009, 03:41:59 PM »
Hello all.

I am also having this problem on my mail server.  This is pretty much a base install, no add-ons other than Backup2WS.  It has never been moved from machine to machine, etc.  No drama, no history.

I have one user who's quota report is far in excess of the actual files that belong to her on the system.

Result of "quota -v ACCOUNTNAME:

Disk quotas for user ACCOUNTNAME (uid 5044):
     Filesystem  blocks   quota   limit   grace   files   quota   limit   grace
/dev/mapper/vg_primary-lv_root
                 916944  921600 1024000            4518       0       0

This matches the report in the server manager panel

When I run the command:
find / -user 5044 > /tmp/reportfile

The resulting file contains just 2,495 files, which total to about 406 MB in size.  This is just over 1/2 the size and number of files reported by quota.  I've scanned /etc/passwd and find no weirdness on uid 5044 or ACCOUNTNAME (both occur on one, and only one line in the file):

ACCOUNTNAME:x:5044:5044:USER NAME:/home/e-smith/files/users/ACCOUNTNAME:/usr/bin/rssh

I'm stumped.  Anyone have any ideas why this is happening, or what else I can check?

This is version 7.4 btw.

Offline larieu

  • ****
  • 214
  • +0/-0
Re: diference between quota reported and space used on disk
« Reply #17 on: March 16, 2009, 06:20:28 AM »
I found another issue
I really don't know if it's a bug but is annoying
and I found a solution also

explanation:
you have an user with allocated quota 1G / 2G
he has some stuff in his places on server (mails, ftp, samba, group...)
you delete the user without prior deleting the stuff (from web server-manager)

after some time (1 minute till several month) you'll create another user which will have the same UID
the first thing you'll see - is that the user will have "by default" a quota allocated (1G / 2G) - which is unusual
then you'll see that the user will have a difference of quota
 
to solve that problem you must do the following steps

1. stop services which can dramatically change quota (smtp, imap .....) (or if you are "near" that server from local keyboard you can stop all services which you don't need for the next minutes -  this depends of your configuration)
2. quotaoff -av
3. quotacheck -augvm (be patient - cant be long time for slow computer with tons of data)
4. quotaon -a
5. start all services

hope this will help others to don't have workarounds
if everybody's life around you is better, probably yours will be better
just try to improve their life

Offline jester

  • *
  • 496
  • +1/-0
Re: diference between quota reported and space used on disk
« Reply #18 on: March 16, 2009, 07:53:31 PM »
All this sound similar to issues i have with quota, filed bug #4506 for it.

Offline ktenbrook

  • 14
  • +0/-0
Re: diference between quota reported and space used on disk
« Reply #19 on: April 07, 2009, 01:44:09 AM »
Hello all, again.

I thought I would report back as to what I did to fix my problem.  It wasn't pretty.  In the end, I just deleted my quota files altogether.  On reboot the system rebuilt the files, but I had to re-enter the quotas for all my users - one at a time.  It would have been nice if I could set a quota once and apply it to all my users.

Bottom line - the quota files were corrupt, and there is no real explanation on how they got that way.  Oh well...

Offline jester

  • *
  • 496
  • +1/-0
Re: diference between quota reported and space used on disk
« Reply #20 on: April 07, 2009, 09:05:40 AM »
This might be the reason: bug #4965