Disk space
From CsWiki
Contents |
Disk quotas
Users are allocated disk quota as follows:
| File System Type | ||||
|---|---|---|---|---|
| Account type | Group | Primary | Secondary | Tertiary |
| undergraduate | stud | 100M | 100M | 0 |
| graduate | grad | 250M | 250M | 0 |
| doctoral | phd | 2G | 2G | 0 |
| post-doctoral | pdoc | - | - | 0 |
| visting lecturer | visitor | - | - | 0 |
| faculty | staff | 10G | - | - |
| guest | guest | 150M | 150M | 0 |
| external graduate | esci | 1G | 1G | 0 |
To see how much quota you have, type nquota. Note that the data for nquota is updated once every few minutes.
Home directories
Users' home directories are located as follows:
| File System Type | Path | Shorthand | Backups |
|---|---|---|---|
| Primary | /cs/group/login | ~ | Hourly |
| Secondary | /cs/+/group/login | ~/.+ | Less frequent |
| Tertiary | /cs/++/group/login | ~/.++ | No backup! |
Note: ~ is a UNIX alias to one's home directory. ~/.+ and ~/.++ are symbolic links under ~. See ln(1).
Backups
The files in your home directory are backed up several times a day. The backups are available in the special .snapshot directory and can be accessed using the snapshot utility or directly (e.g. "cd .snapshot"). Note that the .snapshot doesn't show up when searching a directory (i.e. "ls -a" won't show it), but it exists and can be "cd"-ed into.
Disk space shortage
Logging in without quota
If there is insufficient disk space, some window managers might not start at all (e.g. xfce4, or KDE). When this happens you'll receive some message of insufficient quota, or an error message saying the Xsession has terminated too quickly. In this case, to be able to login and clean up your quota, you'll have to login using xterm.
There are 2 ways to login in xterm:
- When the chooser appears, choose XTerm instead of the normal window manager you use.
- Before logging in (i.e. entering the username and password), click on the Session button, and choose Failsafe Terminal
After you've logged in, you'll get a simple xterm window. There you can start cleaning up your quota as described in the following sections. When finished, simply type exit, and re-login again.
Note: Without a window manager, to write commands to the xterm window, you'll have to place the mouse courser on that window.
Basic cleanup
Some basic utilities to manage disk space:
- Are you using the secondary storage area (the ~/.+)?
If not there's more space there you can use. Note that the backup is less often, so it is not advisable to use it on active projects. - Use the cleanup script to remove files that can be safely deleted.
- Use du to find how space is distributed within your home directory:
du ~ | sort -n
Note that this will also show you the space taken by files beginning with '.' which do not normally show in directory listings.
A more elaborate usage of the du utility is:\ls -A1 | sed "s#'#\\\'#" | sed 's/ /\\ /g' | xargs du -sckx -- | sort -n
Which will calculate the sum of each directory (in the current directory). New students have an alias for this as dua.
This section only applies for those using a local program for reading mail (e.g. thunderbird, kmail, etc.), if you are using a web browser to read the mail (e.g. the mail.huji mail account's web interface) this does not apply.
- By default, your mail is saved under your home directory. Old mail and mail with big attachments (multimedia, PDFs, junk) can cause space shortage. To avoid it, remember to periodically clean up your inbox.
- You should be able to see if the mail is taking your disk space by using the above du command, either ~/Mail, or ~/.mozilla-thunderbird will take a lot of space (depending on your mail client).
- On some mail clients (e.g. thunderbird/icedove, kmail) simply deleting the mail isn't enough. You need to compact the inbox folder (or other folders, if you use any). You can do this (in kmail and thunderbird/icedove), by right clicking on the folder, and choosing "Compact this folder".
- On thunderbird/icedove, you can tell the program to do this automatically by setting:
Edit -> Preferences -> Advanced -> Offline & Disk Space -> Compact folders when ...
For new users, it is already set (so old users can use reinstall thunderbird, to set this configuration).- Sometimes, when very low on memory compacting doesn't work. In that case, you can either:
- Better: reinstall thunderbird - reinstall also compacts the folders (specifically, the Inbox, Sent, and Trash).
or - Risky: Run the script /cs/share/scripts/compact-thunderbird.sh.
- Better: reinstall thunderbird - reinstall also compacts the folders (specifically, the Inbox, Sent, and Trash).
- Sometimes, when very low on memory compacting doesn't work. In that case, you can either:
- Warning: Please note that you need to close thunderbird before running these scripts.
- These methods should be executed only once, since after changing the preferences and compacting the folders, thunderbird should be able to manage the compcat by itself (and it will do so each time you open it).
Mozilla
All mozilla components, including firefox, thunderbird, and seamonkey (or iceweasel, icedove, and iceape), can use a considerable amount of disk space. Some tips to reduce that space:
- Don't open several accounts, each account starts with about 2.5Mb (and it keeps on growing). If it complains that the account is locked, delete the lock file instead of creating new account.
- If you do have several accounts, delete the ones you don't need, and/or run the cleanup utility. It will save some space on each account until you open that account again.
- Extensions, themes, and other add-ons, takes space so use them sparsely. The system group will try to globally install commonly used extensions.
- TAs please notify the system in advance if you need an extension or addon for a course.
Eclipse
Eclipse can be very heavy on your disk space and thus we suggest not to use it. If you do need to use eclipse here are some tips:
- Don't open more than one workspace. Each workspace can go to 50Mb and even more (!).
- If you have unused workspace, save the project itself (the code), and delete the workspace.
- Don't install unnecessary plug-ins. Plug-ins can also be very large. If there is a special plug-in that you need to use, try asking the system to install it globally before installing it under your quota (depending on the nature of the plug-in, they might even agree).
Other Tips for freeing some disk space
- Executable files and files like *.o, *.class are usually relatively big and you can always create them from the sources by compilation. You can find them using the following command from your home-directory (~/):
find . -name "*.class" -type f
And you can delete them (Careful!) using the following:find . -name "*.class" -type f -delete
- Compress directories and files that aren't used regularly, using the command:
tar cvzf <archive file> <list of files>
and remove these filesrm <list of files>
or in one commandtar --remove-files cvfz <archive file> <list of files>
If you want to decompress those files, use the command:tar xvzf <archive file>
- If you want to view the disk-space used by a specific directory (and its descendants) type:
du -sh <directory>
- Free space in your home directory by moving something to secondary storage. For example to move your firefox configuration, do:
cd
mv .mozilla .+
ln -s .+/.mozilla
