dCache is one of the standard data access protocols on the GRID. The files is identified by a URL of the form:-
dcap://?host:?port/?path/?file
e.g. dcap://dcache-head.gridpp.rl.ac.uk:22125/pnfs/gridpp.rl.ac.uk/tape/minos/nwest/test/LVJ_F00034638_0000.mdaq.root
A dCache server can just be a pool of disks but often attached tape
storage. In the later case files migrate to tape transparently; they
appear to be on disk to commands that list them but are retrieved
automatically when access to their contents is required.The native protocol is dcap but it can be accessed using several protocols:-
ls -l /pnfs/gridpp.rl.ac.uk/data/minos/nwest/test/LVJ_F00034638_0000.mdaq.rootso long as the dcap library has been preloaded e.g.
setenv LD_PRELOAD libpdcap.so(but be careful of using the ls command, you are really doing a database query so it's O.K. for specific files (even if there is a tape store back-end and the file has migrated to tape) but not so good on large directories).
You can use the cp and mv commands files, however, at least in September 2006 this did not appear reliable with failures such as:-
cp: skipping file `/pnfs/gridpp.rl.ac.uk/data/minos/mc_production/beam_out/gaf/n11001005_0011_L150200.fz_gaf', as it was replaced while being copiedso it's better to use dccp (see below).
Use the mkdir command to create directories.
dccp dcm_t1_LVJ_F00034638_0000.mdaq.root /pnfs/gridpp.rl.ac.uk/tape/minos/minosmc/test/
/pnfs/gridpp.rl.ac.uk/tape/minos/nwest/test/LVJ_F00034638_0000.mdaq.rootand consider access from within the RAL firewall i.e. RAL Tier 1 and Tier 2
There are the following ways to access a data file locally using dcap.
/pnfs/gridpp.rl.ac.uk/tape/minos/nwest/test/LVJ_F00034638_0000.mdaq.rootAs of September 2006 with current ROOT (5.13/03) with
setenv LD_PRELOAD /opt/d-cache/dcap/lib/libpdcap.soIt does work from the RAL Tier 1 UI.
The job aborts after starting on RAL Tier 1 WNs.
The file appears as if on an NFS mounted disk so this method cannot be used from RAL Tier 2.
dcap://dcache-head.gridpp.rl.ac.uk:22125/pnfs/gridpp.rl.ac.uk/tape/minos/nwest/test/LVJ_F00034638_0000.mdaq.rootROOT version 5 has a TDCacheFile which is a plug-in for the standard TFile so should work with ROOT. Chris Brew suspects that TDcacheFile is quicker than LD_PRELOAD because it calls dcap directly rather than intercept standard POSIX calls. The TDCacheFile need not be called explicitly, instead the generic TFile::Open can be called passing it the file name as a supported URL:-
dcache:/pnfs/<path>/<file>.root
or dcap://<nodename.org>/<path>/<file>.root
and have it automatically load the required plug-in. For example:-
TFile* f = TFile::Open("dcache:/pnfs/gridpp.rl.ac.uk/data/minos/nwest/test/LVJ_F00034638_0000.mdaq.root")
From outside the firewall only GSIFTP is available. I haven't tried using that yet.
DCACHE_USE_UNSAFE=truedramatically improves writing speed but is only recommended when copying files and and not for unreproducible sources (e.g. direct output of application). See "Q: Is it possible to tune library parameters of the preload library?" of Questions and Answers about dCache, and void dc_unsafeWrite(int dest) of C - API to the dCache Access Protocol (dcap) It has no effect if using dccp.
Service endpoints:-
https://dcache.gridpp.rl.ac.uk:8443/srm/managerv1.wsdl?/pnfs/gridpp.rl.ac.uk/data/<vo>
https://dcache-tape.gridpp.rl.ac.uk:8443/srm/managerv1.wsdl?/pnfs/gridpp.rl.ac.uk/tape/<vo>
Paths:
/pnfs/gridpp.rl.ac.uk/data/<vo>/ (disk pool owned by a single experiment)
/pnfs/gridpp.rl.ac.uk/tape/<vo>/ (disk pool shared by all experiments)
For MINOS:-
/pnfs/gridpp.rl.ac.uk/tape/minos 10TB multiple servers (but shared by all experiments)
Files are staged to /exportstage1/minos-dcache1 on csfnfs58
/pnfs/gridpp.rl.ac.uk/data/minos .1TB one server
The SURL (Storage URL) of a file
can be derrived from the path by prepending the service endpoint
machine and port i.e.
srm://dcache.gridpp.rl.ac.uk:8443
and srm://dcache-tape.gridpp.rl.ac.uk:8443
so for example
/pnfs/gridpp.rl.ac.uk/tape/minos/nwest/test/LVJ_F00034638_0000.mdaq.root
becomes srm://dcache-tape.gridpp.rl.ac.uk:8443/pnfs/gridpp.rl.ac.uk/tape/minos/nwest/test/LVJ_F00034638_0000.mdaq.root
This is useful with the srm-get-metadata command to check the
state of a file, and in particular, for dcache-tape, whether it is on
disk:-
srm-get-metadata srm://dcache-tape.gridpp.rl.ac.uk:8443/pnfs/gridpp.rl.ac.uk/tape/minos/nwest/test/LVJ_F00034638_0000.mdaq.root returns:- ... isPinned :false isPermanent :true isCached :falseThere doesn't appear to be anyway to force a file out of the cache.