Storage element interaction in general

Introduction

This section describes the interaction with a storage element. After describing the prerequisites, the following scenarios are described:

  • copy local file to a storage element
  • copy a file from a storage element to local disk
  • copy a file from one storage element to another

Please note that any storage element interaction is handled on a file basis. You cannot use any wildcards in the following commands.

Also note that if you are using the csh shell family, you have to enclose all urls of the srmcp commands with single quotes. Shells of the csh family try to interpret the ? character and therefore leave the urls incorrect.

Prerequisites

For storage element interactions you need to have valid GRID credentials and an installed and setup User interface. After GRID authentication you can use the following commands to copy files to / from a storage element.

Note, for the FNAL setup on cmsuaf.fnal.gov, please prepend your path with the binary directory of the locally installed java version before continuing. If you are using the -sh- shell family, do

export PATH=/usr/java/jdk1.5.0_10/bin/:$PATH

and if you are using the csh shell family, do

setenv PATH /usr/java/jdk1.5.0_10/bin/:$PATH

Storage element interactions do not use your local user account on the storage element file system but rather the user account which will be mapped to your GRID certificate. If you never have used your assign directory on the storage element and have local access, it is advisable to set write permission for your user group to ensure proper access via GRID tools. Please refer to instructions for your local setup. As examples, the necessary steps for CERN and FNAL are described in the following

CERN

To setup your CERN are on CASTOR, do

rfmkdir /castor/cern.ch/user/u/username/subdir 
rfchmod +775 /castor/cern.ch/user/u/username/subdir

where u/username has to be replaced by the first letter of your username and the username itself and subdir is the directory which should be used.

FNAL

At FNAL, it is advisable to first use the resilient space which is not written to tape. If needed, the data can be copied to dCache volumes which are under tape backup using a storage element to storage element copy syntax. To setup the resilient space at FNAL, do

mkdir /pnfs/cms/WAX/resilient/username/subdir
chmod +775 /pnfs/cms/WAX/resilient/username/subdir

where username is your username at FNAL and subdir is the directory which should be used.

Copy local file to a storage element

To copy a local file to a storage element, do in the directory of the file

srmcp file:///`pwd`/file srm://<storage element url>:8443//srm/managerv1?SFN=<path on the storage element>/file

and replace storage element url and path on the storage element with the appropriate values. For CERN, do

srmcp file:///`pwd`/file srm://srm-cms.cern.ch:8443//srm/managerv1?SFN=/castor/cern.ch/user/u/username/subdir/file

where u/username has to be replaced by the first letter of your username and the username itself and subdir is the directory which should be used.

At FNAL, do

srmcp file:///`pwd`/file srm://cmssrm.fnal.gov:8443/srm/managerv1?SFN=/resilient/username/subdir/file 

where username is your username at FNAL and subdir is the directory which should be used. Please note that at FNAL, the part: /pnfs/cms/WAX has to be left off from the path on the storage element.

Copy file from a storage element to local disk

To copy a file from a storage element to local disk, do in the directory where you would like to copy the file to:

srmcp srm://<storage element url>:8443//srm/managerv1?SFN=<path on the storage element>/file file:///`pwd`/file 

and replace storage element url and path on the storage element with the appropriate values. For CERN, do

srmcp srm://srm-cms.cern.ch:8443//srm/managerv1?SFN=/castor/cern.ch/user/u/username/subdir/file file:///`pwd`/file 

where u/username has to be replaced by the first letter of your username and the username itself and subdir is the directory which should be used.

At FNAL, do

srmcp srm://cmssrm.fnal.gov:8443/srm/managerv1?SFN=/resilient/username/subdir/file file:///`pwd`/file 

where username is your username at FNAL and subdir is the directory which should be used. Please note that at FNAL, the part: /pnfs/cms/WAX has to be left off from the path on the storage element.

Copy file from one storage element to another storage element

To copy a file from one storage element to another storage element, do:

srmcp srm://<storage element 1 url>:8443//srm/managerv1?SFN=<path on storage element 1>/file srm://<storage element 2 url>:8443//srm/managerv1?SFN=<path on storage element 2>/file

and replace storage element 1(2) url and path on storage element 1(2) with the appropriate values. For CERN to FNAL, do

srmcp srm://srm-cms.cern.ch:8443//srm/managerv1?SFN=/castor/cern.ch/user/u/username/subdir/file srm://cmssrm.fnal.gov:8443/srm/managerv1?SFN=/resilient/username/subdir/file

and from FNAL to CERN, do:

srmcp srm://cmssrm.fnal.gov:8443/srm/managerv1?SFN=/resilient/username/subdir/file srm://srm.cern.ch:8443//srm/managerv1?SFN=/castor/cern.ch/user/u/username/subdir/file

Please replace the appropriate values following above examples.

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r2 - 2008-09-29 - OliverGutsche
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback