Using the scratch disks
About the scratch disks
- Each of the 29 compute nodes in the NextGen cluster has a 1 terabyte 'scratch disk' attached which anyone can use to store data, temporary files, etc with no usage quotas imposed. The scratch disk on each compute node is mounted at
/scratchcompXX
- where XX is the last two digits of the compute node's name. So /scratchcomp01 is the scratch disk for macomp01, scratchcomp02 is the corresponding disk for macomp01 and so on. All of the scratch disks are cross-mounted over the cluster's internal network so that they are accessible from all nodes and the user submission node, macomp001. This means you can access all 29 scratch disks from macomp001 and also, your jobs running on the cluster can access any scratch disk regardless of which node it is physically attached to.
- There are no limits imposed on the amount of data you can store on a scratch disk - other than the space remaining available on that disk, that is - and you can leave your data there as long as you wish. Eventually, after users leave the department or stop using the NextGen cluster, data is deleted after 5 years (10 years in the case of EPSRC-funded work).
- Unlike other data storage facilities on the cluster, these disks are not backed up in any way so if the data you intend storing on a scratch disk is irreplaceble, do remember to keep a copy elsewhere. Having said this, scratch disk failures are rare and average about one per year.
Making space for the first time
- Although you could simply copy one or more files to a scratch disk with the Linux cp command, it's better to first create your own folder into which you can copy these - it's neater, it keeps all your files and sub-folders in one place and makes it easier to move them elsewhere or to make a tar or zip archive of your folder using just one command. Also, it's recommended you name the folder with your own username since this makes it easier to see whose it is at a glance; if you want to create multiple folders in the top level of a scratch disk, your username followed by some suffix of your own choosing might be a good idea. The command:
mkdir /scratchcomp07/jbloggs
will create a folder called jbloggs on the scratchcomp07 scratch disk owned by yourself. It's as simple as that.
Security & privacy
- When you create space for yourself on a scratch disk you probably won't want to share this with other users. Restricting access to your folders and files on scratch disks is easy; assuming you have created a scratch directory called 'jbloggs' on scratchcomp04, the following command will restrict access to yourself only:
chmod 700 /scratchcomp04/jbloggs
- You can now check the permissions on your scratch directory:
jbloggs@macomp04:~ $ ls -ld /scratchcomp04/jbloggs
drwx------ 25 jbloggs mamsc21 4096 Apr 30 13:13 /scratchcomp04/jbloggs
- note the drwx------- in this case the 'd' signifies the folder is a directory while the following 'rwx' shows the owner (that is, yourself) has read, write and directory access permissions for that directory but no-one else in your group or globally has any access. This is because the group permissions (the three dashes following the owner's rwx permissions) and the world permissions (the final set of three dashes) are not set to anything - in effect, this means others in your mamsc21 group and all other users have no permissions to access your folder or the contents within.
Andy Thomas
Research Computing Manager,
Department of Mathematics
last updated: 25.04.2023