Skip to content
This repository has been archived by the owner on Feb 20, 2024. It is now read-only.

Is file migrated on tape? #7

Closed
chaen opened this issue Dec 10, 2013 · 14 comments
Closed

Is file migrated on tape? #7

chaen opened this issue Dec 10, 2013 · 14 comments

Comments

@chaen
Copy link

chaen commented Dec 10, 2013

Hi,

I wanted to use the python API against the castor storage at CERN. With the nsls command, you can know whether a file has been replicated with the "m" flag. Is there a way to get the same information from pyxrootd? The Offline flag from the StatInfo tells you whether the file is not on disk, but is irrelevant if it is on disk and tape. And I am not quite sure, but I think that PoscPending means that we are waiting for the replication to happen. So how can I know whether the file is on disk AND on tape?

Thanks a lot!

@esindril
Copy link
Contributor

Hi,

At this point (2.1.14) this information is not provided by the CASTOR XRootD plugin.
We are looking into this functionality to be added maybe in the next major release.

Cheers,
Elvin

@chaen
Copy link
Author

chaen commented Dec 10, 2013

Thanks for the quick answer. Actually I was wondering if xrootd was directly supported by castor or if it was a plugin? Do you know if there is a way to get the info via the standard xrootd cli for the time being?
Thanks!

@ljanyst
Copy link
Contributor

ljanyst commented Dec 10, 2013

Technically CASTOR-XRootD is a server-side plugin to the XRootD framework, exporting the CASTOR data to XRootD users. So, as far as the clients are concerned, CASTOR can be seen as any other XRootD service. XRootD cli has various ways of sending "custom" queries to the server, but the server needs to know how to answer them, and this functionality is not provided for the time being.

@ljanyst
Copy link
Contributor

ljanyst commented Dec 10, 2013

Furthermore, the cli uses the same underlying API as xrootd-python.

@chaen
Copy link
Author

chaen commented Dec 10, 2013

Okay, thanks for the answers

@chaen
Copy link
Author

chaen commented Dec 11, 2013

In the same topic, I did not find any way to specify the service class in the python API. Did I miss it in the doc, or is this functionality not present yet? I can open another ticket for that if needed.

Cheers,
Chris

@ljanyst
Copy link
Contributor

ljanyst commented Dec 11, 2013

Hi Chris,

when using CopyProcess, you can add the service class as a part of the URL CGI. Ie.

process.add_job( 'root://localhost//tmp/spam?svcClass=<svcClass>', '/tmp/spam3' )

Cheers,
Lukasz

@chaen
Copy link
Author

chaen commented Dec 12, 2013

Excellent, thank you! May I suggest you to specify this in the doc? :-)

Cheers,
Chris

@ljanyst
Copy link
Contributor

ljanyst commented Dec 12, 2013

Passing parameters in the URL is an XRootD functionality, but this particular parameter is specific to Castor an meaningless in general context, so this should end up in the Castor docs. I will ask the relevant people to do this.

@esindril
Copy link
Contributor

It is already documented here:
https://twiki.cern.ch/twiki/bin/view/DataManagement/X2CASTOR

@chaen
Copy link
Author

chaen commented Dec 12, 2013

Yes, they document the -OS and -OD options for xrdcp cli, but I did not know that we could pass it that way in the python API. Thanks

@ljanyst
Copy link
Contributor

ljanyst commented Dec 16, 2013

OK, I see where the confusion comes from. -OS and -OD do nothing more than appending the CGI string to the URL. @esindril perhaps the other syntax should be used throughout the docs in order to be consistent with other apps (including ROOT).

@ljanyst
Copy link
Contributor

ljanyst commented Jun 18, 2014

XRootD as of version 4.0.0 has a kXR_bkpexists flag. This will be reflected in XRootD.client.responses.StatInfo.flags as XRootD.client.flags.StatInfoFlags.BACKUP_EXISTS in XRootD-Python 0.2.1.

@esindril can you please make sure that the appropriate modifications are made in Castor 2.1.15 to set this flag?

@ljanyst ljanyst added the done label Jun 18, 2014
@esindril
Copy link
Contributor

Done. Will be enabled once there is a XRootD release supporting these flags.
https://git.cern.ch/web/CASTOR.git/commit/32a050b0c94a0b0b707c2d4ce0d4d9a2ad7f7cc8

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants