UC San Diego SearchMenu

Quotas - Limits on Email and File Storage

What are quotas?

Quotas are limits on individuals' file storage, designed to make sure that resources remain available to everyone. Each place that can store files has a separate size limit. This means, for example, if you have too many files in your My Documents folder on a lab computer, you will still be able to receive email.

Locations where you can store files

Email Inbox on your Mail Server: When someone sends an email to you, this is where it is stored until you delete it off the server or save it to your home directory.
Home Directory on your Mail Server: This is a general-purpose area, for personal and class use. Some classes will temporarily increase your available home directory space. Files stored here include:
  • Your personal webpage
  • Files stored via the "Class Resources" folders on ACMS lab computers. All files saved to the same server count against the same quota, regardless of which 'class resource' folder they are saved to.

To delete excess files, use Webdav to connect.

 
 
Windows Profile: On Windows computers, program settings are saved here. Also, any files on the Windows desktop - not advised - are saved here.
Lab Computer Storage Space: Any files saved on a Mac, and files saved to the 'My Documents' on a Windows computer - the preferred location - are saved here.

To delete excess files, use Webdav to connect.

How Do I Know If I Am Over Quota?

UNIX Quota Problems

"Disk quota exceeded" warning

Some filesystems support "soft" quotas. When you go over the soft quota, you are given a warning, but the operation still finishes writing okay. Check quotas and remove files to make sure you reduce usage to below the soft quota. If your usage remains above the soft quota for too long, the grace period timelimit will expire and your account will not be able to store files properly. You may even lose previously saved data.

If you submit a large print job you may see the "disk quota exceeded" warning for "/var" due to the fact that a temporary copy of the file is created on /var. The temporary copy will be removed automatically by the time the print job completes.

WRITE FAILED error

This is a serious situation. WRITE FAILED means the file was not written out completely. You to need to Check quotas and remove files immediately. If you receive this message when in the VI editor, you could even lose your previously saved work! See VI quota emergency for how to avoid this.

Sun workstation login fails with red screen

The Sun workstation "red screen" over quota notice means that you do not have sufficient free space to start a normal desktop session. You can start a stripped-down Failsafe session by selecting Options > Session > Failsafe Session from the login screen. Then Check quotas and remove files.

Fixing Quota Problems

Check quotas and remove files in UNIX

To check quotas for your incoming mailbox area see section on Mailbox size limits above. The instructions below pertain to dealing with quotas in your home directory area.

Login to Unix

Use a program such as SSH to login to your account to run Unix commands.

Run the quota command -- How to read the report

Enter the "quota" command at the Unix prompt, in this example "%".

   % quota -v
       

The output will look something like this:

   Disk quotas for jsmith (uid 19859):
        Filesystem     usage  quota  limit    timeleft  files  quota  limit    timeleft
        /var              26   5000  20000                  4    300    500
        /var/mail          1  50000  55000                  6     30     50
        /var/mail/jsmith (mail inbox)
                           0  25600  35840                  1      1      1
        /home/solaris
                           17164  70000  70000                923  16000  16000
       

This example shows jsmith's mailbox (inbox) is empty, usage=0. The mailbox has a soft quota of 25600 kilobytes or 25MB, and that the hard limit is 35840 kilobytes, 35MB.

This example shows that jsmith is using 17164 KB in its home directory area on the /home/solaris filesystem. If in doubt, you can find out which filesystem your home directory is on by logging in and entering the "pwd" command. Example:

   % pwd
        /home/solaris/oce24/jsmith
       

On /home/solaris jsmith has a quota of 70000KB and a limit of 70000KB. The fact that the quota and the limit are the same means that this filesystem does not support the "soft" quota feature that gives you warnings before you actually hit the hard limit.

Finding and removing expendable files

Use the "du -k" command to obtain a report of the number of kilobytes used in each directory of your account

        % du -k
       

The du command reports on sub-directories first and then on upper directories, like this

   8       ./.mozilla/jsmith/2jo9meso.slt/Mail/pop
        16      ./.mozilla/jsmith/2jo9meso.slt/Mail
        8       ./.mozilla/jsmith/2jo9meso.slt/News
        24      ./.mozilla/jsmith/2jo9meso.slt/chrome
        5560    ./.mozilla/jsmith/2jo9meso.slt/Cache
        6576    ./.mozilla/jsmith/2jo9meso.slt
        6584    ./.mozilla/jsmith
        6600    ./.mozilla
       

This example shows 5560KB in ./.mozilla/jsmith/2jo9meso.slt/Cache and that accounts for most of the 6600KB usage under ./.mozilla

If the quota command and du do not seem to agree, there are various possible explanations.

  • If you omit the -k option, du reports in 512 character blocks instead of kilobytes. Use the -k option to obtain a report in kilobytes, "du -k".
  • You may have files on the same filesystem, but outside your home directory tree. For example, in an OCE class storage directory.
  • You may have files on the same filesystem but which are only visible from another ACMS computer domain. For example, OCE accounts issued to JSOE division majors are set up on the ieng9 server and the iacs5 server. In the ieng9 domain, /home/solaris files are visible, and in the iacs5 domain, /home/hpux files are visible. The combined usage in both domains is what the quota command reports.
  • On rare occasions, a new account may accidentally inherit ownership of files that previously belonged to an account that was recently deleted. If you see a discrepancy that is not explained by any of the situations described above, please contact the Accounts Office.

Use Unix commands for working with directories and files to navigate directories and delete any large expendable files. Prime candidates for removal are:

  • "core" files. These huge program dumps are useless to most people.
  • Files in Cache directories
  • Compiled programs and .o files that you can recompile later if needed.
  • .dt/Trash files. They accumulate unless select "Empty Trash" from wastebasket window.
How to survive WRITE FAILED when in VI editor

If you are in the VI editor and you receive a DISK LIMIT REACHED - WRITE FAILED error message you need to proceed very carefully. Most likely your initial attempt to write the file will have truncated its previous contents, so aborting the editor without correctly writing the file will not only lose the recent changes, but possibly much, or even all, of the earlier contents. There are various strategies described below.

If you are familiar with shell job control commands you can suspend the VI session, remove files to make space, resume the VI session and save your work.

From within VI you can issue commands to remove files. This technique does require that you know the name of an expendable file to remove.

   :!rm filename
       

The above command will remove the named file from whatever directory you are in. (You can actually enter any Unix command from within vi with the :! command, including :!ls to list files). If you free enough space so that you can use the write command ( :w ) without getting the "...WRITE FAILED" message then it is safe to leave VI.

If all else fails try the preserve command from within VI.

   :pre

This will save your work in progress to an editor recovery file. The recovery file may be retrieved at a later time with the "recover" command after the quota situation has been rectified.