McGill University School of Computer Science
McGill University School of Computer Science
Views
You are here: Quota

Quota

From Socs Info Wiki

This document provides information related to filesystem quota of computer user accounts at the School of Computer Science, of McGill University.

Contents

General

Every account is given a home directory on the filesystem to store the account owner's personal files. Filesystem disk quota, (or quota for short) is a prescribed limit to the amount of disk space that an account can use on a given filesystem. Accounts are limited to the amount of space that they can use so that disk space usage can be controlled.

What is quota

The quota is the maximum amount of disk space that the system permits a given account to use. Reaching the quota can have nasty side effects: the system will not permit any operation that requires using additional disk space; attempting to edit files my corrupt them; and logging-in may fail (this problem is discussed below). The quota takes effect as soon as it is exceeded.

Display quota (usage & limits)

A user can display her/his own filesystem disk usage and limits using the command quota. This usage is updated hourly. The command displays both usage and limits, as in the following example:

 [abatko][mimi][~] {1} quota
TYPE        NAME       USED  QUOTA
POSIX User  abatko     767M    10G

To view your immediate and actual usage please use the following example:

 [abatko][mimi][~] {1} du -sh .
768M    .

Resolving quota problems

Can't login

It is common that when attempting to login via a graphic console, the login process may momentarily display the graphical desktop environment, and then immediately be thrown back to the login prompt. This behaviour indicates that the account has approached too close to the hard quota for the windowing program to be able to write data to special files in the account's home directory - which is something that some windowing programs do as part of their operation. To resolve this problem it is necessary to login via the text console.

Switching from graphic console to text console and back

Simultaneously press Ctrl-Alt-F1 to switch from a graphic console to a text console. To switch to a graphic console from a text console simultaneously press Alt-F4. Note that the "Ctrl" key is not necessary when going from text to graphic console. If you can't find what you're looking for in either direction, there is no harm in cycling through all the function keys (F1-F12).

What files to delete when over or near quota limit

Once you're log in, regardless of whether it is via the graphic console or the text console, you will need to delete some files to return to below the soft quota limit. Commands to delete some directories and files are listed below:

  • rm -rf ~/.mozilla/*/*/Cache/*
  • rm -rf ~/.netscape/cache/*
  • rm -f ~/*core*
  • find ~ -name '*core*' -type f | xargs -i file {} | grep 'core file' | awk -F: '{print $1}' | xargs -i rm -f {}
  • rm -rf ~/.kde/share/cache/http/*

To find which files are the largest, run

du | sort -n

This will show you where the biggest files on your server space are.

If deleting these files doesn't help, you will have to contact the Help Desk for further assistance.

Quota management recommendations

Restrict your browser's cache size to a resonable limit such as 4MB. It is very likely that Mozilla's cache default is unlimited, and hence a major contributor to your quota usage (if you use Mozilla).