release notes | Book: 1.9.5, 1.9.12 (opt, FHS), 2.7 (FHS), 2.8 (FHS), 2.9 (FHS), 2.10 (FHS), 2.11 (FHS), 2.12 (FHS), 2.13 (FHS), | Wiki | Q&A black_bg
Web: Multi-page, Single page | PDF: A4-size, Letter-size | eBook: epub black_bg

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.

lcg-gt queries the BDII information server. 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.

[user] $ lcg-infosites --vo dteam se

[return to top]

The lcg-gt Application

SRM provides a protocol negotiating interface, and returns a TURL (transfer URL). The protocol specified by the client will be returned by the server if the server supports the requested protocol.

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

[user] $ lcg-gt srm://srm-door.example.org/pnfs/example.org/data/dteam/group gsidcap
gsidcap://gsidcap-door.example.org:22128/pnfs/example.org/data/dteam/group
-2147365977
-2147365976

Each of the above three lines contains different information. These are explained below.

gsidcap://gsidcap-door.example.org:22128/pnfs/example.org/data/dteam/group is the transfer URL (TURL).

-2147365977 is the SRM Request Id, Please note that it is a negative number in this example, which is allowed by the specification.

-2147365976 is the Unique identifier for the file with respect to the Request Id. Please note that with this example this is a negative number.

Remember to return your Request Id

dCache limits the number of Request Ids a user may have. All Request Ids should be returned to dCache using the command lcg-sd.

If you use lcg-gt to request a file with a protocol that is not supported by dCache the command will block for some time as dCache’s SRM interface times out after approximately 10 minutes.

[return to top]

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 four 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.

[user] $ lcg-sd srm://srm-door.example.org:22128/pnfs/example.org/data/dteam/group " -2147365977" " -2147365976" 0

Negative numbers

dCache returns negative numbers for Request Id and File Id. Please note that lcg-sd requires that these values are places in double-quotes with a single space before the - sign.

The Request Id is one of the values returned by the lcg-gt command. In this example, the value (-2147365977) comes from the above example lcg-gt.

The File Id is also one of the values returned returned by the lcg-gt command. In this example, the value (-2147365976) comes from the above example lcg-gt.

The direction parameter indicates in which direction data was transferred: 0 for reading data and 1 for writing data.