|
Size: 9209
Comment:
|
Size: 9308
Comment:
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 30: | Line 30: |
| This shows you the various file spaces on which you have a quota. In this example, the user's home directory is held on a filesystem called /export2 on the file server stork, the user is using 22MB (megabytes) of disk space at present, has a quota of 1GB and a hard limit of 1100MB. This user would start getting warning messages when they pass 1GB, and would never be allowed to use more than 1100MB. The user also has 18 files, and is limited to 21000 in total, with warnings after 20000 files. |
This shows you the various file spaces on which you have a quota. In this example, your home directory is held on a filesystem called /export2 on the file server stork, you're using 22MB (megabytes) of disk space at present, with a quota of 1GB and a hard limit of 1.1GB (1100MB). You'll start getting warning messages when you pass 1GB, and yuo will never be allowed to use more than 1.1GB. You have 18 files, and a file quota of 20K files, 21K in total (with warnings produced when you store more than 20K files). |
| Line 61: | Line 60: |
| For a single directory such as ~/public_html, the commands: | For a single directory such as ~/public_html, the command: |
| Line 64: | Line 63: |
| cd ~/public_html find | wc -l |
find ~/public_html | wc -l |
| Line 68: | Line 66: |
| will show the total number of files and directories [which count towards your file limits]. | will show the total number of files and directories [which count towards your file limits] within that directory. |
| Line 71: | Line 69: |
| in sorted order, one needs a short script. Fortunately, CSG have already written a short Perl script for you: |
in sorted order, one needs to write a short script. Fortunately, we have already written one for you, so just run: |
| Line 78: | Line 75: |
| As with the "usage" alias, this produces a list of sub-directories [under the current directory] sorted by number of files contained. The directories with the largest number of files appear at the bottom of the list. |
This produces a list of sub-directories [under the current directory] sorted by number of files contained. The directories with the largest number of files appear at the bottom of the list. |
| Line 84: | Line 80: |
| Suppose you have a quota of 1GB, with a hard limit of 1100MB. This allows you to store up to 1GB at all times, and allows you to store between 1GB and 1.1GB for up to 7 days at a time. | Suppose you have a quota of 1GB, with a hard limit of 1.1GB. This allows you to store up to 1GB at all times, and allows you to store between 1GB and 1.1GB for up to 7 days at a time. |
| Line 140: | Line 136: |
| * Bitbucket is available from Windows if you map the network drive: \\fs-vol\bitbucket | * Bitbucket is available from Windows if you map the network drive: '''\\fs-vol\bitbucket''' |
| Line 142: | Line 138: |
| * You must not store any copyright material in your home dir OR bitbucket; both you and the College could get into serious trouble if so. Do not try to link bitbucket into your personal web pages. | * You must not store any copyright material in your home dir OR bitbucket; both you and the College could get into serious trouble if yop do. Do not try to link bitbucket into your personal web pages. |
| Line 144: | Line 140: |
| * Each separate Linux machine makes any local unused disk space available as a local filesystem called /data. You are welcome to use this space as you like, remembering that it's not backed up, and again not storing any copyright material in there. | * Each separate Linux machine makes any local unused disk space available as a local filesystem called /data, only accessible from that machine (not across the network via NFS). You are welcome to use this space as you like, remember that it's not backed up, and again not storing any copyright material in there. |
| Line 146: | Line 142: |
| * /vol/lab and /vol/labsrc :- These are controlled by the Lab Organisers (Teaching Associates). If you have application software in your account, which is likely to be used by other users, then it could be moved to this partition by agreement with the Lab Organisers. Users wishing to suggest software to be stored into /vol/lab or /vol/labsrc, should contact the Lab Organisers and discuss it with them. Software in this partition is not supported by CSG. | * '''/vol/lab''' and '''/vol/labsrc''' are controlled by the Lab Organisers (Teaching Associates). If you have application software in your account, which is likely to be used by other users, then it could be moved to this partition by agreement with the Lab Organisers. Users wishing to suggest software to be stored into /vol/lab or /vol/labsrc, should contact the Lab Organisers and discuss it with them. Software in this partition is not supported by CSG. |
| Line 150: | Line 146: |
| * Shared disk space in /vol/project is set up for organised group project work. We sort this out directly with the group project organiser and will email students with group project info when we have the data. | * Shared disk space in '''/vol/project''' is set up for organised group project work. We sort this out directly with the group project organiser and will email students with group project info when we have the data. |
| Line 154: | Line 150: |
| The disk space quota is set by discussion with the Academics, in particular with Tony Field, the Director of Teaching. Your quota is considered adequate for most academic work and you would need a good reason | The disk space quota is set by discussion with the academic staff, in particular with Tony Field, the Director of Teaching. Your quota is considered adequate for most academic work and you would need a good reason |
How to check your file quota
There is a limit on the amount of disk space on the fileservers which students and staff are allowed to use. This is known as disk quota and (from October 2009) is set at 1GB for everyone in DoC.
This quota covers any files and sub-directories created in your home directory. Your home directory is your initial working space when you log in to any Linux system, and is the H: drive on Windows systems.
Checking your quota and disk space used
You can check your quota and the space you are using by typing:
quota -v
on the command line of any DoC Linux system. The only way to check your quota when running Windows is to log in to a Linux host via an ssh client (eg. putty) and run the quota command as above.
The output will be similar to:
Disk quotas for user zzzz07 (uid 9999):
Filesystem blocks quota limit grace files quota limit grace
stork:/export2/users/z/zzzz07
22400 1000000 1100000 18 20000 21000This shows you the various file spaces on which you have a quota. In this example, your home directory is held on a filesystem called /export2 on the file server stork, you're using 22MB (megabytes) of disk space at present, with a quota of 1GB and a hard limit of 1.1GB (1100MB). You'll start getting warning messages when you pass 1GB, and yuo will never be allowed to use more than 1.1GB. You have 18 files, and a file quota of 20K files, 21K in total (with warnings produced when you store more than 20K files).
Where am I using all the space?
People often think they are only using say 50MB of space and when quota reports they are using 200MB they don't believe it! The truth is that many applications you use store data in files you don't even realise are there. KDE and Gnome are notorious for storing stuff behind the scenes. Make sure you empty your Gnome or KDE trashcan for a start! The following command will show which files are taking up most space in your account:
du -s * .[a-zA-Z]* | sort -n
The largest files or directories will appear at the end of the list. The du command can summarise disk usage in various ways - see the manual page (type man du) for other options.
You might want to add that command to the end of your .cshrc file as an alias:
alias usage 'du -s * .[a-zA-Z]* | sort -n'
then on future logins (or immediately, after running source ~/.cshrc) you can simply type:
cd usage
Where am I using all the files?
Checking which directories contain the most number of files is slightly trickier. For a single directory such as ~/public_html, the command:
find ~/public_html | wc -l
will show the total number of files and directories [which count towards your file limits] within that directory.
So, in order to do that for all sub-directories in your current directory, producing the output in sorted order, one needs to write a short script. Fortunately, we have already written one for you, so just run:
/vol/linux/bin/nfiles
This produces a list of sub-directories [under the current directory] sorted by number of files contained. The directories with the largest number of files appear at the bottom of the list.
What happens when I go over my quota?
Suppose you have a quota of 1GB, with a hard limit of 1.1GB. This allows you to store up to 1GB at all times, and allows you to store between 1GB and 1.1GB for up to 7 days at a time. When you exceed your quota, quota will show a timer that starts counting down to zero, and you must delete enough files to come back under quota before the counter expires.
If you either hit your hard limit, or allow the over-quota timer to expire (i.e. leave yourself over quota for a whole week) the consequences will be:
- all writes to your files will then start to fail, as if the disk was full.
- you will probably not be able to log in.
- you could easily lose data (edit a file and then write out a zero-length file because the write fails)!
How can I reduce my usage once I have reached my hard limit?
If you reached the total amount of disk space you are allowed to use you will not be able to log in via X-windows (KDE/Gnome). This is because the system creates a temporary file in your account when you log in. If there is no space to do so, you can't log in. You can log in if you avoid X-windows.
On Linux workstations type Ctrl-Alt-F1 to get a text-mode login prompt. Log in, find where you're using the space (usage alias above), then clear some space by removing or compressing files until your quota comes under the soft limit, using the command quota -v to check). Then log out of the text-mode login, and then press Ctrl-Alt-F7 to return the machine to X-Windows, and login in graphically.
You can also clear space by logging in via Windows and removing files from the H: drive. Take care not to remove any Linux setup files!
Making the most of your quota
There are several recommended methods for getting the most out of your file space.
- Empty your Gnome or KDE trash can
- Check that your web browser (Mozilla, Firefox, IE, Opera, or whatever) is not caching a large number of files in your home directory. For example, in Firefox, go to:
Edit -> Preferences -> Advanced -> Network
- Set the disk cache to 0 and clear the disk cache.
- In whatever application you use to read email, make sure it's not keeping a local copy of all your email.
- When a program or application fails it will sometimes dump diagnostic information out to a file called core. These files can be quite large and should be removed unless you intend to use them. If you like you can prevent such files from being created by adding a line as follows to your .cshrc file in your home directory:
limit coredumpsize 0
After submission of an exercise, use the rm command to remove all unnecessary files, especially the binaries, object code and backups. Binaries can aways be recreated if the necessary source code is available. If an exercise directory has a "Makefile" in it, make clean may remove object code and binaries.
- Similarly, Windows users should note that most Microsoft compilers (like Visual Studio) have a Build/Clean menu item which should be used at the end of an exercise.
- Compress and compact the remaining source code into a single file using the tar or zip commands. For example:
tar czvf <filename.tgz> <list of files to archive>
Other storage areas
A separate area called /vol/bitbucket is available from all systems and is for the use of all members of DoC, for temporary storage of material that can be regenerated (downloads, compilation of large software etc). Files are not backed up, and there are limited file protections. You must put any files you wish to keep in a directory named after your username, i.e. /vol/bitbucket/username; create this directory via mkdir /vol/bitbucket/username if it doesn't yet exist. Files in other locations in bitbucket may be deleted at any time.
Bitbucket is available from Windows if you map the network drive: \\fs-vol\bitbucket
- You must not store any copyright material in your home dir OR bitbucket; both you and the College could get into serious trouble if yop do. Do not try to link bitbucket into your personal web pages.
- Each separate Linux machine makes any local unused disk space available as a local filesystem called /data, only accessible from that machine (not across the network via NFS). You are welcome to use this space as you like, remember that it's not backed up, and again not storing any copyright material in there.
/vol/lab and /vol/labsrc are controlled by the Lab Organisers (Teaching Associates). If you have application software in your account, which is likely to be used by other users, then it could be moved to this partition by agreement with the Lab Organisers. Users wishing to suggest software to be stored into /vol/lab or /vol/labsrc, should contact the Lab Organisers and discuss it with them. Software in this partition is not supported by CSG.
- Removable media :- DVD writers are installed on most desktop computers. USB drives should automatically mount under Windows and Linux (at least for Gnome and KDE users, some Linux users may need to use something like pmount /dev/sda1 to mount a newly inserted USB drive onto /media/sda1, and pumount /media/sda1 to unmount it before you detach the USB drive!).
Shared disk space in /vol/project is set up for organised group project work. We sort this out directly with the group project organiser and will email students with group project info when we have the data.
Getting your quota extended
The disk space quota is set by discussion with the academic staff, in particular with Tony Field, the Director of Teaching. Your quota is considered adequate for most academic work and you would need a good reason to be allocated any more (eg. final year project work involving video streams:-)). You're welcome to email help@doc however and ask.