BinAC2/Migrate BinAC 1 workspaces to BinAC 2 workspaces: Difference between revisions

From bwHPC Wiki
Jump to navigation Jump to search
(Created page with "<!-- {|style="background:#ffa833; width:100%;" |style="padding:5px; background:##ffa833; text-align:left"| center|25px |style="padding:5px; background:#ffa833; text-align:left"| BinAC 2 workspaces are currently limited to 5 TB per workspace. Larger workspaces should be split up first. |} --> __TOC__ = Preamble = == Remove unnecessary data == Now is a good possibility getting rid of unnecessary data. Don't migrate data to BinAC 2 that you know...")
 
No edit summary
 
Line 34: Line 34:
-P: keep partially transferred files
-P: keep partially transferred files
--progress: show progress during transfer
--progress: show progress during transfer
--dry-run: perform a trial run that doesn’t make any changes (and produces mostly the same output as a real run)
</pre>
</pre>


Line 41: Line 42:
|style="padding:5px; background:#ffa833; text-align:left"|
|style="padding:5px; background:#ffa833; text-align:left"|
Mind trailing <code>/</code> in the commands. They make a big difference when working with <code>rsync</code> !
Mind trailing <code>/</code> in the commands. They make a big difference when working with <code>rsync</code> !
|}


{|style="background:#ffa833; width:100%;"
|style="padding:5px; background:##ffa833; text-align:left"|
[[Image:Attention.svg|center|25px]]
|style="padding:5px; background:#ffa833; text-align:left"|
If you are unsure, run <code>rsync</code> add the <code>--dry-run</code> to your rsync command. This makes <code>rsync</code> perform a trial run that doesn’t make any changes (and produces mostly the same output as a real run).
|}
|}



Latest revision as of 09:17, 7 July 2025


Preamble

Remove unnecessary data

Now is a good possibility getting rid of unnecessary data. Don't migrate data to BinAC 2 that you know you won't ever touch again. Instead backup it if needed and delete it from BinAC 1.

BinAC 2 storage architecture

Please read about the BinAC 2 file systems and understand the difference between project and work file system before migrating any data.

About rsync

You will use rsync for migrating your data from BinAC 1 to BinAC 2. You may want to use the following options:

-a: archive mode; equals -rlptgoD (no -H, -A, -X)
-h: output numbers in a human-readable format
-x: don't cross filesystem boundaries
-z: compress file data during the transfer
-P: keep partially transferred files
--progress: show progress during transfer
--dry-run: perform a trial run that doesn’t make any changes (and produces mostly the same output as a real run)
Attention.svg

Mind trailing / in the commands. They make a big difference when working with rsync !


Attention.svg

If you are unsure, run rsync add the --dry-run to your rsync command. This makes rsync perform a trial run that doesn’t make any changes (and produces mostly the same output as a real run).

About screen and tmux

It is recommended to migrate data in a screen or tmux session, as the migration may take a while. You can detach from the session by pressing Ctrl+A, D (Ctrl+B, D, for tmux). You can reattach to the session by running screen -r (tmux attach). You can cancel the migration by pressing Ctrl+C.

# For screen users:
# start a screen session
screen -S migratebinacws

# start data migration, commands see below

# detach from the screen session
Ctrl+A, D
# reattach to the screen session
screen -r migratenemo1ws
# cancel migration, if needed
Ctrl+C
# exit screen session, when done
Ctrl+D

# For tmux users:
# start a tmux session
tmux new -s migratebinacws

# start data migration, commands see below

# detach from the tmux session
Ctrl+B, D
# reattach to the tmux session
tmux attach -t migratenemo1ws
# cancel migration, if needed
Ctrl+C
# exit tmux session, when done
Ctrl+D

Migration

All commands assume that you are logged in on BinAC 1 and you also have a working account on BinAC 2.

Migrate BinAC 1 shared folder

If you used a directory at /beegfs/work for sharing data with people from the same compute project you can sync this directory to the new project file system at /pfs/10/project/.

Depending on how you want to organize your data in the new project file system we will give some example commands:

This command will copy the content of the shared directory on BinAC 1 into the project directory on BinAC 2:

rsync -ahxzP --progress /beegfs/work/<your shared directory>/* ${USER}@login.binac2.uni-tuebingen.de:/pfs/10/project/<RV acronym>/

This command will copy the shared directory on BinAC 1 into the projet directory on BinAC 2. E.g. it will create a subdirectory /pfs/10/project/<RV acronym>/

rsync -ahxzP --progress /beegfs/work/<your shared directory>/ ${USER}@login.binac2.uni-tuebingen.de:/pfs/10/project/<RV acronym>/<subdir name>

Migrate personal BinAC 1 workspaces

This can be a directory at /beegfs/work or a workspace created by the workspace tools at /beegfs/work/workspace/ws.

If the directory contains data you don't need for computations in the next time, please migrate it to a personal directory in the projects file system: Although project is accessible for every compute project member, you can create directories only you can access. This will save precious space on the fast (but not tinier) BinAC 2 work.

# On BinAC 1
rsync -ahxzP --progress /beegfs/work/workspace/ws/<directory name>/ ${USER}@login.binac2.uni-tuebingen.de:/pfs/10/project/<RV acronym>/<directory name>

# On BinAC 2: Change permissions. Only you can access the directory, nobody else.
chmod 700 /pfs/10/project/<RV acronym>/<directory name>

If the directory contains data you will use for computations it's totally fine to migrate it to BinAC 2 work file system. Please not that (in contrast to BinAC 1) you cannot create directories yourself in the work file system with mkdir. Everything at /pfs/10/work is a workspace managed by the workspace tools.


For each of your workspaces on BinAC 1 you want to migrate you will have to create a workspace on BinAC 2:

ws_allocate <workspace name> 30

You can now sync the files from BinAC 1 to BinAC 2:

This command will copy the content of the workspace on BinAC 1 into the workspace on BinAC 2:

rsync -ahxzP --progress /beegfs/work/workspace/ws/<directory name>/* ${USER}@login.binac2.uni-tuebingen.de:/pfs/10/work/<workspace name>/