Solved

User fail on disk quota when creating a file?

Posted on 2002-03-24
13
415 Views
Last Modified: 2013-12-06
User fail on disk quota when creating a file,
Although this user have a lot of free quota

mysql user and group got lot of free disk space :
>/sbin/quotaoff /dev/hda4
>quota -v mysql
Disk quotas for user mysql (uid 116):
     Filesystem  blocks   quota   limit   grace   files   quota   limit   grace
      /dev/hda4   88415 1000000 2000000              87    1000    2000

>quota -g mysql
Disk quotas for group mysql (gid 116):
     Filesystem  blocks   quota   limit   grace   files   quota   limit   grace
      /dev/hda4       4  512001  512000               6    1000    2000

Only  quotaoff
>/sbin/quotaoff /dev/hda4
bypass this problem !

The linux Kernel is 2.2.14

Any idea ?
0
Comment
Question by:addady
  • 7
  • 4
  • 2
13 Comments
 
LVL 40

Expert Comment

by:jlevie
ID: 6892354
When you see the quota problem is mysql the logged on user, or is the logged on user someone else that's using the database?
0
 

Author Comment

by:addady
ID: 6892455
I'm login as root and then "su mysql",
so you can say I'm logon as user.
The point is the mysql database process fail for the
same resion.
0
 
LVL 40

Expert Comment

by:jlevie
ID: 6892525
Do you get the same failure if you log on as the mysql user? Are quota's in effect for any other file systems?

I've heard of this problem before with MySQL but since I use Postgres rather than MySQL I've never encountered it myself. I  don't know if it's actually a quota problem or a problem with MySQL in how it manipulates its data storage. My guess, right now, is that it's a problem with MySQL.
0
 

Author Comment

by:addady
ID: 6904660
>Do you get the same failure if you log on as the mysql >user?

Yes

>Are quota's in effect for any other file
>systems?

No

0
 
LVL 40

Expert Comment

by:jlevie
ID: 6905397
What Linux is this? Can I see the output of 'df -k'? And I'd like to know where the home dir of the mysql user is.

I've been assuming, from the way the question is phrased, that the problem occurs when MySQL is trying to create or mannipulate databases. Can the mysql user create a simple file, perhaps like:

mysql> cd
mysql> cp /etc/hosts .

0
 

Author Comment

by:addady
ID: 6905663
>What Linux is this?
red hat 6.0 Kernel is 2.2.14 on cobalt raq4.

>I've been assuming, from the way the question is phrased,
>that the problem occurs when MySQL is trying
>to create or mannipulate databases

You are rigth, that how is start. But It happen allso when
I login as mysql user and try to create a file

>Can I see the output of 'df -k'
now the quota is off. the problem is on /home
$ df -k
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/hda1               743466    628597    114869  85% /
/dev/hda3               198601     24611    173990  12% /var
/dev/hda4             17671528   4276710  13394818  24% /home
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 40

Expert Comment

by:jlevie
ID: 6916983
Well, since it quotas apparently worked a for a time and then started failing I'd say it's probably a software fault in the quota system. Especially since the failure occurs for the user when creating ordinary files. Ordinarily I'd suggest updating the system, but on a Cobalt you'd need to get those updates from the vendor and that service may only be available with a service contract.

Do you really need quotas enabled? The obvious work around would be to just disable quotas and manually monitor disk space for abuse.
0
 

Author Comment

by:addady
ID: 6917379
>Do you really need quotas enabled? The obvious work >around would be to just disable quotas and manually
>monitor disk space for abuse.

That what I'm doing now, but I realy need it.
Do you know any ext2 util that can repare the quota ?
0
 
LVL 40

Accepted Solution

by:
jlevie earned 100 total points
ID: 6918968
You can try using quotacheck to update quotas and repair any problems with the quota's files. Before doing that you really need to read the man page for quotacheck, and especially take note of what it says about only using that tool on an unmounted filesystem.

The best way to attempt a repair of the quota system is to boot single user. I don't think /home will be mounted at that point (check with df to be sure) and then run:

# quotacheck -u
# quotacheck -g

If booting to single user mode isn't an option you can try logging in as root and unmounting /home. This would have to be done with no other users logged on. Also if there are any processes running, like MySQL, that use or were started from /home you won't be able to unmount /home as long as those processes exist. If you can get /home unmounted, run quotacheck as above.
0
 
LVL 2

Expert Comment

by:Robert Silver
ID: 21291790
Isn't there a decent way to turn off quotas without having to reboot?
0
 
LVL 40

Expert Comment

by:jlevie
ID: 21292904
See 'man quotaoff'

The quota system can be turned on/off without a reboot. In the comment above, booting into single user mode was necessary to be able to rebuild the quota system with that file system unmounted.
0
 
LVL 2

Expert Comment

by:Robert Silver
ID: 21293310
So what command actually sets the command?  I was able to reset the quota for a  folder I think thourgh the RAQ3 admin module.  Can you please comment on what it may have done?
There must be a quota adjust command and this seemed to affect a certain  set of folders. it was rather strange it worked like this. I was expecting quotaoff to run as root and shut off all the quota services and thus not have any quota errors there after but the system appears not to let you do this. What will happen when I reboot most likely?  Will the quota system stop working if II ran quotaoff?  or will it probably just turn it back on. This is a Cobalt Raq3 server I am talking about.
0
 
LVL 40

Expert Comment

by:jlevie
ID: 21293579
I don't know what the "reset quota" action the RAQ admin module does. It might be using quotacheck or edquota in some way.

To completely disable quotas, use quotaoff to disable checking an enforcing of quotas, and then remove the quota files from the root of the file system. On the next reboot quotas on the filesystem will not start. See the man pages for quota, quotaon, edquota, etc for more information.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now