Difference between revisions of "Disk Quotas"

(→‎How to Check Your Quota: Better flow for the ugrad lab machine link.)
(→‎How to Get Yourself Under Quota: Start with a different way of using `du`.)
Line 28: Line 28:
 
If you're over quota, the only way to get back under is to delete or shrink files until your total disk usage is reduced below your limit.
 
If you're over quota, the only way to get back under is to delete or shrink files until your total disk usage is reduced below your limit.
  
You can use the <tt>du</tt> command line program to see how much space individual files or directories are using.  From your home directory, this will show you the disk space usage of all of your files and directories, sorted with the largest ones last:
+
You can use the <tt>du</tt> command line program to see how much space individual files or directories are using.  One of the simplest ways to invoke it is to run the following command from your home directory:
  
  du -sh * .??* | sort -h
+
  du -h | sort -h
  
This can help you find the files or directories that are using the most space.
+
This will show you every directory in your home directory (and every subdirectory of them and every subdirectory of those and so on) and how much space it and all of its contents occupies, with the largest directories shown last.  The directories containing the most data are probably the best candidates to start cleaning out.
  
If you see a file listed that is large, and you want to remove it, but you do not know the path to it, you can use the <tt>find</tt> command, replacing ''filename'' with the filename you're interested in locating.
+
Another useful command is the following:
  
From your home directory:
+
du -sh * .??* | sort -h
  
  find . -name filename -print
+
This lists all of the files and directories in the current directory and their sizes. (The previous command shows all directories, not just the ones directly in the current directory, and it doesn't list files directly; they simply get added to the size tally for the directory they're in.)
  
 
== If You Need a Larger Quota ==
 
== If You Need a Larger Quota ==
  
 
If your class projects or research require more disk space than your quota will allow, please contact [mailto:support@cs.jhu.edu support@cs.jhu.edu] and detail the reasons your current quota is insufficient.  ''Quota increases are not guaranteed.''
 
If your class projects or research require more disk space than your quota will allow, please contact [mailto:support@cs.jhu.edu support@cs.jhu.edu] and detail the reasons your current quota is insufficient.  ''Quota increases are not guaranteed.''

Revision as of 13:24, 19 May 2015

On the CS Ugrad Net, the Ugrad accounts may be subject to disk quotas, which are limits on the total amount of data you are permitted to store in your home directory (or, in some cases, other directories). If you exceed a quota, you will be unable to create new files or add to existing files until you reduce the total mount of disk space you're using to go below your quota.

How Quotas Work

Every account that is subject to a quota has a soft limit and a hard limit. For most of our CS Ugrad accounts, those are 4 GiB and 4.5 GiB, respectively. You cannot use more disk space than is given by your hard limit; once you hit that limit, all attempts to allocate more space (creating new files, making existing files larger, etc.) will fail.

If you exceed your soft limit, you will have a grace period of a week. During that period of time you may continue to create files and add to existing files as normal (as long as you don't hit your hard limit). If you remain above your soft limit for a full week, the soft limit begins to behave like a hard limit and you will be unable to use any additional space until you reduce your total disk usage below your soft limit.

If you cannot allocate more space (you've hit your hard limit or you've exceeded your soft limit for more than a week), you might not be able to log in via the GUI on our computer lab systems. If that happens, you will have to SSH in remotely and reduce your disk usage below your quota.

How to Check Your Quota

Log in to one of the Linux Clients on the CS Undergrad Net and run the following command from the command line:

quota

If it doesn't print anything, you are not subject to any quotas. If it does print something, the output will look like this:

Disk quotas for user account (uid 12345):
     Filesystem   space   quota   limit   grace   files   quota   limit   grace
barley.cs.jhu.edu:/home
                 993776  4000000 4500000            9687       0       0

The numbers represent 1024-byte blocks. In the above example, the person is using 993776 blocks, which translates to roughly 970 MiB of data. The quota (aka soft limit) is 4000000 blocks, or just under 4 GiB. The hard limit is 4500000 blocks, or a little under 4.5 GiB.

How to Get Yourself Under Quota

If you're over quota, the only way to get back under is to delete or shrink files until your total disk usage is reduced below your limit.

You can use the du command line program to see how much space individual files or directories are using. One of the simplest ways to invoke it is to run the following command from your home directory:

du -h | sort -h

This will show you every directory in your home directory (and every subdirectory of them and every subdirectory of those and so on) and how much space it and all of its contents occupies, with the largest directories shown last. The directories containing the most data are probably the best candidates to start cleaning out.

Another useful command is the following:

du -sh * .??* | sort -h

This lists all of the files and directories in the current directory and their sizes. (The previous command shows all directories, not just the ones directly in the current directory, and it doesn't list files directly; they simply get added to the size tally for the directory they're in.)

If You Need a Larger Quota

If your class projects or research require more disk space than your quota will allow, please contact support@cs.jhu.edu and detail the reasons your current quota is insufficient. Quota increases are not guaranteed.