Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

User fail on disk quota when creating a file?

Posted on 2002-03-24
13
Medium Priority
?
424 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

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
 
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 200 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will explain how to establish a SSH connection to Ubuntu through the firewall and using a different port other then 22. I have set up a Ubuntu virtual machine in Virtualbox and I am running a Windows 7 workstation. From the Ubuntu vi…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses
Course of the Month11 days, 2 hours left to enroll

885 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