Using the Grid/Replication

From BiGGrid Wiki
Jump to: navigation, search
  • Problem: You want to replicate a file to all the existing storage elements
  • Solution: Use the following script.
  • Precondition: You must have set LFC_HOST to and have started a valid GridSession.
startGridSession [voname]

The script for replication:


# For debugging:
set -x

# Minimal input check:
if [ $# -ne 2 ]; then
        echo "Usage: $0 <filename> <lfn>" >&2
        exit 1

# Build a list of all SE's on the Grid:
        lcg-infosites --vo lsgrid se | grep -Po '\b\S+$' | grep '\.'

# Delete all replica's of the file (if there are any):
lcg-del -a lfn:$2
# Copy-and-register the file in the default SE:
lcg-cr -l "$2" "$1" || exit 2
# Replicate the file over all SE's:
for se in $SES; do
        lcg-rep -d $se --vo lsgrid lfn:$2

See also

Vbrowser a tool that can be used for replication as well.

Personal tools