Skip to content

Commit 430df32

Browse files
authored
Merge pull request #3 from ARCTraining/murphyqm-update-storage
Add storage section
2 parents 78fe647 + 8ea0e26 commit 430df32

File tree

1 file changed

+106
-7
lines changed

1 file changed

+106
-7
lines changed

book/storage.md

Lines changed: 106 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,114 @@
11
# Session 3: Storage on Aire
22

3-
## Structure of different storage systems/directories
3+
::: note
4+
**Objectives:** Understand the main file areas on Aire (home, scratch, etc.), learn the purpose and differences of each storage type, practice navigating between storage areas and checking disk quotas, and learn commands for copying and transferring data to/from Aire.
5+
:::
46

5-
Content here on file system, bring content from here: https://arcdocs.leeds.ac.uk/aire/usage/file_data_management/storage_overview.html
7+
`````{tab-set}
8+
````{tab-item} 1. Structure
9+
- The Aire HPC file system includes several special directories:
10+
- **Home directory** (`/users/<username>`, env var `$HOME`) for personal files.
11+
- **Scratch directory** (`/mnt/scratch/<username>`, env var `$SCRATCH`) for large, temporary data.
12+
- **Flash (NVMe) scratch** (`$TMP_SHARED`, usually `/mnt/flash/tmp/job.<JOB-ID>`) for very fast I/O during jobs.
13+
- **Node-local scratch** (`$TMP_LOCAL` or `$TMPDIR`, typically `/tmp/job.<JOB-ID>`) for fast local storage on each compute node.
14+
- Symlinks exist: `/scratch` → `/mnt/scratch`, and `/flash` → `/mnt/flash`.
15+
- Home is backed up and not automatically purged; scratch and flash are not backed up and flash is deleted after each job.
16+
- **Always** copy important results from temporary storage (flash or node-local) back to your home directory or another permanent area **before** the job ends.
617
7-
Exercise: navigating from home dir to scratch etc.
818
9-
Difference between the different storage sections.
19+
::: important
20+
**Exercise:** On the Aire login node, display the values of `$HOME` and `$SCRATCH` using `echo`.
21+
:::
1022
11-
Checking quotas: https://arctraining.github.io/rc-slides/hpc1.html#/exercise-1.2
23+
::: tip
24+
**Solution:** For example, run:
25+
```
26+
$ echo $HOME
27+
/users/yourusername
28+
$ echo $SCRATCH
29+
/mnt/scratch/yourusername
30+
```
31+
:::
32+
````
1233
13-
## Copying/transferring data to/from Aire
34+
````{tab-item} 2. Storage Types
35+
- **Home (`$HOME`)**: Quota ≈30 GB and 1,000,000 files. Backup enabled and not deleted automatically. Best for small, persistent files (scripts, documents, configs).
36+
- **Scratch (`$SCRATCH`)**: Quota ≈1 TB and 500,000 files. **No backups**. Not deleted automatically, but you must clean up manually. Use for large datasets and intermediate job data.
37+
- **Flash (`$TMP_SHARED`)**: Quota ≈1 TB per job, no backup, **auto-deleted** when the job completes. Very fast NVMe storage ideal for I/O-intensive tasks during the job.
38+
- **Local scratch (`$TMP_LOCAL`, `$TMPDIR`)**: Node-specific quota. No backup, **auto-deleted** after job completion. Best for very fast, node-local storage during single-node jobs.
39+
- **Important:** Data in scratch/flash areas is temporary. These are *not backed up* and may be purged. Always move important data to your home or external storage when done.
1440
15-
https://arctraining.github.io/rc-slides/hpc1.html#/transferring-files-and-data
41+
````
42+
43+
````{tab-item} 3. Quotas
44+
45+
::: important
46+
**Exercise:** Check your current disk usage and quotas. *(Hint: use the `quota` command.)*
47+
:::
48+
49+
::: tip
50+
**Solution:** Run `quota -s`. For example:
51+
```
52+
$ quota -s
53+
Disk quotas for user yourusername (uid 12345):
54+
Filesystem blocks quota limit grace files quota limit
55+
/users 15000* 30000 33000 200000 1000000 1100000
56+
/mnt/scratch 100000 1000000 1100000 500000 1500000 1650000
57+
```
58+
:::
59+
````
60+
61+
````{tab-item} 4. Navigating
62+
- Use standard Linux shell commands: `cd`, `ls`, `pwd`, etc.
63+
- To go to your home directory: `cd $HOME` or simply `cd` or `cd ~`. To go to scratch: `cd $SCRATCH`.
64+
- List contents with `ls`: e.g. `ls $HOME` or `ls $SCRATCH`. Use `pwd` to show the current directory path.
65+
- Use environment variables (`$HOME`, `$SCRATCH`, etc.) in commands. For example, `ls $HOME/projects` lists your project folder in home.
66+
- Copy files between areas on Aire with `cp`. For example: `cp data.txt $SCRATCH/` to copy **to** scratch, or `cp $SCRATCH/output.dat $HOME/results/` to copy **back** to home.
67+
- Remove unneeded files with `rm` to free space. After cleanup, re-check your usage with `quota -s` or `du` as needed.
68+
````
69+
70+
````{tab-item} 5. Transferring Files
71+
72+
- **scp** (secure copy) to/from the login node. For example, from **your local machine** to Aire:
73+
```bash
74+
scp myfile.txt <username>@target-system:$SCRATCH/
75+
```
76+
And to copy a file **from** Aire to local:
77+
```bash
78+
scp <username>@target-system:/users/yourname/results.txt .
79+
```
80+
- **rsync** for efficient transfers (especially many files). Example:
81+
```bash
82+
rsync -avh data/ <username>@target-system:$HOME/data/
83+
```
84+
- **wget/curl** on the login node to download from a URL. For instance:
85+
```bash
86+
wget https://example.com/data.zip
87+
```
88+
- **GUI/SFTP clients:** Use FileZilla, WinSCP or Cyberduck to connect to Aire via SFTP.
89+
- **Best practice:** Transfer all needed input data to `$SCRATCH` *before* running jobs, and copy results out of `$SCRATCH` after jobs finish.
90+
91+
::: important
92+
**Exercise:** On your **local machine**, write the `scp` command to download `results.txt` from your home directory on Aire into your current local directory.
93+
:::
94+
95+
::: tip
96+
**Solution:** Use the syntax:
97+
```bash
98+
scp username@aire-login.leeds.ac.uk:/users/yourname/results.txt .
99+
```
100+
:::
101+
````
102+
103+
````{tab-item} 6. Summary
104+
- **Multiple storage areas:** Aire provides different file systems: home (`$HOME`), scratch (`$SCRATCH`), NVMe flash, and node-local. Use each appropriately.
105+
- **Navigation:** Use `cd`, `ls`, etc., along with environment variables.
106+
- **Check usage:** Regularly run `quota -s` to see your space and file usage. Clean up old files from `$SCRATCH`.
107+
- **Data transfer:** Use `scp` or `rsync` via the login nodes to move data.
108+
- **Avoid data loss:** Remember that scratch and flash are *temporary*. Always **backup important data** to home or external storage when done.
109+
110+
::: note
111+
**Tip:** Keep your home directory organized. Place large data in scratch only while needed. Archive or delete old files in scratch after use.
112+
:::
113+
````
114+
`````

0 commit comments

Comments
 (0)