25

I am using Debian Squeeze. Suddenly I have started facing a problem that my user is not able to make directories and other such tasks. Running mkdir abc gives me

mkdir: cannot create directory 'abc': Disk quota exceeded

My hard disk is not full df -h results are

Filesystem            Size  Used Avail Use% Mounted on
/dev/md1              1.8T   39G  1.8T   3% /
tmpfs                 7.8G     0  7.8G   0% /lib/init/rw
udev                  7.8G  148K  7.8G   1% /dev
tmpfs                 7.8G     0  7.8G   0% /dev/shm
/dev/md0              243M   31M  200M  14% /boot

uname -a output that might be needed is

Linux server 2.6.32-5-686-bigmem #1 SMP Sun Sep 23 10:27:25 UTC 2012 i686 GNU/Linux

Note: If I login as root then everything is fine. This problem is only with a particular user

Edit: output of quota

Disk quotas for user user (uid 1000): none

output of quota -g

Disk quotas for group user (gid 1000): 

Filesystem  blocks   quota   limit   grace   files   quota   limit   grace
/dev/disk/by-uuid/26fa7362-fbbf-4a9e-af4d-da6c2744263c
8971324* 1048576 1048576    none   43784       0       0  
Gursimran
  • 363
  • What about quota -g (group quota)? Do you have quotas at all on that filesystem? Does running quotacheck help? – Gilles 'SO- stop being evil' Mar 14 '13 at 23:29
  • output of quota -g added above. I dont know about quotas in my file system. All I know is that I have set unlimited in quota option in webmin for two of the users I am running on my debian. Suddenly this user has started giving me quota problem without any change made by me. Regarding quotacheck it is not working, giving me -sh: quotacheck: not found – Gursimran Mar 15 '13 at 11:47
  • How to recalculate quota -> http://labs.erweb.it/pub/recalculate_quotas.php – MUY Belgium Apr 15 '15 at 15:29

4 Answers4

18

The problem in my case was I had exceeded the number of inodes (file entries) supported by the file system. The command

df -i

revealed the problem in my VM:

Filesystem      Inodes   IUsed IFree IUse% Mounted on
/dev/vzfs      1500000 1500000     0  100% /

Deleting some unnecessary small files or increasing the amount of inodes (more complicated) resolves the issue. A command like this can help locate which directories have a lot of files in them (in this case searching underneath /var):

find /var -type d -size +256k
markus
  • 281
14

The disk isn't full, but the disk space allowed for this user is full. You need to check quota(1), perhaps persuade the suspect to clean up their junk, or in an outburst of kindness increase it with edquota(8).

vonbrand
  • 18,253
1

I don't use Debian Squeeze, but I had a similar problem and maybe this could help someone else. My user account is for a student, so it's significantly lower than if I was running Linux from my home computer, but still... In a program I was running, I had output get written to a file. I ran into an infinite loop and had to cntrl-C from the program to cancel it. After this happened, I continued to get the error that my quota was full and couldn't save anything. Solution: Delete the output file my loop was writing to. After deleting this and fixing my loop my quota was freed back up again.

1

du -sch .[!.]* * |sort -h

use this command in the home directory(e.g. /usr2) to check which hidden folders are taking up space.

You can also check if there are package cache. It can be safely removed

zeitgeist
  • 111
  • Why don't you just use du on the /usr2 directory directly instead of bothering with a complicated globbing pattern (that you don't explain the need for)? – Kusalananda Oct 07 '21 at 13:40
  • This might be helpful https://unix.stackexchange.com/a/356280/458332 – zeitgeist Oct 08 '21 at 10:14