Limits on disk usage

QUOTA: for most users the disk quota for your home directory is 250MB, with a hard quota set at 500MB
and a grace period of 14 days.

But there are many gigabytes of disk space available for your use,
in /scratch.

1. What's the problem?
2. How to use /scratch
3. * /scratch policy *
4. How to write to CD
        (note on CD longevity)
5. dealing with quotas
6. definitions, commands

1. What's the problem?

On your own computer you rarely have to worry about disk space. You won't fill, say, 40GB of hard disk memory quickly or without plenty of advance warning.

On the Newton Lab computers, the hard disk space for folks' home directories could become filled to capacity ANY DAY! All it takes is one person generating a gigantic file in the wrong place. On multiple occasions in 2003, individuals generated multiple AVI files of 350MB or more within days, and one mistakenly generated a 15GB file in 6 hours flat!! (This has been made impossible in home directories by the imposition of home disk quotas.)

On Unix computers you can see the current disk usage using the command df -k. Try it, and note that regardless of which Newton Lab workstation you use, home directories for students & faculty are all actually located on the server babbage. Babbage "serves" your files to whatever workstation you happen to be working on, but the files saved in your home directory are physically stored on the hard disk on the host babbage. Other folks' ``home'' files are stored on the same disk.

Without a quota system in place, babbage's home directory space occasionally became totally filled, and when this happened, nobody could write anything new into our home directories until some files were deleted to recover some of the disk space. Additionally, our tape backup system (which tries to back up all home directories every night) has been stretched to and beyond its capacity in late 2003. That's not good! Since disk limits were imposed, there will be no more nights that the tape backup fails due to lack of space.


On the other hand, each workstation has multiple gigabytes of its own disk space.

2. How to use /scratch

A. On any of the Dell workstations you can use any of TWELVE scratch directories providing about 25GB each. You don't need to use scp or ssh; you can change directly to any of the scratch directories which are automounted from the other Dells, e.g., /scratch/cooley, /scratch/tukey, etc. B. On any of the Sun workstations you can use /scratch, which is a purely local scratch directory. Thus cantor's /scratch directory is distinct from simpson's, and you must remember on which host you used scratch space.

For example, suppose Jane Doe (jdoe@newton) wants to run her Matlab script which generates three 330MB AVI files. If she is on the workstation simpson, she should first make sure there is enough space available in /scratch. If so, she should create her own subdirectory /scratch/jdoe, then copy the Matlab script to that directory, then run it in the background so she can log off while the computer slaves away:

simpson>  df -k                       (check disk usage, kB)
simpson>  cd /scratch                 (change directory...)
simpson>  mkdir jdoe                  (make personal subdirectory)
simpson>  cd /scratch/jdoe
simpson>  cp ~/myscript.m ./          (copy file from home)
simpson>  matlabbg myscript out.txt   (run Matlab script)
simpson>  exit                        (log off)
Tomorrow, when Jane logs on to workstation boussinesq, she can ssh to simpson to see the Matlab results in /scratch.  

On the other hand, on a Dell (say cooley) Jane has her choice of a dozen /scratch directories. She could choose the tukey scratch space, and use it like this:

cooley>  cd /scratch/tukey           (change directory...)
cooley>  df -k                       (check disk usage, kB)
cooley>  mkdir jdoe                  (make personal subdirectory)
cooley>  cd /scratch/tukey/jdoe
cooley>  cp ~/myscript.m ./          (copy file from home)
cooley>  matlabbg myscript out.txt   (run Matlab script)
cooley>  exit                        (log off)
The contents of that directory, /scratch/tukey/jdoe, are accessible from any of the Dells in the lab!

Any files in /scratch may be deleted when they are over 90 days old. Files that are very important should be burned onto a CD. The user can also touch a file to update its timestamp and give it another 90 days to live. If a file in /scratch is ignored and forgotten, then after 90 days it will just go away.

3. /scratch Disk Policy

In each workstation's /scratch directory should be an up-to-date file named "README" (or "SCRATCH_POLICY") to remind users of policy and limitations. Most notably; files in the /scratch directory are never backed up on tape (that's the definition of /scratch !), and files older than 3 months will be deleted automatically.

Thus this directory does not add to the nightly backup load, and its files have a short (3-mo.) life-span so that /scratch will not fill up the same way /home does. What about important files that you don't want deleted? Smaller files should be kept in your home directory; they aren't causing any disk-space crisis. Larger files should be copied onto CD, so that you have a convenient backup copy, good for portability and for restoring deleted files. A single CD can hold up to 650MB of files, and a DVD can hold 4.7GB. Some files can be compressed or converted to different format to make a much smaller file which you can then move to your home directory.

4. How to write to a CD

In the Newton Lab there are computers which can write ("burn") a CD. Maclaurin, the Macintosh in the NW corner of the lab, can burn files to a CD, and also erase CD-RW disks to be re-written. Just drag files onto the CD icon (or window), and when ready, select ``Burn Disc'' from the File menu.

The Dell Linux workstations in the lab can also write CDs; just insert a blank CD and a handy window pops up into which you can copy files, then select ``Write CD''. To erase a CDRW try the command "EraseMyCDRW".

You can get a blank CDs, either CD-R or CD-RW, from the sysadmin in ECOT 215. (Inquire about DVD-R if you need that instead.) CD-R are best for permanent backups; CD-RW for backups that you may want to update later.

Final note: for the good of the APPM computing community, and for your own sake (e.g., save time finding files), delete files that you know you will never need again.


5. Dealing with Quotas

To see your quotas and current usage, type the command "quota" (On Suns, "quota -v").

IF YOU ARE OVER HARD QUOTA (or have exceeded your grace period) you will not be able to log in at a workstation console. This is because logging in requires some minor writing to files, which is now forbidden to you. From a Dell workstation you can choose a ``Failsafe Session'' before entering your name/password; or, you can ssh to any workstation from some outside system.

When logged in, remove (delete or move to /scratch) enough files to satisfy your quota. Then you will be able to log in again. Learn the useful commands listed below.


Definitions:

hard quota -- the absolute limit of how much the system will allow you to write to your home directory. If you (or your program) try to write to a file in excess of the hard limit, the process will fail with the message ``write failed, user block limit reached''.

soft quota -- the limit of how much disk space you are allowed to use in /home; however, you can exceed this amount temporarily (for the grace period).

grace period -- if you exceed your soft quota, you have 14 days to trim back your files (delete them, or move them to /scratch) before your account is frozen.

Useful commands to type:

quota shows your quotas and current usage (On Suns, quota -v)

du -- the Unix command which shows the size of your directories.
Most useful when sorted numerically, so you see the biggest directories listed last, e.g.,

	cd ; du --block-size=kB | sort -n    (Linux)
	cd ; du -k | sort -n                 (Solaris)

biggestfiles -- a script which will find and list your largest files. If you can delete or move these, you quickly fit quota again. Just type biggestfiles or biggestfiles here.