LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-09-2008, 08:31 PM   #1
wegadnie
Member
 
Registered: Oct 2007
Posts: 48

Rep: Reputation: 15
Exclamation Problem with quota for users.


I've search in the forum but it looks like nobody has the same problem like me. Here is the strange thing:
When i run the repquota command it shows that users is using exceed quota:

user1 +- 1212M 196M 245M none 1614 0 0

It says he is using over of his 250MB hard quota. He is not, only 64KB.

[root@unix user1]# du -kh
64K

I have tried removing all data from his home folder space and putting it back again. It seems as though there is an invisible file there eating away at his space or is there something else. So any body can help me?
 
Old 12-09-2008, 09:47 PM   #2
eggixyz
Member
 
Registered: Apr 2008
Posts: 310

Rep: Reputation: 30
Hey There,

Here's a few things, maybe, that could be the issue (just based on past experience; hopefully applicable

1. Check du -sh or du -sk on the home dir from outside: du -sk /home/userdir
2. If /home/userdir is mode 700 (drwx------), try changing it to 755 (chmod 755) and see if the problem doesn't go away
3. This is a stretch, but I've seen du/df and similar utilites go past their limit, where the come back around as either negative numbers or impossibly high numbers.

I've never had the issue with repquota like you have, but if any of those solutions work, you may need to patch some utilities or (if the mess is the result of a usage-overload) do a simple reboot. I'm not sure what you've tried so far other than du -kh (which I've never even thought to use before - I either do -k or -h, never thought to make the kb output human readable. Brilliant... on your part. I feel like a doof since I've been exposed to both flags since I can't remember how long

Best wishes,

Mike
 
Old 12-10-2008, 12:32 AM   #3
wegadnie
Member
 
Registered: Oct 2007
Posts: 48

Original Poster
Rep: Reputation: 15
I've checked on these folders and they are all in 755 and because this server also run MySQL service, Apache so i have already checked on /var/lib/mysql but still can not find any glue. Do you have any idea?
 
Old 12-10-2008, 09:36 PM   #4
eggixyz
Member
 
Registered: Apr 2008
Posts: 310

Rep: Reputation: 30
Hey again,

Unfortunately, I only have guesses But this piques my curiousity:

user1 +- 1212M 196M 245M none 1614 0 0

Under my version's output 1212M would be the space used / 196M would be the soft limit / 245M would be the hard limit

So the +- should actually be ++ since the used space is greater than the soft and hard limits.

none should be the grace period,

then the last 3 columns (where I think you might find the root cause of the problem from) are the limits on number of files

again soft / hard / grace period.

If my format agrees with yours, can you try and do a :

find /home/user1 (be sure to do it at the level above the directory - so not find /home/user/* or from within /home/user)

I'm wondering what it reports for the amount of files (really 1614 or different? maybe a whole lot more). If you have lsof, also, you can check the amount of open files that either belong to the user or are reported as open in that directory. That could produce a condition where your system reports all of the used space, but du disagrees.

This link is actually from my own blog, but check it out if you want. Basically, df and a lot of system utilities grossly misrepresent how much disk space is actually being used, while du is generally the more accurate (although, at times, much slower) utility.

http://linuxshellaccount.blogspot.co...nt-values.html

If that's the issue, you may need to reboot. If lsof finds the files, you shoudld be able to find the pids for the "ghost" processes that are faking (I mean taking up space!

If none of that puts you on to the answer can you send me the headers for your output and your OS version. That way, if you still have the issue, I'll be looking for an answer as specific as possible to your situation.

Again, best wishes,

Mike

Last edited by eggixyz; 12-10-2008 at 09:37 PM. Reason: typo
 
Old 12-11-2008, 03:03 AM   #5
wegadnie
Member
 
Registered: Oct 2007
Posts: 48

Original Poster
Rep: Reputation: 15
Thanks for your time to answer my problem. I've tried to do what you said but it doesn't work. For easier to find the problem i back up all user1's files then delete all his files on the server but it still gives me warning about quota exceed. I also try df & du commands and both of them report disc space about the same. My box runs on RedHat Enterprise EL 4. What can i do next?

Last edited by wegadnie; 12-11-2008 at 03:05 AM.
 
Old 12-11-2008, 10:38 PM   #6
eggixyz
Member
 
Registered: Apr 2008
Posts: 310

Rep: Reputation: 30
Hey Again,

Did you try the reboot?

Short of that, do what you did this last time, but try two different experiments. They might help:

Back up all of his files. Completely delete his home directory and then recreate it and restore. Is everything still bad?

Back up all of his files. Make a new temporary user and directory (if possible, make the new user's home directory on a different partition than the one his is on right now) and copy all of his stuff into there. Does the problem still exist?

Keep coming back with what you tried and I'll keep trying to figure out why in the world this is happening. Most certainly strange

Best wishes,

Mike
 
Old 12-12-2008, 03:11 AM   #7
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Does the user own files outside his home directory?
Code:
find /home -user user1
assumed the quota is applied to the /home partition.
 
Old 12-12-2008, 10:35 PM   #8
eggixyz
Member
 
Registered: Apr 2008
Posts: 310

Rep: Reputation: 30
Colucix,

Brilliant suggestion. And so much sense I can't believe I didn't think of it. I have a tendency to overcomplicate things, I suppose.

I'm betting that's it. Good show

, Mike
 
Old 12-23-2008, 10:59 PM   #9
wegadnie
Member
 
Registered: Oct 2007
Posts: 48

Original Poster
Rep: Reputation: 15
On this box, I set up MySQL service for website but i put it in different partition and i also check the database. I will try eggixyz's colution and report back and hope it will work. I intend to restart this box and force it to check disk space but not sure about the command. Any one have a suggestion for me?
 
Old 12-24-2008, 01:23 AM   #10
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Be sure to check for temporary files in /tmp. For example, ~/.kde may have links to the directory /tmp/kde-<username>. Also check /var/cache and /var/tmp as well. The user may have a large number of emails in /var/cache. If /home isn't on it's own filesystem, then these would count against the quota. An incoming email may be very large and not the users fault. If the user is running the beagle daemon, 1.2G could be used up very quickly.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Disk Quota -- restricrting users as well as stopping Denial of Service Attacks tataiermail LinuxAnswers Discussion 0 07-10-2007 01:40 PM
mail quota-exceeded users Ammad Linux - Software 1 12-09-2006 03:26 PM
Displaying users email quota in SM? panicbox Linux - Software 3 01-19-2006 12:34 AM
User quota whith non local users jnsc Linux - General 1 11-29-2002 01:03 PM
quota for email of users monin Linux - Newbie 4 05-18-2002 02:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration