# How to diagnose a disk quota problem

If you suddenly are finding that multiple things that usually work on your ACMS account are not working, e.g. IDLE locks up, web browser locks up, can’t open new windows, commands fail with strange error messages, etc., it may be a sign that you are over disk quota.

You can see whether disk quota is the problem by typing quota -vs at the Unix prompt.  That looks like this:

[spis15t7@ieng6-240]:~:501$quota -vs Disk quotas for user spis15t7 (uid 4091): Filesystem blocks quota limit grace files quota limit grace acsnfs4:/vol/home/linux/ieng6 57328 196M 196M 3214 4000 4000 [spis15t7@ieng6-240]:~:502$

• The number 196M in the output above indicates that your quota and your limit in terms of how much disk space you are allowed to consume on your ACMS account is 196 MB (Megabytes).

• The number 57328 in the output above indicates that you are using 57328 blocks of your quota. That’s fine (a block is usually either 0.5KB or 1KB, and there are 1024KB in a MB.)  So this output indicates a “good” situation.

Here’s what you DON’T want to see:

[spis15t7@ieng6-240]:~:501$quota -vs Disk quotas for user spis15t7 (uid 4091): Filesystem blocks quota limit grace files quota limit grace acsnfs4:/vol/home/linux/ieng6 196M 196M 196M 3214 4000 4000 [spis15t7@ieng6-240]:~:502$


That’s an example of a problem.  The usage and the quota are the same, meaning that you’ve used up all of your available disk quota.   If you try to write to any additional file, you’ll end up having trouble.   </div>

# Do you have a “disk space” problem, or a “number of files” problem?

The number 3214 in the output above is the “number of files”.

In this example, it is below the quota of 4000, so all is well.

BUT, if it were above the 4000, we’d have a “too many files” problem.   Those are investigated in different ways.  Read on!

# What is causing this “disk quota” or “number of files quota” being exceeded?

The thing is, it’s unlikely that you filled up your disk with ordinary Python files.  The problem is more likely some kind of bug either in the system software, or in one of your own programs, that is making REALLY big files somewhere unexpected.  You need to find where the problem is before you can fix it.

# How to solve a disk quota problem

TEMPORARY VERSION OF INSTRUCTIONS:

TODO: Make these nicer.

1) Finding the problem
cd                        (goes to home directory)
du –sh *          (check regular folders)
du –sh .[A-z]*            (check hidden folders)
2) Probably:
If its huge (i.e. >50MB) use echo rm –rf ~/.config/google-chromethen
up-arrow,
and erase “echo”, then return again</div>

### How to solve a too many files problem

Unlike “disk space”, there isn’t a nice handy utility built into unix to count the number of files you have.  Fortunately, one of my colleagues at UC Santa Barbara, wrote such a utility, and has put it up on his public github repo here: https://github.com/rkip/countfiles

I’ve put that in my own directory on ACMS for SPIS 15, so you can run it with this command:

~spis16t3/bin/countfiles</div>

If you run that, it will show you which directory has lots of files under it.  You can cd into that directory, and repeat the command.  Eventually you may find something you can delete to reduce your file count below your quota.</div>