HI Alessandra
You have to resolve the namespace entry to the actual disk replicas.
The way to do this via MySQL is to use the name in the metadata table
to find the fileid, then lookup the replica table to get the disk
replicas.
e.g.,
mysql> select m.name, r.sfn from Cns_file_replica as r,
Cns_file_metadata as m where r.fileid=m.fileid and m.name='atlas-
production-12.0.3-1_i686_slc3_gcc323.tar.gz';
+---------------------------------------------------
+-----------------------------------------------------------------------
-------------------------------------------+
| name |
sfn
|
+---------------------------------------------------
+-----------------------------------------------------------------------
-------------------------------------------+
| atlas-production-12.0.3-1_i686_slc3_gcc323.tar.gz |
disk034.gla.scotgrid.ac.uk:/gridstore2/atlas/2006-10-26/atlas-
production-12.0.3-1_i686_slc3_gcc323.tar.gz.2404.0 |
+---------------------------------------------------
+-----------------------------------------------------------------------
-------------------------------------------+
1 row in set (9.77 sec)
Then you can see if the replica actually exists on disk.
Of course if you have files of the same name then this is less useful
- you have to use the parentid entry in the metadata table to walk
down through the directories and recreate the full surl.
I'm afraid there's no tool that I know to automate this, but clearly
their should be. My DPM utils package (http://www.gridpp.ac.uk/wiki/
DPM_Utilities) goes the other way (replica->surl) and that code could
easily be adapted (it's walking the namespace to reconstruct the full
SURL which is the tricky bit and this is done).
cheers
graeme
On 3 Dec 2007, at 12:18, Alessandra Forti wrote:
> Hi
>
> is there any tool to know if the file is still on a dpm system even
> if lcg-cp failes? Or is it garantueed that if lcg-cp failes the
> file is not anymore on dpm?
>
> thanks
>
> cheers
> alessandra
--
Dr Graeme Stewart - http://wiki.gridpp.ac.uk/wiki/User:Graeme_stewart
ScotGrid - http://www.scotgrid.ac.uk/ http://scotgrid.blogspot.com/
|