Unix Quotas, and They'll Nix You.

By Stacey Clark and Sundeep Rao

One of the questions we get asked all the time is about quotas, and their necessity in today's day and age of ubiquitous computing.

First off, do you think that a 500MB quota is small when you can buy 300GB hard drives off the shelf for cheap?

Free BSD UnixIn server terms, 500MB is still a non-trivial amount for various reasons, some of which are:

  • Server class hard drives are still much more expensive than hard drives for your home desktop
  • Drives need to be configured in a RAID to provide redundancy and uptime, and they need to be backed up.
  • The price to back up server hard disk space can be more than the cost of the hard drives themselves, [even though our backup costs are extremely low compared to equivalent services both in academia as well as industry!]

Secondly, almost all our Unix servers are multi-user, multi-purpose machines: if any one person uses more than their share of space, either knowingly or with a runaway process, it can adversely affect tens or hundreds of others. I know a lot of people who would be a little more than annoyed if their research was halted by someone's MP3 collection or even their own runaway research calculation process.

To prevent such occurrences, we institute Unix quotas. Quotas come in two consistencies, soft and hard. When you hit your soft quota, the system starts sending you nag messages. When you hit your hard quota, all ability to write or save data stops, and data corruption can easily result. Your Windows profile will likely be rendered worthless, and will need to be redone: an arduous process.

Here's the nag message:

Your **shay** account (/export/home/c/login) has a disk quota of 10K and you are using 49121K. Failure to reduce the amount of space being used can result in losing files in your account. Please reduce the amount of space used in your account or get your limit increased. Consult your site specialist for any questions or if you need help.

Linux Key elements have been indicated in red: shay indicates the specific server in question, login indicates the account that is over quota, and the other two numbers indicate the amount that you have and how much you're actually using.

If your nag message is different, and talks about your Mailbox or your Roaming Profile, then different steps need to be taken: the Mailbox message applies to Exchange server and the Roaming Profile applies to Windows profiles (See Ralph's Roaming Profile newsletter article)

For help with these, contact your site queue.

As evidenced in the table below, there are a few things you can do to help identify and clean out large, old files These are very similar to the process we follow to help you with your quota, if and when you do report a problem.



PC How To *Nix How To
Frequently, the things that make your account hit your quota limit are large files (For example, you may not realize that a Power Point presentation file, core file, or a picture saved as a .bmp file is so large), cache or system files saved by Mozilla/Netscape/IE, or multiple old copies of your Roaming Profile.

To check for your largest files :

1. Double-click "My Computer", then your N:\ drive
2. Click View > Details
3. Click View > Explorer Bar > Search
4. Under "What do you want to search for?", click "All Files and Folders"
5. Under "What Size is it?", pick "Large (more than 1 MB)"
6. Under "More advanced options", check the boxes for "Search hidden files and folders", and "Search subfolders"
7. Click the Search button.

This will list all the files larger than 1MB. You can then sort them by size, and see if there are any files that you know you do not need any more.

Things to be aware of:

The directories Mail and mail (Upper case M and lower case m) may sometimes appear to have duplicates, don't delete items from these folders: use your email program to help you with that.

If you have large image files in BMP format, can you convert them to the smaller JPG format?

If you have items in Trash receptacles, either Recycle Bin or Email Trash, remember to empty them often.

Empty your web browser's cache by going to its internet properties and clicking on the appropriate "Empty Cache" button.

Frequently, the things that make your account hit your quota limit are large files (For example, you may not realize that a Power Point presentation file, core file, or a picture saved as a .bmp file is so large), cache or system files saved by Mozilla/Netscape/IE, or multiple old copies of your Roaming Profile.

To check for your largest files, you need to list, sort and look at your largest files:

ls -lsaR | sort -n | tail

98480 -rw------- 1 stacey other 50388992 Dec 18 2002 core
103936 -rw------- 1 stacey other 53169429 Oct 18 2000 Old_Mail
187744 -rwxr--r-- 1 stacey other 96063020 Dec 17 1999 14.wav


You can then find where those files are with the find command:

find . -name 14.wav -print
./Me/Music/CD/14.wav

14.wav is old and obsolete, so is a candidate for deletion. The period in the find command stands for "current directory".

Try it on the next file, Old.Mail:

find . -name Old_Mail -print
./Old/Oct.00/Old_Mail

This file is uncompressed, so can be squished with compress or gzip.

Core files are often really HUGE. And they are just a binary core dump, which you don't need, unless you are debugging code.

To look specifically for core files:

find . -name core\* -print
To make sure you didn't call your list of core courses "core", you can check it really is a core dump with the "file" command:

% file core
core: IRIX core dump of 'cadint'

% file core
core: ELF 32-bit MSB core file, SPARC, version 1 (SYSV), SVR4-style, from 'vi', SVR4-style

In either case, the word "core dump" or "core file" shows you it is OK to delete this core file.

If you wish to find your largest usage by directory, try the command
du -k | sort -n | tail
 



If you do get an automated system nag message about quotas (or passwords), please don't ignore it, or think of it as a chore: they exist to remind you that we take your needs (and security) seriously, and a lot of work goes in to fixing things if the nag message is ignored! Only you can decide what attitude you'll have about our nag message, and ignoring it is like ignoring a toothache because you don't want to deal with a dentist. Eventually, it's going to catch up to you.

Last modified: 2007/11/06 13:55:35.291000 US/Eastern by
Created: 2007/11/06 13:55:35.291000 US/Eastern by brian.r.brinegar.1.

Categories

Search

Type in a few keywords describing what information you are looking for in the text box below.

Admin Options: Edit this Document