Last modified 12 years ago Last modified on 11/18/08 12:03:51

Using the lcg commands with dCache

The lcg_util rpm contains many small command line applications which interact with SRM implementations, these where developed independently from dCache and provided by the LCG grid computing effort.

Each command line application operates on a different method of the SRM interface. These applications where not designed for normal use but to provide components upon which operations can be built.

Unfortunately lcg-gt queries the BDII information server for reasons that this author do not understand this is probebly true for other lcg_util applications. This adds an additional requirement that the BDII information server can be found by lcg-gt, please only attempt to contact servers found on your user interface using.

lcg-infosites --vo dteam se

The lcg-gt Application

SRM provides a protocol negotiating interface, and returns a TURL or transfer URL. This TURL is then used to read or write files to dCache. The protocol specified by the client will be returned by the server.

To read a file from dCache using lcg-gt you must specify two parameters the SURL (storage URL), and the protcol (gsidcap or gsiftp) you wish to use to access the file.

$lcg-gt srm:// gsidcap

Each of the three lines has a different meaning the TURL is the first line.


This is the SRM request ID, Please note that it is a negative number in this example, this is allowed by the specification.


Unique identifier to the file with respect to the request Id. Please note that with this eaxmple this is a negative number.


Some times a bug returns less eg

[testuser100@lucan ~]$ lcg-gt srm://  gsiftp

Usage Notes

Each user has a limited number of request Id's available and all used request Id's should be returned to dCache using the command lcg-sd ( see below ). If you use in invalid protocol not supported by dCache this command will block for some time as dCache's SRM interface times out after approximately 10 mins.

The lcg-sd Application

This command should be used to return any TURLS given by dCache's SRM interface, this is because dCache provides a limited number of TURLS available concurrently.

lcg-sd takes 4 parameters, the SURL, the request Id, the file Id with respect to the request Id, and the direction of data transfer. The following example is to complete the get operation, the values are taken form the above example of lcg-gt.

lcg-sd srm:// " -2147365977" " -2147365976" 0

Usage Notes

dCache follows the SRM specification but is the only implementation that returns negative numbers, unfortunately this is not handled cleanly or in a standard way with lcg_util applications, lcg-sd is no exception, please note the above examples places the request Id and the file Id in quotes with a single space before the - sign. For reading a file the value for the direction of data transfer should be set to 0, all other values are for writing data to dCache.