Quotas - limits on file space and number of files

Revised: June 2007.
This article is composed of the following sections:


What are quotas?

The amount of disk space (storage) allocated for a user, on a filesystem. A filesystem is an array of disks shared by users, and is available via the network (NFS).

Quota limit symptoms

Mailbox full notices
See Mailbox size limits

"Disk quota exceeded" warning
The filesystem reports that the soft quota was exceeded. The soft quota is a margin of about 2 Gigabytes which allow users to finish and save their work. They will be allowed 10 days to reduce their disk usage to under the set limit. Check quotas and remove files If the account's disk usage remains above the soft quota for more than the grace period, the filesystem will refuse to store any files and work may be lost.

WRITE FAILED error
WRITE FAILED (file was not written on the filesystem) One may need to reduce is disk usage Check quotas and remove files before being able to store the file. Or, one can save the work to ~/TEMP directory. Temporary work space. If you receive this message when in the VI editor, you could lose your previously saved work! See VI quota emergency.

Sun workstation Desktop login fails
The Desktop GUI on a Sun workstation requires disk space to write temp and log files. A failed login may means that the disk quota was exceeded. To confirm this: Start a stripped-down Failsafe session by selecting "Options"; "Session" and "Failsafe" on the login screen. Then Check quotas and remove files.

Mailbox size limits

Incoming mail and IMAP directories are stored on a separate filesystem. Therefore they are subject to a different set of quota limits.

Use ls -al /var/mail/$USER to verify the size of your INBOX. Saving INBOX messages to folders, saves the messages in the home directory. Under IMAP, messages and folders are stored on the IMAP filsesystem.

The INBOX size exceeds the quota limit.

The INBOX folder size limit is 50MB with an absolute limit of 75MB. An INBOX with over 75 MB is automatically moved into the user's HOME directory. A report of the INBOX move will be emailed.

How can my mailbox be full?

It is a common misconception that a small number of messages in your INBOX means the INBOX size is small. When you consider that a single message can be quite large, expecially with attachments, it's clear that even five messages could put the INBOX over the limit.

How to check quotas and remove files

To check INBOX e-mail quotas see section on Mailbox size limits above. The following instructions are for home directories (account) quotas.

Login to Unix

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 (disregard other home directory listings):
	Disk quotas for jsmith (uid 19859):
	Filesystem     usage  quota   limit    timeleft  files  quota  limit    timeleft
	/home/jsmith   17164  5000000 7000000            923     0       0

This example shows that jsmith is using 17164 KB in its home directory area of the filesystem. He has a soft quota of 5000000KB (5 Gigs) and an absolute limit of 7000000KB (7 Gigs).

Finding and removing expendable files

Use the "du -sk" or "du -sh" command to obtain a report of the number of kilobytes used in each directory of your account
        % du -sk * |sort -n  #sort list by size
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.

Prime candidates for removal are:

Use the following to find files in your home directory:

  • find * -name core -ls -print
  • Finds and prints the file named "core" in all subdirectories.

    How to survive WRITE FAILED when in VI editor

    If in the VI editor, and reading a "DISK LIMIT REACHED - WRITE FAILED" error message, when writing to the file. 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. Use the various strategies described below.

  • Save file in /var/tmp/filename as a backup. (System's temporary disk area)
  • ----file is stored on the local system only, saved until reboot.
  • Save file in ~/TEMP/filename. (User private temp area; no backups; no quotas)
  • ----file is stored on slow IDE drive array, 2 Terabyte unlimited storage with no backups. Once the disk usage has been reduced, and under the quota, copy the file back in your home directory.
  • Suspend the VI session, remove files to make space, resume the VI session and save your work.
  • 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.

    How to use temporary work space

    Extra disk space is available if you need it:

    We have a large (2 Terabytes) network "TEMP" disk that has no disk quota and can be used for temporary disk expansion. The "TEMP" disk is not backed up to tape, and files may deleted at the end of each term, or by age if the disk gets full. The "TEMP" disk is accessible as ~/TEMP (in your homedir) For more information see: ~/TEMP/No_Backup_in_this_Directory.readme

    Cadence Users; saving disk space

    Cadence users can save a large amount of disk space and reduce their simulation time by following the steps in this pdf file:

    Cadence Tips on Disk Usage

    Large simulation outputs should be directed to your TEMP directory.

    . . .