- Infos im HLRS Wiki sind nicht rechtsverbindlich und ohne Gewähr -
- Information contained in the HLRS Wiki is not legally binding and HLRS is not responsible for any damages that might result from its use -

Workspace migration: Difference between revisions

From HLRS Platforms
Jump to navigationJump to search
 
(158 intermediate revisions by 9 users not shown)
Line 1: Line 1:


== User migration on new workspaces ==


{{Warning
| text = This page describe the necessary steps to migrate workspaces to the new filesystems.<br/>
End of 2021 all data on the old vulcan ws2 filesystems will be deleted. Follow the below guide to transfer your data to the new ws3 filesystems.
}}
== User migration to new workspaces ==
On vulcan cluster a new workspace filesystem (ws3) has been integrated. The currently existing workspace file system (ws2) will be shut down by the end of the year 2021.
Now, users have to migrate their workspaces located on the old filesystems onto the new filesystem. Run the command ''ws_list -a'' on a frontend system to display the path for all your workspaces, if path names match mount points in the following table, these workspaces need to
be migrated to the new filesystem.


In December 2016 the workspaces installed in 2011 with the Cray Xe6 System Hermit will be replaced. In preparation for this task, users have to migrate their workspaces onto the replacement filesystems. Run the command ''ws_list -a'' on a frontend system to display the path for all your workspaces, if path names matches workspaces in following table, this workspace needs to
be migrated.


{|Class=wikitable
{|Class=wikitable
|-
|-
! File System  
! File System  
! alias
! mounted on
! mounted on
|-
|-
| ws1
| NEC_lustre
| univ_1
| /lustre/nec/ws2
| /lustre/cray/ws1
|-
| ws2
| ind_1
| /lustre/cray/ws2
|-
| ws3
| univ_2
| /lustre/cray/ws3
|-
| ws4
| res_1
| /lustre/cray/ws4
|-
| ws5
| ind_2
| /lustre/cray/ws5
|-
| ws6
| res_2
| /lustre/cray/ws6
|-
|-
|}
|}


== before you start ==
== Before you start ==


Migration for large amount of data consumes a lot of IO ressources. '''Please review and remove  
Migration for large amount of data consumes a lot of IO ressources. '''Please review and remove data not needed any more or move it into [[High_Performance_Storage_System_(HPSS)| HPSS]].'''
data which you do not need any more.'''


== How to proceed ( Version 1) ==
== How to proceed ==


* Users have got access to the replacement Workspaces. To find out which one, try following command:
* from <Font color=red>October 4th 2021 10:00</Font> on new workspaces will be allocated on the replacement filesystem. Existing workspaces will be listed further on.  
** ''ws_allocate –F ws7  test_ws 5''   # if this command run successful, you should prepare your Jobs using this workspace and submit all new compute Jobs utilizing this workspace.
* workspaces located on old filesystems can not be extended anymore.
** If above command fails, following command should work: ''ws_allocate –F ws8 test _ws  5''      #  if not contact your project supervisor.  
* if you have to migrate data from workspaces on one to another filesystems, do not use the ''mv'' command to transfer data. For large amount of data, this will fail due to time limits. Currently we recommend for e.g. millions of small files or for large amount of data to use following command inside a single node batch job: ''rsync -a --hard-links  Old_ws/   new_ws/''  
* Run all new submitted Jobs within workspaces in the new location.  
* You can try to use the [[Workspace_migration#Using_mpifileutils_for_data_transfer | mpifileutils '''dcp''' or '''dsync''']]
* Migrate data from the “old” location into the fresh created workspace (please double check this target directory is located in either ws7 or ws8 directory tree).
* take care when you create new batch jobs. If you have to migrate your workspace from an old filesystem to the new location, this takes time. Do not run any job while the migration process is active. This may result in inconsistent data.
to migrate we suggest following command:
* On <Font color=red>November 3rd 2021</Font> the “old” workspaces on ws2 will be disconnected from the vulcan compute nodes. The filesystems will be available on the frontend systems for some further days.
''rsync -a Old_ws  new_ws''
* <Font color=red>November 2021</font> all data on the old filesystems will be deleted.
* On November 7th 2016 the default will be changed. Please ensure your jobs are using the new workspace directory
* On December 7th the “old” workspaces ws1, … ws6 will be disconnected from the Cray system. The Filesystems will be available on the frontend systems for data migration until 11th January 2017
*January 15th 2017 all data on the old filesystems will be deleted.


== Operation of the workspaces on ws3: ==


== How to proceed  ( Version 2) ==
* No job of any group member will be scheduled for computation as long as the group quota is exceeded.
* accounting
* max. lifetime of a workspace is currently 60 days
* default lifetime of a workspace is 1 day
* please read related man pages or online [[Workspace_mechanism | workspace mechanism document]]<BR>
: in particular note that the workspace tools allow to explicitly address a specific workspace file system using the <tt>-F</tt> option (e.g. <tt>ws_allocate -F ws3 my_workspace 10</tt>)
* to list your available workspace file systems use <tt>ws_list -l</tt>
* users can restore expired workspaces using ''ws_restore''


* On October, 25th 2016 new workspaces will be allocated on the replacment filesystems. Available workspace will be listed also on the old filesystems.
Please read https://kb.hlrs.de/platforms/index.php/Storage_usage_policy
* workspaces on old filesystems could not be extended.
* if you have to migrate data from workspaces located in a different filesystem, do not use the mv command to transfer data. For large amount of data, this will fail. We recomment using following command: ''rsync -a ??? Old_ws  new_ws''
* take care when you create new batch jobs. If you have to migrate your workspace from from an old filesystem to the new location, this take some time to transfer large amount of data. Do not run any Job while the migration process is active. This may result in incosistant data.  
* On December 7th the “old” workspaces ws1, … ws6 will be disconnected from the Cray system. The Filesystems will be available on the frontend systems for data migration until 11th January 2017
*January 15th 2017 all data on the old filesystems will be deleted.


== Using mpifileutils for data transfer ==
This mpifileutils suite provides MPI-based tools to handle typical jobs like copy, remove, and compare for large  datasets, providing speedups of up to 50x compared to single process jobs. It can only be run on compute nodes via mpirun.


== Using a parallel copy for data transfer ==
dcp or dsync is similar to cp -r or rsync; simply give it a source directory and destination and dcp / dsync will recursively copy the source directory to the destination in parallel.


pcp is a python based parallel copy using MPI. It can only be run on compute nodes via aprun.
dcp / dsync has a number of useful options; use dcp -h or dsync -h to see a description or use the [[https://mpifileutils.readthedocs.io/en/v0.11/ User Guide]]


pcp is similar to cp -r; simply give it a source directory and destination and pcp will recursively copy the source directory to the destination inparallel.
It should be invoked via mpirun.


pcp has a number of useful options; use pcp -h to see a description.
We highly recommend to use dcp / dsync with an empty ~/.profile and ~/.bashrc only! Furthermore, take care that only the following modules are loaded when using mpifileutils (this can be achieved by logging into the system without modifying the list of modules and loading the tools/mpifileutils module only): <br>
1) system/pbs/19.1.1(default) <br>
2) system/batchsystem/auto <br>
3) system/site_names <br>
4) system/ws/1.3.5b(default) <br>
5) system/wrappers/1.0(default) <br>
6) mpi/ucx/1.8.1 <br>
7) tools/binutils/2.32 <br>
8) compiler/gnu/9.2.0(default) <br>
9) mpi/openmpi/4.0.5-gnu-9.2.0(default) <br>
10) tools/mpifileutils <br>


This program traverses a directory tree and copies files in the tree in parallel. It does not copy individual files in parallel. It should be invoked via aprun.


=== Basic arguments ===


If run with the '''-l''' flag or '''-lf''' flags pcp will be stripe aware.
=== dcp ===
-l will cause stripe information to be copied from the source files and directories.
Parallel MPI application to recursively copy files and directories.
-lf will cause all files and directories on the destination to be striped, regardless of the striping on the source.


Striping behavior can be further modified with -ls and -ld.  
dcp is a file copy tool in the spirit of cp(1) that evenly distributes the work of scanning the directory tree, and copying file data across a large cluster without any centralized state. It is designed for copying files that are located on a distributed parallel file system, and it splits large file copies across multiple processes.
A minimum file size can be set with -ls.
Files below this size will not be striped, regardless of the source striping.  


-ld will cause all directories to be unstriped.
Run '''dcp''' with the '''-p''' option to preserve permissions and timestamps, and ownership.<br>


-b C: Copy files larger than C Mbytes in C Mbyte chunks
'''-p'''  : preserve permissions and timestamps, and ownership


== Algorithm ==
'''--chunksize C''': Copy files larger than C Bytes in C Byte chunks (default ist 4MB)


pcp runs in two phases:
We highly recommend using the '''-p''' option.
Phase I is a parallel walk of the file tree, involving all MPI ranks in a peer-to-peer algorithm. The walk constructs the list of files to be copied and creates the destination directory hierarchy.


In phase II, the actual files are copied. Phase II uses a master-slave algorithm.
=== dsync ===
R0 is the master and dispatches file copy instructions to the slaves (R1...Rn).
Parallel MPI application to synchronize two files or two directory trees.


== Job Script example ==
dsync makes DEST match SRC, adding missing entries from DEST, and updating existing entries in DEST as necessary so that SRC and DEST have identical content, ownership, timestamps, and permissions.
There is a job script example located /opt/hlrs/wrappers/bin/pcp.qsub


/opt/hlrs/wrappers/bin> cat pcp.qsub
'''--chunksize C''': Copy files larger than C Bytes in C Byte chunks (default ist 4MB)
!/bin/bash
#PBS -N IO_copy_test
#PBS -l nodes=8
#PBS -l walltime=0:30:00
#PBS -joe


cd $PBS_O_WORKDIR


module load tools/python/2.7.8
=== Job Script example ===
Here is an example of a job script.


SOURCEDIR=<YOUR SOURCE DIRECTORY HERE>
You have to change the SOURCEDIR and TARGETDIR according to your setup.
TARGETDIR=<YOUR TARGET DIRECTORY HERE>
Also the number of nodes and wallclock time should be adjusted.


/usr/bin/time -p aprun -n 192 -N24 -d1  ~/.local/bin/pcp -ls 1048576  -b 4194304 $SOURCEDIR $TARGETDIR
/opt/hlrs/wrappers/bin>


== Operation of the workspaces will be changed: ==
#!/bin/bash
 
#PBS -N parallel-copy
* To create a workspace or extend an existent workspace, an interactive shell is necessary.
#PBS -l select=2:node_type=hsw:mpiprocs=20
* Due to a drop of performance on high usage of quota, no job of any group member will be scheduled for computation as long as the group quota exceeds 80%. All blocked group members get a notice by E-mail (if a valid address is registered)
#PBS -l walltime=00:20:00
* accounting
* werden wir eine längere Laufzeit zulassen? Denke wir sollten, schon wegen 4 Wochen Urlaub... wie wäre es mit 60 Tagen???
module load tools/mpifileutils
 
Please read https://kb.hlrs.de/platforms/index.php/Storage_usage_policy
SOURCEDIR=<YOUR SOURCE DIRECTORY HERE>
TARGETDIR=<YOUR TARGET DIRECTORY HERE>
sleep 5
nodes=$(cat $PBS_NODEFILE | sort -u | wc -l)
let cores=nodes*20
time_start=$(date "+%c  :: %s")
#mpirun -np $cores dcp -p --bufsize 8MB ${SOURCEDIR}/ ${TARGETDIR}/
  mpirun -np $cores dsync --bufsize 8MB $SOURCEDIR $TARGETDIR
time_end=$(date "+%c  :: %s")
tt_start=$(echo $time_start | awk {'print $9'})
tt_end=$(echo $time_end | awk {'print $9'})
(( total_time=$tt_end-$tt_start ))
echo "Total runtime in seconds: $total_time"

Latest revision as of 13:39, 26 April 2022


Warning: This page describe the necessary steps to migrate workspaces to the new filesystems.
End of 2021 all data on the old vulcan ws2 filesystems will be deleted. Follow the below guide to transfer your data to the new ws3 filesystems.


User migration to new workspaces

On vulcan cluster a new workspace filesystem (ws3) has been integrated. The currently existing workspace file system (ws2) will be shut down by the end of the year 2021. Now, users have to migrate their workspaces located on the old filesystems onto the new filesystem. Run the command ws_list -a on a frontend system to display the path for all your workspaces, if path names match mount points in the following table, these workspaces need to be migrated to the new filesystem.


File System mounted on
NEC_lustre /lustre/nec/ws2

Before you start

Migration for large amount of data consumes a lot of IO ressources. Please review and remove data not needed any more or move it into HPSS.

How to proceed

  • from October 4th 2021 10:00 on new workspaces will be allocated on the replacement filesystem. Existing workspaces will be listed further on.
  • workspaces located on old filesystems can not be extended anymore.
  • if you have to migrate data from workspaces on one to another filesystems, do not use the mv command to transfer data. For large amount of data, this will fail due to time limits. Currently we recommend for e.g. millions of small files or for large amount of data to use following command inside a single node batch job: rsync -a --hard-links Old_ws/ new_ws/
  • You can try to use the mpifileutils dcp or dsync
  • take care when you create new batch jobs. If you have to migrate your workspace from an old filesystem to the new location, this takes time. Do not run any job while the migration process is active. This may result in inconsistent data.
  • On November 3rd 2021 the “old” workspaces on ws2 will be disconnected from the vulcan compute nodes. The filesystems will be available on the frontend systems for some further days.
  • November 2021 all data on the old filesystems will be deleted.

Operation of the workspaces on ws3:

  • No job of any group member will be scheduled for computation as long as the group quota is exceeded.
  • accounting
  • max. lifetime of a workspace is currently 60 days
  • default lifetime of a workspace is 1 day
  • please read related man pages or online workspace mechanism document
in particular note that the workspace tools allow to explicitly address a specific workspace file system using the -F option (e.g. ws_allocate -F ws3 my_workspace 10)
  • to list your available workspace file systems use ws_list -l
  • users can restore expired workspaces using ws_restore

Please read https://kb.hlrs.de/platforms/index.php/Storage_usage_policy

Using mpifileutils for data transfer

This mpifileutils suite provides MPI-based tools to handle typical jobs like copy, remove, and compare for large datasets, providing speedups of up to 50x compared to single process jobs. It can only be run on compute nodes via mpirun.

dcp or dsync is similar to cp -r or rsync; simply give it a source directory and destination and dcp / dsync will recursively copy the source directory to the destination in parallel.

dcp / dsync has a number of useful options; use dcp -h or dsync -h to see a description or use the [User Guide]

It should be invoked via mpirun.

We highly recommend to use dcp / dsync with an empty ~/.profile and ~/.bashrc only! Furthermore, take care that only the following modules are loaded when using mpifileutils (this can be achieved by logging into the system without modifying the list of modules and loading the tools/mpifileutils module only):
1) system/pbs/19.1.1(default)
2) system/batchsystem/auto
3) system/site_names
4) system/ws/1.3.5b(default)
5) system/wrappers/1.0(default)
6) mpi/ucx/1.8.1
7) tools/binutils/2.32
8) compiler/gnu/9.2.0(default)
9) mpi/openmpi/4.0.5-gnu-9.2.0(default)
10) tools/mpifileutils


dcp

Parallel MPI application to recursively copy files and directories.

dcp is a file copy tool in the spirit of cp(1) that evenly distributes the work of scanning the directory tree, and copying file data across a large cluster without any centralized state. It is designed for copying files that are located on a distributed parallel file system, and it splits large file copies across multiple processes.

Run dcp with the -p option to preserve permissions and timestamps, and ownership.

-p  : preserve permissions and timestamps, and ownership

--chunksize C: Copy files larger than C Bytes in C Byte chunks (default ist 4MB)

We highly recommend using the -p option.

dsync

Parallel MPI application to synchronize two files or two directory trees.

dsync makes DEST match SRC, adding missing entries from DEST, and updating existing entries in DEST as necessary so that SRC and DEST have identical content, ownership, timestamps, and permissions.

--chunksize C: Copy files larger than C Bytes in C Byte chunks (default ist 4MB)


Job Script example

Here is an example of a job script.

You have to change the SOURCEDIR and TARGETDIR according to your setup. Also the number of nodes and wallclock time should be adjusted.


#!/bin/bash
#PBS -N parallel-copy
#PBS -l select=2:node_type=hsw:mpiprocs=20
#PBS -l walltime=00:20:00

module load tools/mpifileutils

SOURCEDIR=<YOUR SOURCE DIRECTORY HERE>
TARGETDIR=<YOUR TARGET DIRECTORY HERE>

sleep 5
nodes=$(cat $PBS_NODEFILE | sort -u | wc -l)
let cores=nodes*20

time_start=$(date "+%c  :: %s")
#mpirun -np $cores dcp -p --bufsize 8MB ${SOURCEDIR}/ ${TARGETDIR}/
mpirun -np $cores dsync --bufsize 8MB $SOURCEDIR $TARGETDIR
time_end=$(date "+%c  :: %s")

tt_start=$(echo $time_start | awk {'print $9'})
tt_end=$(echo $time_end | awk {'print $9'})
(( total_time=$tt_end-$tt_start ))
echo "Total runtime in seconds: $total_time"