Solved

User fail on disk quota when creating a file?

Posted on 2002-03-24
13
422 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

 

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

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

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

It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

623 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