You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The GFS2 volume was configured using LVM ([Logical Volume Manager](https://en.wikipedia.org/wiki/Logical_volume_management)) that enhance the management and flexibility of physical storage.
446
+
447
+
a. Create a new multiattach volume and attach it to your instances. Check that the volume is well attached by running the command`sudo parted -l`
448
+
449
+
b. On one node, add the new volume in the Volume Group:
d. Check that the Logical Volume has been extended by running the command`sudo lvs`
462
+
463
+
e. Before extending the GFS2 volume, check on the other nodes that you don't have error messages. Run `sudo pvs`. If you see something like:
464
+
465
+
```
466
+
WARNING: Couldn't find device with uuid JuoyG2-ftdd-U9xm-LLei-VrY7-4GZz-FgC2dr.
467
+
WARNING: VG shared_vg1 is missing PV JuoyG2-ftdd-U9xm-LLei-VrY7-4GZz-FgC2dr (last written to /dev/vdX)
468
+
```
469
+
You must add the device by running the command:
470
+
471
+
```
472
+
sudo lvmdevices --adddev /dev/vdX
473
+
```
474
+
475
+
Check again with the command`sudo pvs`. The warning message shouldn't appear.
476
+
477
+
f. If everything's ok, you can grow your GFS2 volume by typing:
478
+
479
+
```sh
480
+
sudo gfs2_grow <YourGFS2MountVolume>
481
+
```
482
+
483
+
!!! warning
484
+
You cannot decrease the size of a GFS2 file system
485
+
443
486
***What happens if a VM gets disconnected?**
444
487
445
488
This covers two different use cases, a temporal and/or unexpected disconnection, and a permanent one.
@@ -484,6 +527,8 @@ You can enable them if you wish with `pcs`:
484
527
- [Getting start with Pacamaker](https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html/configuring_and_managing_high_availability_clusters/assembly_getting-started-with-pacemaker-configuring-and-managing-high-availability-clusters#proc_learning-to-use-pacemaker-getting-started-with-pacemaker)
485
528
- [Configuring a Red Hat High Availability cluster on Red Hat OpenStack Platform](https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html/configuring_a_red_hat_high_availability_cluster_on_red_hat_openstack_platform/index)
486
529
- [GFS2 file systems in a cluster](https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html/configuring_gfs2_file_systems/assembly_configuring-gfs2-in-a-cluster-configuring-gfs2-file-systems#proc_configuring-gfs2-in-a-cluster.adoc-configuring-gfs2-cluster)
530
+
- [Growing a GFS2 file system](https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html/configuring_gfs2_file_systems/assembly_creating-mounting-gfs2-configuring-gfs2-file-systems#proc_growing-gfs2-filesystem-creating-mounting-gfs2)
Copy file name to clipboardExpand all lines: docs/data/sensitive-data/sd-connect-command-line-interface.md
+25-33Lines changed: 25 additions & 33 deletions
Original file line number
Diff line number
Diff line change
@@ -1,18 +1,17 @@
1
1
# Command Line Interface and automated key management
2
2
3
-
The new SD Connect command line tools, available from February 2025, support file upload, download (with a-commands) and automated key management (with lock-unlock) during encryption and decryption. After programmatic encryption and upload, data can be viewed through the SD Connect user interface and SD Desktop. Coding skills are required to use the tools effectively, below is a step by step guide to get started. In contrast, files have been uploaded before February 2025, were manually encrypted using your encryption key and will need to be decrypted manually after download.
3
+
The new SD Connect command line tools, available from February 2025, support file upload, download (with a-commands) and automated key management (with lock-unlock) during encryption and decryption. After programmatic encryption and upload, data can be viewed through the SD Connect user interface and SD Desktop. Coding skills are required to use the tools effectively, below is a step by step guide to get started. In contrast, files have been uploaded before February 2025, were manually encrypted using your encryption key and will need to be decrypted manually after download.
-[Command line tools and automated key management](#command-line-tools-and-automated-key-management)
7
7
-[Command line tools and manual encryption](#command-line-tools-and-manual-encryption)
8
8
-[Tutorials](#tutorials)
9
9
10
-
11
10
## Background information
12
11
13
12
SD Connect is part of CSC's Sensitive Data Services, offering a free and secure data processing environment for academic research projects at Finnish universities and research institutes. SD Connect enhances the Allas object storage system by adding an automatic encryption layer, enabling secure storage of sensitive data. Data stored in SD Connect can also be accessed through SD Desktop for secure virtual desktops. While SD Connect is typically accessed via the SD Connect Web interface, command-line tools may offer a more efficient way to manage data in certain situations.
14
13
15
-
This document provides instructions on how you can install on your local environment (Linux, Mac) and how you can use the a-commands from the allas-cli-utils package to upload and download with automated key management via command line with SD Connect.
14
+
This document provides instructions on how you can install on your local environment (Linux, Mac) and how you can use the a-commands from the allas-cli-utils package to upload and download with automated key management via command line with SD Connect.
16
15
17
16
!!! Note
18
17
Allas itself does not differentiate between data uploaded via SD Connect (user interface or commandline tools) and data uploaded to Allas using different methods. Data buckets may contain a mix of SD Connect data, other encrypted data, and regular data. It is the user's responsibility to manage data types within the buckets. However, it is recommended to store SD Connect data in separate buckets and folders to avoid mixing different data types.
@@ -23,7 +22,7 @@ This document provides instructions on how you can install on your local environ
23
22
24
23
To upload and automatically encrypt sensitive data to SD Connect programmatically, you need to install the command-line tools, which require root access to your laptop or local environment (Mac or Linux). For this reason, you might need support from your organization’s IT unit.
25
24
26
-
Here you can find step-by-step instructions: https://github.com/CSCfi/allas-cli-utils. This guide provides installation instructions for the a-commands (used to upload and download files) as well as the lock and unlock commands (used to automatically encrypt and decrypt files via automated key management).
25
+
[Here you can find step-by-step instructions](https://github.com/CSCfi/allas-cli-utils). This guide provides installation instructions for the a-commands (used to upload and download files) as well as the lock and unlock commands (used to automatically encrypt and decrypt files via automated key management).
27
26
28
27
!!! Note
29
28
If you need to upload non-sensitive data (such as scripts, containers, or software for use in SD Desktop), note that these tools are also available on CSC's supercomputers (Puhti, Mahti, and Lumi). However, these systems are restricted to non-sensitive data only. Sensitive data must be uploaded to SD Connect through the appropriate channels.
@@ -36,27 +35,29 @@ To open SD Connect compatible Allas connection you must add option *--sdc* the c
36
35
module load allas
37
36
allas-conf --sdc
38
37
```
38
+
39
39
In local installations the connection is typically opened with commands like
The set up process asks first your CSC passwords (Haka or Virtu passwords can't be used here).
47
-
After that you will select the CSC project to be used. This is the normal login process for Allas.
48
-
However, when SD Connect is enabled, the process asks you to give the *SD Connect API token*. This
49
-
token must be retrieved from the [SD Connect web interface](https://sd-connect.csc.fi). Note that the tokens
50
-
are project specific. Make sure you have selected the same SD Connect project in both command line and in web
51
-
interface.
46
+
- The set up process asks first your CSC passwords (Haka or Virtu passwords can't be used here). After that you will select the CSC project to be used. This is the normal login process for Allas.
47
+
- However, when SD Connect is enabled, the process asks you to give the *SD Connect API token*.
48
+
49
+
To retrieve the temporary SD Connect API token:
52
50
53
-
In the web interface the token can be created using dialog that opens by selecting *Create API tokens* from the *Support* menu.
51
+
- Login to the [SD Connect web interface](https://sd-connect.csc.fi). If you have multiple CSC projects, make sure you have selected the same SD Connect project in both the command line and the web interface (top left corner).
52
+
- In the top right corner of the web interface, click on Support, then select Select API Token from the dropdown menu.
53
+
- In the new dialog, enter a name for your temporary token. Note: Tokens are project-specific, so the name must be unique. Avoid using special characters in the name.
54
+
- Click on Create Token. The token will be displayed only once. Once you see the token, copy it (click the icon to the left of the token). Important: make sure to store it securely, as it will not be retrievable later.
54
55
55
-
Copy the token, paste into to command line and press enter.
The SD Connect compatible Allas connection is now valid for next eight hours. And you can use commands like
58
-
*a-list* and *a-delete* to manage both normal Allas objects and SD Connect objects.
58
+
- The token will be valid for 24 hours and will be automatically deleted after this period. Paste the token into the command line and press Enter to use it.
59
59
60
+
The SD Connect compatible Allas connection is now valid for next eight hours. And you can use commands like *a-list* and *a-delete* to manage both normal Allas objects and SD Connect objects.
60
61
61
62
### Step 3: Data upload and automated encryption
62
63
@@ -72,7 +73,7 @@ This will produce SD Connect object: 2000123-sens/dataset2/my-secret-table.csv.c
72
73
All other a-put options and features can be used too. For example directories are
73
74
stored as tar files, if --asis option is not used.
@@ -94,13 +95,11 @@ The command above will copy all the files from directory my-secret-directory to
94
95
!!! Note
95
96
Since SD Connect was updated in October 2024, it is no longer straightforward to determine which encryption method was used for an encrypted .c4gh file stored in Allas/SD Connect. If you are now using a new encryption method to upload files to an existing CSC project, please ensure you add a note to your folders indicating that the encryption protocol has changed. You can either share this information with your colleagues or clearly include it in the folder name. As a good practice, we advise creating a new folder and avoiding mixing files encrypted with different methods.
96
97
97
-
98
-
99
98
### Step 4: Data download and automated decryption
100
99
101
100
Data can be downloaded from Allas with command a-get. If SD Connect connection is enabled, a-get will automatically try to decrypt objects with suffix *.c4gh*.
Unfortunately there is no easy way to know, which encryption method has been used in
130
-
a .c4gh file stored in Allas.
131
-
129
+
a .c4gh file stored in Allas.
132
130
133
131
## Command line tools and manual encryption
134
132
@@ -197,7 +195,7 @@ In this example, we first generate your key pair (a password-protected private k
197
195
C4GH_SECRET_KEY If defined, it will be used as the default secret key (ie --sk ${C4GH_SECRET_KEY})
198
196
```
199
197
200
-
You may notice that crypt4gh uses `--sk` option for the private key. This might seem odd but apparently, crypt4gh uses term _secure key_for private key, hence `sk`, and consequently `pk` refers to public key instead of the private key.
198
+
You may notice that crypt4gh uses `--sk` option for the private key. This might seem odd but apparently, crypt4gh uses term *secure key*for private key, hence `sk`, and consequently `pk` refers to public key instead of the private key.
201
199
202
200
### 2.2 Decrypt a file
203
201
@@ -216,22 +214,16 @@ The command will ask the user to enter the password (passphrase) of your private
216
214
217
215
Additional information about [data encryption](./sd-connect-introduction-to-data-encryption.md).
218
216
219
-
220
-
221
217
## Tutorials
222
218
223
219
- [Tools for client side encryption for Allas](../Allas/allas_encryption.md)
224
-
225
220
- [Decrypting all files in a directory](../sensitive-data/tutorials/decrypt-directory.md)
226
-
227
221
- [Using Allas storage service to receive sensitive research data](../sensitive-data/sequencing_center_tutorial.md)
0 commit comments