Skip to content

Commit

Permalink
deploy: db6d617
Browse files Browse the repository at this point in the history
  • Loading branch information
niksirbi committed Nov 16, 2023
1 parent 61e1fd4 commit 69bb19d
Show file tree
Hide file tree
Showing 41 changed files with 221 additions and 2,703 deletions.
2 changes: 1 addition & 1 deletion .buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 878c152044dfb5049531fd6e897ecbff
config: 1b1501f97a74dce1b0ae5f6f0c31f428
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file removed .doctrees/data_analysis/HPC-module-SLEAP.doctree
Binary file not shown.
Binary file modified .doctrees/data_analysis/index.doctree
Binary file not shown.
Binary file modified .doctrees/environment.pickle
Binary file not shown.
Binary file not shown.
Binary file modified .doctrees/programming/Mount-ceph-ubuntu.doctree
Binary file not shown.
Binary file removed .doctrees/programming/SLURM-arguments.doctree
Binary file not shown.
Binary file modified .doctrees/programming/SSH-SWC-cluster.doctree
Binary file not shown.
Binary file modified .doctrees/programming/index.doctree
Binary file not shown.
598 changes: 0 additions & 598 deletions _sources/data_analysis/HPC-module-SLEAP.md.txt

This file was deleted.

1 change: 0 additions & 1 deletion _sources/data_analysis/index.md.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ Guides related to the analysis of neuroscientific data, spanning a wide range of
```{toctree}
:maxdepth: 1

HPC-module-SLEAP
```
54 changes: 54 additions & 0 deletions _sources/programming/Mount-ceph-ubuntu-temp.md.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
(target-mount-ceph-ubuntu-temp)=
# Mount ceph storage on Ubuntu temporarily
In this example, we will **temporarily** mount a partition of `ceph` in an Ubuntu machine. The mounting is temporary because it will only remain until the next reboot. To mount a partition of `ceph` permanently, see [Mount ceph storage on Ubuntu permanently](target-mount-ceph-ubuntu-perm).


## Prerequisites
- Administrator rights (`sudo`) on the local Ubuntu machine
- `cifs-utils` installed via `sudo apt-get install cifs-utils`


## Steps
### 1. Create a mount point
Create a directory to mount the storage to. Sensible places to do this on Ubuntu would be in `/mnt` or `/media`. In the example below, we will use `/mnt/ceph-neuroinformatics`.

```bash
sudo mkdir /mnt/ceph-neuroinformatics
```

### 2. Mount the `ceph` partition
To mount the desired partition on the directory we just created, run the `mount` command with the appropriate options. In our example, this would be:
```bash
sudo mount -t cifs -o user=<SWC-USERNAME>,domain=AD.SWC.UCL.AC.UK //ceph-gw02.hpc.swc.ucl.ac.uk/neuroinformatics /mnt/ceph-neuroinformatics
```
:::{note}
You can check the full set of options for the `mount` command by running `mount --help`
:::

Make sure to replace the following for your particular case:
- `//ceph-gw02.hpc.swc.ucl.ac.uk/neuroinformatics` with the path to your desired partition, e.g. `//ceph-gw02.hpc.swc.ucl.ac.uk/<LAB-NAME>`
- `/media/ceph-neuroinformatics` with the path to the local mount point you created in the previous step.
- `<SWC-USERNAME>` with your SWC username

If the command is executed without errors you will be prompted for your SWC password.

### 3. Check the partition is mounted correctly
It should show up in the list of mounting points when running `df -h`

:::{note}
The command `df` prints out information about the file system
:::

### 4. To unmount the storage
Run the following command
```bash
sudo umount /mnt/ceph-neuroinformatics
```
Remember that because the mounting is temporary, the `ceph` partition will be unmounted upon rebooting our machine.

You can check that the partition is correctly unmounted by running `df -h` and verifying it does not show in the output.


## References
- [Mount network drive under Linux temporarily/permanently](https://www.rz.uni-kiel.de/en/hints-howtos/connecting-a-network-share/Linux/through-temporary-permanent-mounting/mount-network-drive-under-linux-temporarily-permanently)
- [How to Mount a SMB Share in Ubuntu](https://support.zadarastorage.com/hc/en-us/articles/213024986-How-to-Mount-a-SMB-Share-in-Ubuntu)
17 changes: 11 additions & 6 deletions _sources/programming/Mount-ceph-ubuntu.md.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
# Mount ceph storage on Ubuntu
(target-mount-ceph-ubuntu-perm)=
# Mount ceph storage on Ubuntu permanently
In this example, we will **permanently** mount the `neuroinformatics` partition of `ceph`. The same procedure can be used to mount other partitions, such as those belonging to particular labs or projects.

To mount a partition of `ceph` only temporarily, see [Mount ceph storage on Ubuntu temporarily](target-mount-ceph-ubuntu-temp).


The following instructions have been tested on **Ubuntu 20.04 LTS**.

## Prerequisites
- Administrator rights (`sudo`) on the local Ubuntu machine
- `cifs-utils` installed via `sudo apt-get install cifs-utils`

## Store your SWC credentials
## Steps
### 1. Store your SWC credentials
First, create a file to store your SWC login credentials and save it in your home directory.
You can do that on the terminal via `nano ~/.smb_swc`.

Expand All @@ -32,14 +37,14 @@ This will ensure the file is readable and writable only by the owner (you).
However, if someone gets access to your machine with your user logged in, they will still be able to read the SWC password.
:::

## Create a mount point
### 2. Create a mount point
Create a directory to mount the storage to. Sensible places to do this on Ubuntu would be in `/mnt` or `/media`. In the example below, we will use `/media/ceph-neuroinformatics`.

```bash
sudo mkdir /media/ceph-neuroinformatics
```

## Edit the fstab file
### 3. Edit the fstab file
This will allow you to mount the storage automatically on boot. Before editing the file, make a backup of it, just in case.
```bash
sudo cp /etc/fstab /etc/fstab.bak
Expand All @@ -59,12 +64,12 @@ Make sure to replace the following:

Save the file and exit.

## Mount the storage
### 4. Mount the storage
You can now mount the storage by running `sudo mount -a`. If you get an error, check the `fstab` file for typos. If you get no error, you should be able to see the mounted storage by running `df -h`.

The next time you reboot your machine, the storage should be mounted automatically.

## Unmount the storage
### 5. Unmount the storage
To unmount the storage, run `sudo umount /media/ceph-neuroinformatics` (or whatever your mount point is).

To permanently unmount the storage, remove the lines you added to the `fstab` file and run `sudo mount -a` again.
147 changes: 0 additions & 147 deletions _sources/programming/SLURM-arguments.md.txt

This file was deleted.

17 changes: 8 additions & 9 deletions _sources/programming/SSH-SWC-cluster.md.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
(ssh-cluster-target)=
# Set up SSH for the SWC HPC cluster

This guide explains how to connect to the SWC's HPC cluster via SSH.
Expand All @@ -10,14 +9,14 @@ This guide explains how to connect to the SWC's HPC cluster via SSH.
```

## Abbreviations
| Acronym | Meaning |
| ------- | -------------------------------------------- |
| SWC | Sainsbury Wellcome Centre |
| HPC | High Performance Computing |
| SLURM | Simple Linux Utility for Resource Management |
| SSH | Secure (Socket) Shell protocol |
| IDE | Integrated Development Environment |
| GUI | Graphical User Interface |
| Acronym | Meaning |
| --- | --- |
| SWC | Sainsbury Wellcome Centre |
| HPC | High Performance Computing |
| SLURM | Simple Linux Utility for Resource Management |
| SSH | Secure (Socket) Shell protocol |
| IDE | Integrated Development Environment |
| GUI | Graphical User Interface |

## Prerequisites
- You have an SWC account and know your username and password.
Expand Down
2 changes: 1 addition & 1 deletion _sources/programming/index.md.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ Small tips and tricks that do not warrant a long-form guide can be found in the
```{toctree}
:maxdepth: 1

SLURM-arguments
SSH-SWC-cluster
SSH-vscode
Mount-ceph-ubuntu
Mount-ceph-ubuntu-temp
Cookiecutter-cruft
Troubleshooting
```
4 changes: 0 additions & 4 deletions _static/check-solid.svg

This file was deleted.

Loading

0 comments on commit 69bb19d

Please sign in to comment.