Home > Help Files > Quota > General

Quotas: General


[Disk Quotas] [Checking Quotas] [Managing Diskspace] [Deleting Files] [Compressing Files] [Printing] [Reaching Hard Quota] [Questions]

Disk Quotas

Each file which you own takes up a certain amount of disk storage space. Naturally, the more files and/or the longer they are, the more disk space they take up. Since disk space is a limited resource, a maximum amount of space which each user can have, called a "quota", has been imposed to insure that all users get a fair share of the available space.

Each user has a quota, which is split amongst 2 servers. Your mail quota pertains to how much space your inbox has. Your file quota refers to how much space is in your home directory. (Your home directory is where you store all your files when using kepler or any of our client machines). The amount of quota you have is dependent on the type of account you have. All accounts except for staff and faculty have a default quota of 100MB(soft) and 150MB(hard).

The difference between hard and soft quotas is really quite simple: Your soft quota is the limit of how much space you have. Your hard quota is the absolute amount of space that you have. You cannot exceed your hard quota because that's all that there is. The hard quota is there in order to allow some room for adjustment if you go over your soft quota. Once you reach your hard quota, you will not be able to login.

If you exceed your soft quota, the system warns you, and you should take some corrective action (described below). If you do not do anything to decrease your disk usage so that you are under quota within 7 days, your account will be locked. You CANNOT exceed your hard quota. When you hit your hard quota, you've reached the final limit. There is no more space beyond that. The system will tell you that you've reached your hard quota, and you will not be able to create any more files until you get below quota. You can do so by deleting files to free up some space.

You will receive a warning when you are nearing your soft quota and a notice if you have exceeded it. Please do not overlook these warnings. You should decrease the amount of disk space your are using by deletings some files. If you do not, you will not be able to access your account. If you are over your mail quota, you must delete some mail within 7 days of receiving the warning or else your account will be locked.

Some programs will complain if they are unable to create a file due to an exceeded soft quota, but after you have exceeded your soft quota three times, you should watch how much you are using very closely; the system won't remind you any more.

Checking Your Quota

If you currently use little disk space, this probably won't mean very much to you. However, many users currently have more in their home directories than they have soft quota, and that means they will to do something about it.

If you don't know how much space you are using, here is a simple way to find out: SSH into kepler and use the "quota" command to find out how much how much space you have taken up. An example of this command and its output might be:

user@kepler ~ [3:29pm]> quota
Disk quotas for user (uid 2295):
    Filesystem  blocks    quota   limit  grace  (files   quota   limit  grace)
maxwell:/home3   72860*   70000  150000  4days      24	     0	     0
   file:/home3    2364   100000  150000             97       0       0
	                                                (ignore these figures)
maxwell = mail server quota                                   
file = file server quota (your home directory)
blocks = amount of disk space currently in use
quota = soft quota (an asterisk (*) means you are over quota)
limit = hard quota
grace = days remaining to delete files and get below quota
Figures are in kilobytes (kb).
"User" is currently over his mail quota but is below his file quota. This means that he has been saving his emails, allowing them to build up and take up disk space. He should have already received an email warning him that he was CLOSE to it. He is now over quota and needs to delete some emails to get back under quota. His file quota (the amount of space alloted for his home directory) is well under quota.

Managing diskspace

If you can't figure out where the diskspace is being used, here are some notes:

  • Don't forget the quota for maxwell refers to how much space you have for your email account (ie. your inbox). Keep current on your mail, and delete messages you're done with.
  • Directories and files with "." at the beginning of the name, like ".login" are "invisible" to you when you type "ls" Type "ls -la" to see all of the invisible files in your directory, and their sizes. Often times the culprint is ".netscape" which often contains more than 1MB of cache files. You should set your cache in Netscape to 0KB. To how much disk space all of the files and directories in your home directory are using, type "du". To delete a diretory (like .netscape) and all of its contents, type "rm -rf .netscape" **Be careful with this command** You could lose a lot of work if you aren't careful. For more information on "du" and "rm", type "man du" or "man rm".

Deleting Files

If it turns out that you indeed are over your quota, you will have to take some measures to reduce your disk usage. Of course, you should certainly go through all your directories and delete any unnecessary files with the "rm" command. This can be accomplished with
         % rm filename
to remove the file "filename". Do not type in % when executing the command, we are only using it to represent the prompt. If you wish to remove a directory full of files (make sure you definitely want to remove that directory), type
	 % rm -rf directoryname
If you aren't sure what files are taking up so much space, try typing the following:
	 % cd 
	 % du -s * .??* | sort -n
That will send you to your home directory, then give you a summary, in sorted order, of what files are using the most space. Note that your home directory is on the file server, so it is the same for all the client machines. (ie. you don't have a 100MB quota for each machine, but for your home directory in general). However, you may have some files which you need to keep, but don't refer to very often. If this is the case, several other commands come in handy.

Compressing Files

There are two programs, "gzip" and "gunzip", which compress and uncompress files. Although any file can be compress and uncompress, compression it is most efficient on text files, and will reduce the file size by approximately 50%. To compress a file, type
         % gzip -9 filename
which will result in a "filename.gz", which contains the compressed version of the file. The old version will be gone. To restore a file which has been compressed, simply type
         % gunzip filename.gz
which will result in "filename" being restored in its original form, with the "filename.gz" file being deleted.

If you wish to only see the contents of a compressed text file, but not actually uncompress the file, you can type

         % gzcat filename.gz
which will display the uncompressed contents of the file on the standard output (the screen), but will not actually uncompress any files.

Finally, if you want to compress an entire directory, without having to do each file individually (sort of like DOS PKZIP and PKUNZIP), you want to first turn the directory into one file. So let's say the directory is called "files"

	% tar cpf files.tar files
Will turn the directory "files" into a file called "files.tar" You should then compress that tar file:
	% gzip files.tar
Now, if that all worked all right, you can remove the original directory with rm -rf. To recover the directory "files" from the archive "files.tar.gz", do:
	% gunzip files.tar.gz
	% tar xpf files.tar

Printing

Of course, an alternative to compressing files that you need for reference is to simply send them to the line printer. This can be accomplished by
         % lpr filename
which will send the output to the black-and-white laser printer in 1111 Etcheverry hall.

Reaching Hard Quota

Should this happen, you MUST take some of the corrective action as described above. Once you have reduced your storage demands down to a more acceptable level (i.e., less than 1200KB), you should be able to create files again.

Questions

If you have any questions about quotas which are not explained here, please mail to consult@newton.berkeley.edu for answers.

See Also

You might also want to peruse the manual entry on quotas. To see this, type
	% man quota

 


Comments to consult@newton.berkeley.edu
© 1998-2009 UC Regents