NEMO2/Workspaces/Advanced Features: Difference between revisions
mNo edit summary Tag: Reverted |
mNo edit summary |
||
| (7 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
For basic daily usage see the main [[NEMO2/Workspaces|Workspaces]] guide. |
|||
<div style="border: 3px solid #ffc107; padding: 15px; background-color: #fff3cd; margin: 10px 0;"> |
|||
'''Note:''' This is a new Workspaces page. The old wiki can be found here: [[Workspace]]. |
|||
</div> |
|||
__TOC__ |
|||
'''Workspace tools''' provide temporary scratch spaces called '''workspaces''' for your calculations on central file storage. They are meant to keep data for a limited time – but usually longer than the time of a single job run. |
|||
== Creating Workspaces == |
|||
<div style="border: 3px solid #dc3545; padding: 15px; background-color: #f8d7da; margin: 10px 0;"> |
|||
'''Important - Read Before Using Workspaces:''' |
|||
* '''No Backup:''' Data in workspaces is '''not backed up''' and will be '''automatically deleted''' after expiration |
|||
* '''Time-limited:''' Every workspace has a limited lifetime (typically 30-100 days depending on cluster), see the [[Workspaces/Advanced_Features#Cluster-Specific_Workspace_Limits|Cluster-Specific Workspace Limits]]) |
|||
* '''Automatic Reminders:''' You will receive email notifications before expiration |
|||
* '''Backup Important Data:''' Copy important results to permanent storage before expiration (check your cluster/site policies for backup locations) |
|||
</div> |
|||
$ ws_allocate myWs 100 |
|||
'''For detailed information''' about advanced features, configuration options, and less frequently used commands, see the '''[[Workspaces/Advanced Features]]''' guide. |
|||
Returns the workspace path, e.g. <tt>/work/classic/$USER-myWs</tt>. |
|||
== Command Overview == |
|||
Running the same command again is safe — it returns the existing workspace path. |
|||
'''Capture path in variable:''' |
|||
The workspace tools consist of several commands: |
|||
$ WORKSPACE=$(ws_allocate myWs 100) |
|||
* <tt>ws_allocate</tt> - Create or extend a workspace |
|||
$ cd "$WORKSPACE" |
|||
* <tt>ws_list</tt> - List all your workspaces |
|||
* <tt>ws_find</tt> - Find the path to a workspace |
|||
* <tt>ws_extend</tt> - Extend the lifetime of a workspace |
|||
* <tt>ws_release</tt> - Release (delete) a workspace |
|||
* <tt>ws_restore</tt> - Restore an expired or released workspace |
|||
* <tt>ws_register</tt> - Create symbolic links to workspaces |
|||
'''Common options:''' |
|||
All commands support <tt>-h</tt> or <tt>--help</tt> to show detailed usage information. |
|||
$ ws_allocate -g myWs 100 # Group-readable workspace |
|||
== Quick Start - Most Common Commands == |
|||
$ ws_allocate -G projectgroup myWs 100 # Group-writable workspace |
|||
$ ws_allocate -r 7 myWs 100 # Reminder 7 days before expiry |
|||
$ ws_allocate -c "ML training data" myWs 100 # Add comment (shown in ws_list -l) |
|||
$ ws_allocate -x myWs 100 # Extend existing workspace |
|||
$ ws_allocate -x -u alice myWs 100 # Extend Alice's group workspace |
|||
$ ws_allocate -r 7 -x myWs 0 # Update reminder only (no extension) |
|||
{| class="wikitable" |
{| class="wikitable" |
||
|- |
|- |
||
!style="width: |
!style="width:20%" | Option |
||
!style="width: |
!style="width:80%" | Description |
||
|- |
|- |
||
|<tt>-g</tt> |
|||
|Create workspace for 30 days |
|||
|Group-readable workspace |
|||
|<tt>ws_allocate myWs 30</tt> |
|||
|- |
|- |
||
|<tt>-G <groupname></tt> |
|||
|Create group-writable workspace |
|||
|Group-writable workspace. Set default in <tt>~/.ws_user.conf</tt> |
|||
|<tt>ws_allocate -G groupname myWs 30</tt> |
|||
|- |
|- |
||
|<tt>-m <email></tt> |
|||
|List all your workspaces |
|||
|Custom email for reminders (overrides identity provider email) |
|||
|<tt>ws_list</tt> |
|||
|- |
|- |
||
|<tt>-r <days></tt> |
|||
|Check which expire soon |
|||
|Reminder n days before expiration |
|||
|<tt>ws_list -Rr</tt> |
|||
|- |
|- |
||
|<tt>-c <comment></tt> |
|||
|Find workspace path (for scripts) |
|||
|<tt> |
|Comment shown in <tt>ws_list -l</tt> |
||
|- |
|- |
||
|<tt>-x</tt> |
|||
|Extend workspace by 30 days |
|||
|Extend existing workspace |
|||
|<tt>ws_extend myWs 30</tt> |
|||
|- |
|- |
||
|<tt>-u <username></tt> |
|||
|Delete/release workspace |
|||
|Target another user's workspace (requires <tt>-G</tt>) |
|||
|<tt>ws_release myWs</tt> |
|||
|- |
|||
|Restore released workspace |
|||
|<tt>ws_restore -l</tt> then <tt>ws_restore oldname newname</tt> |
|||
|} |
|} |
||
'''Using workspaces in batch jobs:''' |
|||
== Create Workspace == |
|||
Create the workspace once on the login node, then use <tt>ws_find</tt> in the job script: |
|||
<pre> |
|||
'''Basic usage:''' |
|||
#!/bin/bash |
|||
#SBATCH --job-name=my_job |
|||
WORKSPACE=$(ws_find myProject) |
|||
$ ws_allocate myWs 30 # Create workspace for 30 days |
|||
cd "$WORKSPACE" |
|||
./my_program --input input.dat --output results.dat |
|||
'''Common variations:''' |
|||
</pre> |
|||
=== User Defaults: ~/.ws_user.conf === |
|||
$ ws_allocate -G groupname myWs 30 # Create group-writable workspace (recommended for teams) |
|||
$ ws_allocate -g myWs 30 # Create group-readable workspace |
|||
$ ws_allocate -F ffuc myWs 30 # bwUniCluster 3.0: Use flash filesystem |
|||
Set defaults so you never forget important options. The file is in YAML format: |
|||
This returns: |
|||
Workspace created. Duration is 720 hours. |
|||
Further extensions available: 3 |
|||
/work/workspace/scratch/username-myWs-0 |
|||
<pre> |
|||
'''Important:''' Creating a workspace a second time with the same command is safe - it always returns the same path. |
|||
duration: 100 |
|||
reminder: 7 |
|||
groupname: projectgroup |
|||
</pre> |
|||
<div style="border: 3px solid #dc3545; padding: 15px; background-color: #f8d7da; margin: 10px 0;"> |
|||
'''Capture the path in a variable:''' |
|||
'''Important:''' The first line must be a setting, not a comment. Some versions interpret a leading <tt>#</tt> as an email address. |
|||
</div> |
|||
With the config above, <tt>ws_allocate myWs</tt> automatically creates a 100-day workspace with a 7-day reminder for the default group — no extra flags needed. |
|||
$ WORKSPACE=$(ws_allocate myWs 30) |
|||
$ cd $WORKSPACE |
|||
{| class="wikitable" |
|||
'''For all options and advanced usage,''' see the [[Workspaces/Advanced_Features#ws_allocate_-_Create_and_Extend_Workspaces|Advanced Features guide]]. |
|||
|- |
|||
!style="width:25%" | Setting |
|||
!style="width:75%" | Description |
|||
|- |
|||
|<tt>duration:</tt> |
|||
|Default lifetime in days |
|||
|- |
|||
|<tt>reminder:</tt> |
|||
|Days before expiration for reminder |
|||
|- |
|||
|<tt>groupname:</tt> |
|||
|Default group for <tt>-G</tt> (see [[#Sharing|Sharing]]) |
|||
|- |
|||
|<tt>mail:</tt> |
|||
|Override notification email (optional) |
|||
|} |
|||
== |
== Listing Workspaces == |
||
$ ws_list # All your workspaces |
|||
'''Basic usage:''' |
|||
$ ws_list -Rr # Sort by remaining time (soonest first) |
|||
$ ws_list -g # Include group workspaces |
|||
Example output: |
|||
$ ws_list # List all your workspaces |
|||
<pre> |
|||
Shows: |
|||
id: myWs |
|||
* Workspace ID |
|||
workspace directory : /work/classic/$USER-myWs |
|||
* Workspace location |
|||
remaining time : 6 days 23 hours |
|||
* Available extensions |
|||
creation time : Thu Apr 17 09:23:41 2025 |
|||
* Creation date and remaining time |
|||
expiration time : Mon May 26 09:23:41 2025 |
|||
available extensions : 98 |
|||
</pre> |
|||
{| class="wikitable" |
|||
'''Common variations:''' |
|||
|- |
|||
!style="width:15%" | Option |
|||
!style="width:85%" | Description |
|||
|- |
|||
|<tt>-l</tt> |
|||
|Long listing (shows creation time, comment, extensions remaining) |
|||
|- |
|||
|<tt>-R</tt> |
|||
|Show remaining time as human-readable |
|||
|- |
|||
|<tt>-r</tt> |
|||
|Reverse sort order |
|||
|- |
|||
|<tt>-s</tt> |
|||
|Sort by creation time |
|||
|- |
|||
|<tt>-g</tt> |
|||
|Include group workspaces (not just owned) |
|||
|} |
|||
== Finding Workspace Paths == |
|||
$ ws_list -Rr # Sort by remaining time (see what expires soon) |
|||
$ ws_list -s # Short format (only names, good for scripts) |
|||
$ ws_list -g # List group workspaces |
|||
Returns the full path — primarily useful in scripts: |
|||
'''Note:''' To list expired workspaces that can be restored, see [[#Restore_Workspace|Restore Workspace]]. |
|||
$ ws_find myWs |
|||
'''For all options,''' see the [[Workspaces/Advanced_Features#ws_list_-_List_Workspaces|Advanced Features guide]]. |
|||
/work/classic/$USER-myWs |
|||
$ WORKSPACE=$(ws_find myWs) |
|||
== Extend Workspace Lifetime == |
|||
$ cd "$WORKSPACE" |
|||
== Extending Workspaces == |
|||
Extend a workspace before it expires: |
|||
$ ws_extend myWs 100 # Extend by 100 days (same as ws_allocate -x) |
|||
'''Basic usage:''' |
|||
'''Note:''' Expiry is recalculated from ''now''. Extending too early reduces remaining time; extending near expiry gives maximum benefit. |
|||
$ ws_extend myWs 30 # Extend by 30 days from now |
|||
Group members can extend each other's workspaces: |
|||
'''Alternative commands:''' |
|||
$ ws_allocate -x |
$ ws_allocate -x -u alice myWs 100 # Requires workspace created with -G |
||
Each extension uses one of the 100 available extensions. Check remaining extensions with <tt>ws_list -l</tt>. |
|||
== Releasing Workspaces == |
|||
'''For all options,''' see the [[Workspaces/Advanced_Features#ws_extend_-_Extend_Workspace_Lifetime|Advanced Features guide]]. |
|||
$ ws_release myWs |
|||
== Release (Delete) Workspace == |
|||
The workspace directory is immediately moved out of reach. The data is permanently deleted at the next nightly expirer run — <tt>ws_restore</tt> is possible until then. |
|||
When you no longer need a workspace: |
|||
<div style="border: 3px solid #dc3545; padding: 15px; background-color: #f8d7da; margin: 10px 0;"> |
|||
'''Basic usage:''' |
|||
Do '''not''' rely on being able to restore a released workspace. If you have important data, archive it before releasing. |
|||
</div> |
|||
<tt>--delete-data</tt> skips even that window and deletes immediately ('''cannot be restored'''). Only use this if you are certain the data is no longer needed. |
|||
$ ws_release myWs # Release workspace (recoverable during grace period) |
|||
== Restoring Workspaces == |
|||
'''What happens:''' |
|||
* Workspace becomes inaccessible immediately |
|||
* Data is kept for a short grace period (usually until next cleanup run) and can be restored with <tt>ws_restore</tt> |
|||
* Released data may still count toward quota until final deletion |
|||
Restore workspaces that '''expired naturally''' (reached end of lifetime) within the 30-day grace period: |
|||
'''For all options,''' see the [[Workspaces/Advanced_Features#ws_release_-_Release_.28Delete.29_Workspace|Advanced Features guide]]. |
|||
$ ws_restore -l # (1) List restorable workspaces |
|||
== Restore Workspace == |
|||
$ ws_allocate restored 100 # (2) Create target workspace |
|||
$ ws_restore username-myWs-0 restored # (3) Restore |
|||
Use the '''full name''' from <tt>ws_restore -l</tt> (includes username prefix and timestamp), not the short name. |
|||
<div style="border: 3px solid #ffc107; padding: 12px; background-color: #fff3cd; margin: 10px 0;"> |
|||
'''Released workspaces''' (deleted with <tt>ws_release</tt>) can be restored with <tt>ws_restore</tt> until the next nightly expirer run — after that they are permanently deleted. |
|||
</div> |
|||
If the workspace is not listed, it has been '''permanently deleted''' — not recoverable by anyone. |
|||
{| class="wikitable" |
{| class="wikitable" |
||
|- |
|||
!style="width:40%" | Works on cluster |
|||
!style="width:10%" | bwUC 3.0 |
|||
!style="width:10%" | BinAC2 |
|||
!style="width:10%" | Helix |
|||
!style="width:10%" | JUSTUS 2 |
|||
!style="width:10%" | NEMO2 |
|||
|- |
|- |
||
!style="width:20%" | Option |
|||
|<tt>ws_restore</tt> |
|||
!style="width:80%" | Description |
|||
|style="background-color:#90EE90; text-align:center;" | ✓ |
|||
|- |
|||
|style="background-color:#90EE90; text-align:center;" | ✓ |
|||
|<tt>-l</tt> |
|||
|style="background-color:#90EE90; text-align:center;" | ✓ |
|||
|List restorable workspaces |
|||
|style="background-color:#90EE90; text-align:center;" | ✓ |
|||
|- |
|||
|style="background-color:#90EE90; text-align:center;" | ✓ |
|||
|<tt>-u <username></tt> |
|||
|Restore another user's workspace (requires permission) |
|||
|} |
|} |
||
== Workspace Links == |
|||
If you released a workspace by accident or need to recover an expired one, you can restore it within a grace period: |
|||
Creates a directory of symlinks to all your workspaces for quick navigation: |
|||
'''Basic workflow:''' |
|||
$ |
$ ws_register ~/workspaces |
||
$ ls ~/workspaces/ |
|||
$ ws_allocate restored 60 # (2) Create a new target workspace |
|||
myWs -> /work/classic/$USER-myWs |
|||
$ ws_restore username-myWs-0 restored # (3) Restore the expired workspace |
|||
Re-run after creating new workspaces to keep the links up to date. |
|||
'''Note:''' Use the '''full name''' from <tt>ws_restore -l</tt> (including username and timestamp), not the short name from <tt>ws_list</tt>. |
|||
== Sharing == |
|||
'''For detailed restore options,''' see the [[Workspaces/Advanced_Features#ws_restore_-_Restore_Expired_Workspace|Advanced Features guide]]. |
|||
<div style="border: 3px solid #dc3545; padding: 15px; background-color: #f8d7da; margin: 10px 0;"> |
|||
== Work with Groups (Share Workspaces) == |
|||
'''NEVER use <tt>chmod 777</tt> / <tt>chmod o+rwx</tt>!''' |
|||
Making workspaces world-readable is a security policy violation — use the methods below. |
|||
</div> |
|||
=== Group workspaces (recommended) === |
|||
{| class="wikitable" |
|||
|- |
|||
$ ws_allocate -g myWs 100 # Group-readable (read-only for group) |
|||
!style="width:40%" | Works on cluster |
|||
$ ws_allocate -G projectgroup myWs 100 # Group-writable (recommended for teams) |
|||
!style="width:10%" | bwUC 3.0 |
|||
!style="width:10%" | BinAC2 |
|||
Set <tt>groupname</tt> in <tt>~/.ws_user.conf</tt> so you don't have to type it every time. |
|||
!style="width:10%" | Helix |
|||
!style="width:10%" | JUSTUS 2 |
|||
Benefits: team members can extend the workspace, <tt>ws_list -g</tt> shows it to everyone in the group, and new files automatically inherit group ownership. |
|||
!style="width:10%" | NEMO2 |
|||
|- |
|||
=== Read-only sharing after creation === |
|||
|<tt>-g</tt> option (group-readable) |
|||
| style="text-align:center;" | |
|||
Share an existing workspace read-only with specific users outside your group: |
|||
| style="text-align:center;" | |
|||
| style="text-align:center;" | |
|||
$ ws_share share myWs alice bob # Grant read access |
|||
| style="text-align:center;" | |
|||
$ ws_share unshare myWs alice # Remove access |
|||
|style="background-color:#90EE90; text-align:center;" | ✓ |
|||
$ ws_share list myWs # Show who has access |
|||
|- |
|||
|<tt>-G</tt> option (group-writable) |
|||
=== ACLs (per-user fine-grained) === |
|||
| style="text-align:center;" | |
|||
| style="text-align:center;" | |
|||
Use <tt>setfacl</tt> when <tt>-g</tt>/<tt>-G</tt> and <tt>ws_share</tt> don't cover your needs. |
|||
| style="text-align:center;" | |
|||
| style="text-align:center;" | |
|||
$ DIR=$(ws_find my_workspace) |
|||
|style="background-color:#90EE90; text-align:center;" | ✓ |
|||
|} |
|||
$ setfacl -Rm user:alice:rX,default:user:alice:rX "$DIR" # Read-only for alice |
|||
$ setfacl -Rm user:bob:rwX,default:user:bob:rwX "$DIR" # Read-write for bob |
|||
$ getfacl "$DIR" # View current ACLs |
|||
$ setfacl -Rb "$DIR" # Remove all ACLs |
|||
<tt>-R</tt> recursive, <tt>default:</tt> makes new files inherit the ACL, <tt>X</tt> execute only on dirs/executables. |
|||
== Workspace Handover == |
|||
Working with team members is simple using group workspaces: |
|||
When a team member leaves or transfers a project, their workspaces can be handed over without data loss. |
|||
=== Create Group Workspace === |
|||
=== Preparation (before someone leaves) === |
|||
'''Group-readable workspace''' (team can read): |
|||
<tt>-G groupname</tt> can only be set '''at creation time'''. Always create shared research data with it from the start: |
|||
$ ws_allocate -g myWs 30 |
|||
$ ws_allocate -G projectgroup -c "ML training data – contact alice" myWs 100 |
|||
'''Group-writable workspace''' (team can read and write, recommended): |
|||
This ensures: |
|||
$ ws_allocate -G projectgroup myWs 30 |
|||
* Group members can see the workspace with <tt>ws_list -g</tt> |
|||
* Any group member can extend it: <tt>ws_allocate -x -u alice myWs 100</tt> |
|||
* Data remains accessible after the original owner's account is deactivated |
|||
To ensure someone else receives expiry reminders, there are two options: |
|||
Replace <tt>projectgroup</tt> with your actual group name (e.g., <tt>bw11a000</tt>). |
|||
* Add their email to <tt>~/.ws_user.conf</tt> of the owner (or use <tt>-m email</tt> at allocate time): |
|||
<pre> |
<pre> |
||
mailaddress: alice@uni-freiburg.de,backup@uni-freiburg.de |
|||
groupname: projectgroup |
|||
</pre> |
</pre> |
||
* Or actively take over the reminders as the new responsible person: |
|||
Then you only need: <tt>ws_allocate myWs 30</tt> |
|||
$ ws_allocate -r 7 -u alice -x myWs 0 # Redirect reminders to yourself |
|||
=== List Group Workspaces === |
|||
=== After the owner has left === |
|||
See all workspaces from your group: |
|||
If the workspace was created with <tt>-G groupname</tt>, a group member can keep it alive: |
|||
$ ws_list -g |
|||
$ ws_list -g # Find group workspaces |
|||
This shows workspaces that were created with <tt>-g</tt> or <tt>-G</tt> by anyone in your group. |
|||
$ ws_allocate -x -u formercolleague myWs 100 # Extend (while still restorable) |
|||
If the workspace has already expired, an authorized group member or administrator can restore it: |
|||
=== Extend Group Workspace === |
|||
$ ws_restore -u formercolleague -l # List their restorable workspaces |
|||
Anyone in the group can extend a group-writable workspace (<tt>-G</tt>): |
|||
$ ws_allocate newname 100 |
|||
$ ws_restore -u formercolleague formercolleague-myWs-0 newname |
|||
=== Workspaces without group access === |
|||
$ ws_extend myWs 30 # If you created it |
|||
$ ws_allocate -x -u username myWs 30 # If colleague created it |
|||
If the workspace was created without <tt>-g</tt>/<tt>-G</tt>, contact the HPC support team for assistance during the grace period (30 days after expiry). |
|||
Replace <tt>username</tt> with the workspace owner's username. This is useful when they're unavailable. |
|||
== Reminders == |
|||
Reminders are automatic. The notification goes to your identity provider email address. |
|||
Customize reminder timing at workspace creation: |
|||
$ ws_allocate -r 7 myWs 100 # Reminder 7 days before expiry |
|||
Custom email address: |
|||
$ ws_allocate -m custom@example.com myWs 100 |
|||
Update reminder timing (or take over reminders) without extending: |
|||
$ ws_allocate -r 7 -x myWs 0 # Change timing only |
|||
$ ws_allocate -r 7 -u alice -x myWs 0 # Take over reminders for Alice's workspace |
|||
The last command is useful when taking responsibility for a colleague's workspace. |
|||
== Quotas & Limits == |
|||
{| class="wikitable" |
|||
|- |
|||
!style="width:35%" | Parameter |
|||
!style="width:65%" | Value |
|||
|- |
|||
|Default lifetime |
|||
|30 days |
|||
|- |
|||
|Maximum lifetime |
|||
|100 days |
|||
|- |
|||
|Maximum extensions |
|||
|100 times |
|||
|- |
|||
|Storage quota |
|||
|5 TiB per workspace |
|||
|- |
|||
|Grace period (expired workspaces) |
|||
|30 days (recoverable with <tt>ws_restore</tt>) |
|||
|- |
|||
|Grace period (released workspaces) |
|||
|next nightly expirer run ('''not reliably recoverable''') |
|||
|} |
|||
Check quota: |
|||
You can update reminder settings and take over responsibility for reminders on a colleague's workspace: |
|||
$ nemoquota # HOME + workspace quotas |
|||
$ ws_allocate -r 7 -u username -x myWs 0 # Update reminder time and take over |
|||
$ df --si $(ws_find myWs) # Size of a specific workspace |
|||
Released workspaces count toward quota until the nightly cleanup runs. Use <tt>ws_release --delete-data</tt> for immediate relief ('''irreversible'''). |
|||
This changes the reminder timing to 7 days before expiration and redirects reminder emails to you instead of the original creator. Useful when you're taking over responsibility for a shared workspace. |
|||
== Best Practices == |
|||
=== Why Use Group Workspaces? === |
|||
# Set up <tt>~/.ws_user.conf</tt> — defaults save time and prevent mistakes |
|||
* Simple collaboration: Everyone can access the same data |
|||
# Use <tt>-G groupname</tt> for research data — essential for handover and collaboration |
|||
* No permission problems: Files automatically get group permissions |
|||
# Create workspaces on the login node — use <tt>ws_find</tt> in job scripts, don't create inside jobs |
|||
* Independent extensions: Team members can extend without original creator |
|||
# Monitor with <tt>ws_list -Rr</tt> — sort by remaining time to catch workspaces about to expire |
|||
# Archive before expiry — workspaces are not backed up |
|||
# Clean up finished workspaces — <tt>ws_release</tt> frees quota and reduces clutter |
|||
Single-node temporary files belong in <tt>$TMPDIR</tt>, not workspaces. |
|||
'''For advanced sharing options''' (sharing with specific users outside your group, ACL-based methods), see the [[Workspaces/Advanced_Features#Cooperative_Usage_.28Group_Workspaces_and_Sharing.29|Advanced Features guide]]. |
|||
Latest revision as of 17:58, 12 May 2026
For basic daily usage see the main Workspaces guide.
Creating Workspaces
$ ws_allocate myWs 100
Returns the workspace path, e.g. /work/classic/$USER-myWs. Running the same command again is safe — it returns the existing workspace path.
Capture path in variable:
$ WORKSPACE=$(ws_allocate myWs 100) $ cd "$WORKSPACE"
Common options:
$ ws_allocate -g myWs 100 # Group-readable workspace $ ws_allocate -G projectgroup myWs 100 # Group-writable workspace $ ws_allocate -r 7 myWs 100 # Reminder 7 days before expiry $ ws_allocate -c "ML training data" myWs 100 # Add comment (shown in ws_list -l) $ ws_allocate -x myWs 100 # Extend existing workspace $ ws_allocate -x -u alice myWs 100 # Extend Alice's group workspace $ ws_allocate -r 7 -x myWs 0 # Update reminder only (no extension)
| Option | Description |
|---|---|
| -g | Group-readable workspace |
| -G <groupname> | Group-writable workspace. Set default in ~/.ws_user.conf |
| -m <email> | Custom email for reminders (overrides identity provider email) |
| -r <days> | Reminder n days before expiration |
| -c <comment> | Comment shown in ws_list -l |
| -x | Extend existing workspace |
| -u <username> | Target another user's workspace (requires -G) |
Using workspaces in batch jobs:
Create the workspace once on the login node, then use ws_find in the job script:
#!/bin/bash #SBATCH --job-name=my_job WORKSPACE=$(ws_find myProject) cd "$WORKSPACE" ./my_program --input input.dat --output results.dat
User Defaults: ~/.ws_user.conf
Set defaults so you never forget important options. The file is in YAML format:
duration: 100 reminder: 7 groupname: projectgroup
Important: The first line must be a setting, not a comment. Some versions interpret a leading # as an email address.
With the config above, ws_allocate myWs automatically creates a 100-day workspace with a 7-day reminder for the default group — no extra flags needed.
| Setting | Description |
|---|---|
| duration: | Default lifetime in days |
| reminder: | Days before expiration for reminder |
| groupname: | Default group for -G (see Sharing) |
| mail: | Override notification email (optional) |
Listing Workspaces
$ ws_list # All your workspaces $ ws_list -Rr # Sort by remaining time (soonest first) $ ws_list -g # Include group workspaces
Example output:
id: myWs workspace directory : /work/classic/$USER-myWs remaining time : 6 days 23 hours creation time : Thu Apr 17 09:23:41 2025 expiration time : Mon May 26 09:23:41 2025 available extensions : 98
| Option | Description |
|---|---|
| -l | Long listing (shows creation time, comment, extensions remaining) |
| -R | Show remaining time as human-readable |
| -r | Reverse sort order |
| -s | Sort by creation time |
| -g | Include group workspaces (not just owned) |
Finding Workspace Paths
Returns the full path — primarily useful in scripts:
$ ws_find myWs /work/classic/$USER-myWs
$ WORKSPACE=$(ws_find myWs) $ cd "$WORKSPACE"
Extending Workspaces
$ ws_extend myWs 100 # Extend by 100 days (same as ws_allocate -x)
Note: Expiry is recalculated from now. Extending too early reduces remaining time; extending near expiry gives maximum benefit.
Group members can extend each other's workspaces:
$ ws_allocate -x -u alice myWs 100 # Requires workspace created with -G
Each extension uses one of the 100 available extensions. Check remaining extensions with ws_list -l.
Releasing Workspaces
$ ws_release myWs
The workspace directory is immediately moved out of reach. The data is permanently deleted at the next nightly expirer run — ws_restore is possible until then.
Do not rely on being able to restore a released workspace. If you have important data, archive it before releasing.
--delete-data skips even that window and deletes immediately (cannot be restored). Only use this if you are certain the data is no longer needed.
Restoring Workspaces
Restore workspaces that expired naturally (reached end of lifetime) within the 30-day grace period:
$ ws_restore -l # (1) List restorable workspaces $ ws_allocate restored 100 # (2) Create target workspace $ ws_restore username-myWs-0 restored # (3) Restore
Use the full name from ws_restore -l (includes username prefix and timestamp), not the short name.
Released workspaces (deleted with ws_release) can be restored with ws_restore until the next nightly expirer run — after that they are permanently deleted.
If the workspace is not listed, it has been permanently deleted — not recoverable by anyone.
| Option | Description |
|---|---|
| -l | List restorable workspaces |
| -u <username> | Restore another user's workspace (requires permission) |
Workspace Links
Creates a directory of symlinks to all your workspaces for quick navigation:
$ ws_register ~/workspaces $ ls ~/workspaces/ myWs -> /work/classic/$USER-myWs
Re-run after creating new workspaces to keep the links up to date.
Sharing
NEVER use chmod 777 / chmod o+rwx! Making workspaces world-readable is a security policy violation — use the methods below.
Group workspaces (recommended)
$ ws_allocate -g myWs 100 # Group-readable (read-only for group) $ ws_allocate -G projectgroup myWs 100 # Group-writable (recommended for teams)
Set groupname in ~/.ws_user.conf so you don't have to type it every time.
Benefits: team members can extend the workspace, ws_list -g shows it to everyone in the group, and new files automatically inherit group ownership.
Read-only sharing after creation
Share an existing workspace read-only with specific users outside your group:
$ ws_share share myWs alice bob # Grant read access $ ws_share unshare myWs alice # Remove access $ ws_share list myWs # Show who has access
ACLs (per-user fine-grained)
Use setfacl when -g/-G and ws_share don't cover your needs.
$ DIR=$(ws_find my_workspace)
$ setfacl -Rm user:alice:rX,default:user:alice:rX "$DIR" # Read-only for alice $ setfacl -Rm user:bob:rwX,default:user:bob:rwX "$DIR" # Read-write for bob $ getfacl "$DIR" # View current ACLs $ setfacl -Rb "$DIR" # Remove all ACLs
-R recursive, default: makes new files inherit the ACL, X execute only on dirs/executables.
Workspace Handover
When a team member leaves or transfers a project, their workspaces can be handed over without data loss.
Preparation (before someone leaves)
-G groupname can only be set at creation time. Always create shared research data with it from the start:
$ ws_allocate -G projectgroup -c "ML training data – contact alice" myWs 100
This ensures:
- Group members can see the workspace with ws_list -g
- Any group member can extend it: ws_allocate -x -u alice myWs 100
- Data remains accessible after the original owner's account is deactivated
To ensure someone else receives expiry reminders, there are two options:
- Add their email to ~/.ws_user.conf of the owner (or use -m email at allocate time):
mailaddress: alice@uni-freiburg.de,backup@uni-freiburg.de
- Or actively take over the reminders as the new responsible person:
$ ws_allocate -r 7 -u alice -x myWs 0 # Redirect reminders to yourself
After the owner has left
If the workspace was created with -G groupname, a group member can keep it alive:
$ ws_list -g # Find group workspaces $ ws_allocate -x -u formercolleague myWs 100 # Extend (while still restorable)
If the workspace has already expired, an authorized group member or administrator can restore it:
$ ws_restore -u formercolleague -l # List their restorable workspaces $ ws_allocate newname 100 $ ws_restore -u formercolleague formercolleague-myWs-0 newname
Workspaces without group access
If the workspace was created without -g/-G, contact the HPC support team for assistance during the grace period (30 days after expiry).
Reminders
Reminders are automatic. The notification goes to your identity provider email address.
Customize reminder timing at workspace creation:
$ ws_allocate -r 7 myWs 100 # Reminder 7 days before expiry
Custom email address:
$ ws_allocate -m custom@example.com myWs 100
Update reminder timing (or take over reminders) without extending:
$ ws_allocate -r 7 -x myWs 0 # Change timing only $ ws_allocate -r 7 -u alice -x myWs 0 # Take over reminders for Alice's workspace
The last command is useful when taking responsibility for a colleague's workspace.
Quotas & Limits
| Parameter | Value |
|---|---|
| Default lifetime | 30 days |
| Maximum lifetime | 100 days |
| Maximum extensions | 100 times |
| Storage quota | 5 TiB per workspace |
| Grace period (expired workspaces) | 30 days (recoverable with ws_restore) |
| Grace period (released workspaces) | next nightly expirer run (not reliably recoverable) |
Check quota:
$ nemoquota # HOME + workspace quotas $ df --si $(ws_find myWs) # Size of a specific workspace
Released workspaces count toward quota until the nightly cleanup runs. Use ws_release --delete-data for immediate relief (irreversible).
Best Practices
- Set up ~/.ws_user.conf — defaults save time and prevent mistakes
- Use -G groupname for research data — essential for handover and collaboration
- Create workspaces on the login node — use ws_find in job scripts, don't create inside jobs
- Monitor with ws_list -Rr — sort by remaining time to catch workspaces about to expire
- Archive before expiry — workspaces are not backed up
- Clean up finished workspaces — ws_release frees quota and reduces clutter
Single-node temporary files belong in $TMPDIR, not workspaces.