Here is a recipe from James Casey (
James.Casey@cernNOSPAMPLEASE.ch) on how to make
srmcopy
work with the DPM :
- Using srmcp to download from castor2
- upload that file from local storage to a dpm
- copy from castor2 to dpm, in 'pushmode'
- download the file from the dpm to local storage.
$/opt/d-cache/srm/bin/srmcp srm://castorgridsc:8443/castor/cern.ch/grid/dteam/storage/transfer-test/castor2/s00/file-test.dat
file:////tmp/foo
$ls -l /tmp/foo
-rw-r--r-- 1 jamesc zg 2364 Sep 27 16:56 /tmp/foo
$/opt/d-cache/srm/bin/srmcp file:////tmp/foo srm://lxfsrm528:8443/dpm/cern.ch/home/dteam/jamesc-foo
$dpns-ls -l /dpm/cern.ch/home/dteam/jamesc-foo
-rw-rw-r-- 1 dteam002 cg 2364 Sep 27 17:01 /dpm/cern.ch/home/dteam/jamesc-foo
$/opt/d-cache/srm/bin/srmcp --debug --pushmode=true
srm://castorgridsc.cern.ch:8443/castor/cern.ch/grid/dteam/storage/transfer-test/castor2/s00/file-test.dat
srm://lxfsrm528:8443/dpm/cern.ch/home/dteam/jamesc-foo-srmcp
Storage Resource Manager (SRM) CP Client version 1.16
Copyright (c) 2002-2005 Fermi National Accelerator Laborarory
SRM Configuration:
debug=true
gsissl=true
help=false
pushmode=true
userproxy=true
buffer_size=2048
tcp_buffer_size=0
stream_num=10
config_file=/afs/cern.ch/user/j/jamesc/.srmconfig/config.xml
glue_mapfile=/opt/d-cache/srm/conf/SRMServerV1.map
webservice_path=srm/managerv1.wsdl
webservice_protocol=https
gsiftpclinet=globus-url-copy
protocols_list=gsiftp
save_config_file=null
srmcphome=/opt/d-cache/srm
urlcopy=bin/urlcopy.sh
x509_user_cert=/afs/cern.ch/user/j/jamesc/.globus/usercert.pem
x509_user_key=/afs/cern.ch/user/j/jamesc/.globus/userkey.pem
x509_user_proxy=/tmp/x509up_u4290
x509_user_trusted_certificates=/afs/cern.ch/user/j/jamesc/.globus/certificates
retry_num=20
retry_timeout=10000
wsdl_url=null
use_urlcopy_script=false
connect_to_wsdl=false
delegate=true
full_delegation=true
from[0]=srm://castorgridsc.cern.ch:8443/castor/cern.ch/grid/dteam/storage/transfer-test/castor2/s00/file-test.dat
to=srm://lxfsrm528:8443/dpm/cern.ch/home/dteam/jamesc-foo-srmcp
=
Tue Sep 27 17:04:35 CEST 2005: starting
SRMCopyPushClient
Tue Sep 27 17:04:35 CEST 2005: SRMClient(https,srm/managerv1.wsdl,true)
Tue Sep 27 17:04:35 CEST 2005: connecting to server
Tue Sep 27 17:04:35 CEST 2005: connected to server, obtaining proxy
SRMClientV1 : connecting to srm at httpg://oplapro58.cern.ch:8443/srm/managerv1
Tue Sep 27 17:04:37 CEST 2005: got proxy of type class org.dcache.srm.client.SRMClientV1
Tue Sep 27 17:04:37 CEST 2005: copying srm://castorgridsc.cern.ch:8443/castor/cern.ch/grid/dteam/storage/transfer-test/castor2/s00/file-test.dat into srm://lxfsrm528:8443/dpm/cern.ch/home/dteam/jamesc-foo-srmcp
SRMClientV1 : copy, srcSURLS[0]="srm://castorgridsc.cern.ch:8443/castor/cern.ch/grid/dteam/storage/transfer-test/castor2/s00/file-test.dat"
SRMClientV1 : copy, destSURLS[0]="srm://lxfsrm528:8443/dpm/cern.ch/home/dteam/jamesc-foo-srmcp"
SRMClientV1 : copy, contacting service httpg://oplapro58.cern.ch:8443/srm/managerv1
Tue Sep 27 17:04:40 CEST 2005: srm returned requestId = 618988755
Tue Sep 27 17:04:40 CEST 2005: sleeping 1 seconds ...
Tue Sep 27 17:04:42 CEST 2005: sleeping 1 seconds ...
Tue Sep 27 17:04:44 CEST 2005: sleeping 1 seconds ...
Tue Sep 27 17:04:45 CEST 2005: sleeping 1 seconds ...
Tue Sep 27 17:04:46 CEST 2005:
FileRequestStatus fileID = 0 is Done => copying of srm://castorgridsc.cern.ch:8443/castor/cern.ch/grid/dteam/storage/transfer-test/castor2/s00/file-test.dat is complete
$/opt/d-cache/srm/bin/srmcp --debug srm://lxfsrm528:8443/dpm/cern.ch/home/dteam/jamesc-foo-srmcp file:////tmp/foo2
Storage Resource Manager (SRM) CP Client version 1.16
Copyright (c) 2002-2005 Fermi National Accelerator Laborarory
SRM Configuration:
debug=true
gsissl=true
help=false
pushmode=false
userproxy=true
buffer_size=2048
tcp_buffer_size=0
stream_num=10
config_file=/afs/cern.ch/user/j/jamesc/.srmconfig/config.xml
glue_mapfile=/opt/d-cache/srm/conf/SRMServerV1.map
webservice_path=srm/managerv1.wsdl
webservice_protocol=https
gsiftpclinet=globus-url-copy
protocols_list=gsiftp
save_config_file=null
srmcphome=/opt/d-cache/srm
urlcopy=bin/urlcopy.sh
x509_user_cert=/afs/cern.ch/user/j/jamesc/.globus/usercert.pem
x509_user_key=/afs/cern.ch/user/j/jamesc/.globus/userkey.pem
x509_user_proxy=/tmp/x509up_u4290
x509_user_trusted_certificates=/afs/cern.ch/user/j/jamesc/.globus/certificates
retry_num=20
retry_timeout=10000
wsdl_url=null
use_urlcopy_script=false
connect_to_wsdl=false
delegate=true
full_delegation=true
from[0]=srm://lxfsrm528:8443/dpm/cern.ch/home/dteam/jamesc-foo-srmcp
to=file:////tmp/foo2
Tue Sep 27 18:02:00 CEST 2005: starting SRMGetClient
Tue Sep 27 18:02:00 CEST 2005: SRMClient(https,srm/managerv1.wsdl,true)
Tue Sep 27 18:02:00 CEST 2005: connecting to server
Tue Sep 27 18:02:00 CEST 2005: connected to server, obtaining proxy
SRMClientV1 : connecting to srm at httpg://lxfsrm528.cern.ch:8443/srm/managerv1
Tue Sep 27 18:02:01 CEST 2005: got proxy of type class org.dcache.srm.client.SRMClientV1
SRMClientV1 : get: surls[0]="srm://lxfsrm528:8443/dpm/cern.ch/home/dteam/jamesc-foo-srmcp"
SRMClientV1 : get: protocols[0]="http"
SRMClientV1 : get: protocols[1]="dcap"
SRMClientV1 : get: protocols[2]="gsiftp"
SRMClientV1 : get, contacting service httpg://lxfsrm528.cern.ch:8443/srm/managerv1
doneAddingJobs is false
copy_jobs is empty
Tue Sep 27 18:02:09 CEST 2005: srm returned requestId = 27373
Tue Sep 27 18:02:09 CEST 2005: sleeping 1 seconds ...
Tue Sep 27 18:02:11 CEST 2005: FileRequestStatus with SURL=srm://lxfsrm528:8443/dpm/cern.ch/home/dteam/jamesc-foo-srmcp is Ready
Tue Sep 27 18:02:11 CEST 2005: received TURL=gsiftp://lxfsrm528.cern.ch/lxfsrm528:/shift/lxfsrm528/data01/cg/2005-09-27/jamesc-foo-srmcp.27372.0
doneAddingJobs is false
copy_jobs is not empty
Tue Sep 27 18:02:11 CEST 2005: fileIDs is empty, breaking the loop
copying CopyJob, source = gsiftp://lxfsrm528.cern.ch/lxfsrm528:/shift/lxfsrm528/data01/cg/2005-09-27/jamesc-foo-srmcp.27372.0 destination = file:////tmp/foo2
GridftpClient: memory buffer size is set to 2048
GridftpClient: connecting to lxfsrm528.cern.ch on port 2811
GridftpClient: gridFTPClient tcp buffer size is set to 0
GridftpClient: gridFTPRead started
GridftpClient: parallelism: 10
GridftpClient: waiting for completion of transfer
GridftpClient: gridFtpWrite: starting the transfer in emode from lxfsrm528:/shift/lxfsrm528/data01/cg/2005-09-27/jamesc-foo-srmcp.27372.0
GridftpClient: DiskDataSink.close() called
GridftpClient: gridFTPWrite() wrote 2364bytes
GridftpClient: closing client : org.dcache.srm.util.GridftpClient$FnalGridFTPClient@4be2cc
GridftpClient: closed client
execution of CopyJob, source = gsiftp://lxfsrm528.cern.ch/lxfsrm528:/shift/lxfsrm528/data01/cg/2005-09-27/jamesc-foo-srmcp.27372.0 destination = file:////tmp/foo2 completed
setting file request 0 status to Done
doneAddingJobs is true
copy_jobs is empty
stopping copier
$ls -l /tmp/foo2
-rw-r--r-- 1 jamesc zg 2364 Sep 27 18:02 /tmp/foo2
--
SophieLemaitre - 04 Oct 2005