NEMO2/Workspaces/Advanced Features: Difference between revisions
m (M Janczyk moved page Workspaces/Advanced Features to NEMO2/Workspaces/Advanced Features) |
mNo edit summary |
||
| Line 1: | Line 1: | ||
For basic daily usage see the main [[NEMO2/Workspaces|Workspaces]] guide. |
|||
__TOC__ |
|||
== Almost Complete Command Reference == |
|||
== Creating Workspaces == |
|||
$ ws_allocate myWs 100 |
|||
Returns the workspace path, e.g. <tt>/work/classic/$USER-myWs</tt>. |
|||
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) |
|||
{| 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 with custom email |
|||
|Group-writable workspace. Set default in <tt>~/.ws_user.conf</tt> |
|||
|<tt>ws_allocate -m custom@example.com -r 3 myWs 30</tt> |
|||
|- |
|- |
||
|<tt>-m <email></tt> |
|||
|Create group-writable workspace |
|||
|Custom email for reminders (overrides identity provider email) |
|||
|<tt>ws_allocate -G groupname myWs 30</tt> |
|||
|- |
|- |
||
|<tt>-r <days></tt> |
|||
|Create on specific filesystem |
|||
|Reminder n days before expiration |
|||
|<tt>ws_allocate -F filesystem myWs 30</tt> |
|||
|- |
|- |
||
|<tt>-c <comment></tt> |
|||
|List all your workspaces |
|||
|<tt>ws_list</tt> |
|Comment shown in <tt>ws_list -l</tt> |
||
|- |
|- |
||
|<tt>-x</tt> |
|||
|List by remaining time |
|||
|Extend existing workspace |
|||
|<tt>ws_list -R</tt> |
|||
|- |
|- |
||
|<tt>-u <username></tt> |
|||
|List available filesystems |
|||
| |
|Target another user's workspace (requires <tt>-G</tt>) |
||
|} |
|||
'''Using workspaces in batch jobs:''' |
|||
Create the workspace once on the login node, then use <tt>ws_find</tt> in the job script: |
|||
<pre> |
|||
#!/bin/bash |
|||
#SBATCH --job-name=my_job |
|||
WORKSPACE=$(ws_find myProject) |
|||
cd "$WORKSPACE" |
|||
./my_program --input input.dat --output results.dat |
|||
</pre> |
|||
=== User Defaults: ~/.ws_user.conf === |
|||
Set defaults so you never forget important options. The file is in YAML format: |
|||
<pre> |
|||
duration: 100 |
|||
reminder: 7 |
|||
groupname: projectgroup |
|||
</pre> |
|||
<div style="border: 3px solid #dc3545; padding: 15px; background-color: #f8d7da; margin: 10px 0;"> |
|||
'''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. |
|||
{| class="wikitable" |
|||
|- |
|||
!style="width:25%" | Setting |
|||
!style="width:75%" | Description |
|||
|- |
|- |
||
|<tt>duration:</tt> |
|||
|Find workspace path |
|||
|Default lifetime in days |
|||
|<tt>ws_find myWs</tt> |
|||
|- |
|- |
||
|<tt>reminder:</tt> |
|||
|Extend workspace by 40 days |
|||
|Days before expiration for reminder |
|||
|<tt>ws_extend myWs 40</tt> or <tt>ws_allocate -x myWs 40</tt> |
|||
|- |
|- |
||
|<tt>groupname:</tt> |
|||
|Share with another user |
|||
|Default group for <tt>-G</tt> (see [[#Sharing|Sharing]]) |
|||
|<tt>ws_share share myWs username</tt> |
|||
|- |
|- |
||
|<tt>mail:</tt> |
|||
|List shared users |
|||
|Override notification email (optional) |
|||
|<tt>ws_share list myWs</tt> |
|||
|} |
|||
== Listing Workspaces == |
|||
$ ws_list # All your workspaces |
|||
$ ws_list -Rr # Sort by remaining time (soonest first) |
|||
$ ws_list -g # Include group workspaces |
|||
Example output: |
|||
<pre> |
|||
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 |
|||
</pre> |
|||
{| class="wikitable" |
|||
|- |
|- |
||
!style="width:15%" | Option |
|||
|Send calendar reminder |
|||
!style="width:85%" | Description |
|||
|<tt>ws_send_ical myWs user@example.com</tt> |
|||
|- |
|- |
||
|<tt>-l</tt> |
|||
|Release workspace |
|||
|Long listing (shows creation time, comment, extensions remaining) |
|||
|<tt>ws_release myWs</tt> |
|||
|- |
|- |
||
|<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 == |
|||
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 <tt>ws_list -l</tt>. |
|||
== 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 — <tt>ws_restore</tt> is possible until then. |
|||
<div style="border: 3px solid #dc3545; padding: 15px; background-color: #f8d7da; margin: 10px 0;"> |
|||
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. |
|||
== 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 <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" |
|||
|- |
|||
!style="width:20%" | Option |
|||
!style="width:80%" | Description |
|||
|- |
|||
|<tt>-l</tt> |
|||
|List restorable workspaces |
|List restorable workspaces |
||
|<tt>ws_restore -l</tt> |
|||
|- |
|- |
||
|<tt>-u <username></tt> |
|||
|Register workspace links |
|||
|Restore another user's workspace (requires permission) |
|||
|<tt>ws_register ~/workspaces</tt> |
|||
|} |
|} |
||
== |
== Workspace Links == |
||
Creates a directory of symlinks to all your workspaces for quick navigation: |
|||
=== Commands === |
|||
$ ws_register ~/workspaces |
|||
* '''[[Workspaces/Advanced_Features/ws_allocate|ws_allocate]]''' - Create and extend workspaces (detailed options) |
|||
$ ls ~/workspaces/ |
|||
* '''[[Workspaces/Advanced_Features/ws_list|ws_list]]''' - List workspaces (sorting, filtering) |
|||
myWs -> /work/classic/$USER-myWs |
|||
* '''[[Workspaces/Advanced_Features/ws_find|ws_find]]''' - Find workspace paths for scripts |
|||
* '''[[Workspaces/Advanced_Features/ws_extend|ws_extend]]''' - Extend workspace lifetime |
|||
* '''[[Workspaces/Advanced_Features/ws_release|ws_release]]''' - Release (delete) workspaces with immediate deletion options |
|||
* '''[[Workspaces/Advanced_Features/ws_restore|ws_restore]]''' - Restore expired or released workspaces |
|||
* '''[[Workspaces/Advanced_Features/ws_register|ws_register]]''' - Create symbolic links to workspaces |
|||
Re-run after creating new workspaces to keep the links up to date. |
|||
=== Configuration & Features === |
|||
== Sharing == |
|||
* '''[[Workspaces/Advanced_Features/Filesystems|Multiple Filesystem Locations]]''' - Choosing the right filesystem for your workload |
|||
* '''[[Workspaces/Advanced_Features/Reminders|Reminders & Configuration]]''' - Email reminders and ~/.ws_user.conf setup |
|||
* '''[[Workspaces/Advanced_Features/Sharing|Sharing Workspaces]]''' - Group workspaces, ws_share, ACLs, Unix permissions |
|||
* '''[[Workspaces/Advanced_Features/Quotas|Quotas & Limits]]''' - Cluster-specific limits and checking quotas |
|||
<div style="border: 3px solid #dc3545; padding: 15px; background-color: #f8d7da; margin: 10px 0;"> |
|||
=== Best Practices === |
|||
'''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) === |
|||
* '''[[Workspaces/Advanced_Features/Best_Practices|Best Practices]]''' - Recommendations for different use cases |
|||
$ ws_allocate -g myWs 100 # Group-readable (read-only for group) |
|||
== Quick Navigation == |
|||
$ ws_allocate -G projectgroup myWs 100 # Group-writable (recommended for teams) |
|||
Set <tt>groupname</tt> in <tt>~/.ws_user.conf</tt> so you don't have to type it every time. |
|||
=== By Task === |
|||
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. |
|||
'''Creating and Managing:''' |
|||
* Create workspace → [[Workspaces#Create_Workspace|Basic]] | [[Workspaces/Advanced_Features/ws_allocate|Advanced]] |
|||
* List workspaces → [[Workspaces#List_Your_Workspaces|Basic]] | [[Workspaces/Advanced_Features/ws_list|Advanced]] |
|||
* Extend lifetime → [[Workspaces#Extend_Workspace_Lifetime|Basic]] | [[Workspaces/Advanced_Features/ws_extend|Advanced]] |
|||
* Release workspace → [[Workspaces#Release_.28Delete.29_Workspace|Basic]] | [[Workspaces/Advanced_Features/ws_release|Advanced]] |
|||
* Restore workspace → [[Workspaces#Restore_Workspace|Basic]] | [[Workspaces/Advanced_Features/ws_restore|Advanced]] |
|||
=== Read-only sharing after creation === |
|||
'''Collaboration:''' |
|||
* Work with groups → [[Workspaces#Work_with_Groups_.28Share_Workspaces.29|Basic]] | [[Workspaces/Advanced_Features/Sharing#Group_Workspaces|Advanced]] |
|||
Share an existing workspace read-only with specific users outside your group: |
|||
* Share with users → [[Workspaces/Advanced_Features/Sharing#Sharing_with_ws_share|ws_share]] | [[Workspaces/Advanced_Features/Sharing#ACLs:_Access_Control_Lists|ACLs]] | [[Workspaces/Advanced_Features/Sharing#Regular_Unix_Permissions|Unix Permissions]] |
|||
$ 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 <tt>setfacl</tt> when <tt>-g</tt>/<tt>-G</tt> and <tt>ws_share</tt> 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 |
|||
<tt>-R</tt> recursive, <tt>default:</tt> makes new files inherit the ACL, <tt>X</tt> 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) === |
|||
<tt>-G groupname</tt> 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 <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: |
|||
* Add their email to <tt>~/.ws_user.conf</tt> of the owner (or use <tt>-m email</tt> at allocate time): |
|||
<pre> |
|||
mailaddress: alice@uni-freiburg.de,backup@uni-freiburg.de |
|||
</pre> |
|||
* 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 <tt>-G groupname</tt>, 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 <tt>-g</tt>/<tt>-G</tt>, 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 == |
|||
{| 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: |
|||
'''Configuration:''' |
|||
* Email reminders → [[Workspaces/Advanced_Features/Reminders|Reminders]] |
|||
* Default settings → [[Workspaces/Advanced_Features/Reminders#Configuration_File:_.7E.2F.ws_user.conf|~/.ws_user.conf]] |
|||
* Workspace links → [[Workspaces/Advanced_Features/ws_register|ws_register]] |
|||
$ nemoquota # HOME + workspace quotas |
|||
'''Resources:''' |
|||
$ df --si $(ws_find myWs) # Size of a specific workspace |
|||
* Filesystem selection → [[Workspaces/Advanced_Features/Filesystems|Filesystems]] |
|||
* Check quotas → [[Workspaces/Advanced_Features/Quotas#Checking_Workspace_Quotas|Quota Commands]] |
|||
* Cluster limits → [[Workspaces/Advanced_Features/Quotas|Quotas & Limits]] |
|||
Released workspaces count toward quota until the nightly cleanup runs. Use <tt>ws_release --delete-data</tt> for immediate relief ('''irreversible'''). |
|||
=== By Experience Level === |
|||
== Best Practices == |
|||
'''Beginners:''' |
|||
* Start with the main [[Workspaces]] guide |
|||
* Review [[Workspaces/Advanced_Features/Best_Practices|Best Practices]] |
|||
# Set up <tt>~/.ws_user.conf</tt> — defaults save time and prevent mistakes |
|||
'''Intermediate Users:''' |
|||
# Use <tt>-G groupname</tt> for research data — essential for handover and collaboration |
|||
* [[Workspaces/Advanced_Features/Filesystems|Choose optimal filesystem]] |
|||
# Create workspaces on the login node — use <tt>ws_find</tt> in job scripts, don't create inside jobs |
|||
* [[Workspaces#Work_with_Groups_.28Share_Workspaces.29|Set up group workspaces]] |
|||
# Monitor with <tt>ws_list -Rr</tt> — sort by remaining time to catch workspaces about to expire |
|||
* [[Workspaces/Advanced_Features/ws_allocate#Using_Workspaces_in_Batch_Jobs|Use in batch jobs]] |
|||
# Archive before expiry — workspaces are not backed up |
|||
* [[Workspaces/Advanced_Features/ws_restore#Helix-specific_-_Workspace_Snapshots|Snapshot recovery (Helix)]] |
|||
# Clean up finished workspaces — <tt>ws_release</tt> frees quota and reduces clutter |
|||
Single-node temporary files belong in <tt>$TMPDIR</tt>, not workspaces. |
|||
'''Advanced Users:''' |
|||
* [[Workspaces/Advanced_Features/Sharing|Advanced sharing methods]] (ACLs) |
|||
* [[Workspaces/Advanced_Features/ws_release#Immediate_Deletion_.28Free_Quota_Instantly.29|Immediate deletion for quota management]] |
|||
* Set up [[Workspaces/Advanced_Features/Reminders#Configuration_File:_.7E.2F.ws_user.conf|~/.ws_user.conf]] |
|||
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.