NORDUGRID-MEMO-10

NorduGrid Replica Location Server Cheatsheet

Introduction

Below is a list of basic examples showing how to manipulate the records in the Globus Replica Location Server (RLS). Only authorised RLS managers can perform operations which require write access. For details, contact

NorduGrid makes use of the Globus RLS. It relies on a simple relational database that does not support data sets or collections. An RLS record consists of a logical file names (LFN) which corresponds to one or more physical files (PFN). Each logical file has also an associated set of attributes, such as size, checksum, GUID etc.

LFNs are usually just file names, e.g.
dc2.003007.simul.A1_z_ee._00001.pool.root,
because the Grid can not guess what logical name one would assign to a file.

PFNs are transport, "normal" URLs of the files, e.g.
gsiftp://dc4.uio.no/dc2/dc2.003007.simul.A1_z_ee._00002.pool.root.4.
Each LFN can have several PFNs.

NorduGrid RLS has special storage service records that represent not files, but storage facilities. This allows to index storage facilities and helps the Grid to locate destinations for output files. These storage service records have a special format: they have fixed "LFN" __storage_service__. Storage service PFNs include complete path to the expected file destination, thus resembling a collection, e.g.
gsiftp://hive-storage.unicc.chalmers.se:2811/storage/data.
Regular users are not advised to create or remove such.

There are two ways of working with RLS: interactively, which means you only authenticate yourself once per session, or issuing a separate command for every operation.

START INTERACTIVE SESSION:
globus-rls-cli -u rls://rls.nordugrid.org:39281

Examples below show both interactive (marked I:) and command-line (C:) variants of every instruction; server rls://rls.nordugrid.org:39281 is used as an example, replace it with your favorite server name:port combination

Below, strings lfn or pfn have to be typed just like this, "lfn" or "pfn", while <lfn> and <pfn> have to be replaced with actual LFNs and PFNs.

Reading information

Show all possible attribute names for LFNs

I: attribute show - lfn
C: globus-rls-cli attribute show - lfn rls://rls.nordugrid.org:39281

Show the value of attribute "dq_guid" for a LFN

I: attribute query <lfn> dq_guid lfn
C: globus-rls-cli attribute query <lfn> <attribute-name> lfn rls://rls.nordugrid.org:39281

Show the values of all attributes for a LFN

I: attribute query <lfn> - lfn
C: globus-rls-cli attribute query <lfn> - lfn rls://rls.nordugrid.org:39281

Show all the storage services (special LFN, compare with below)

I: query lrc lfn __storage_service__
C: globus-rls-cli query lrc lfn __storage_service__ rls://rls.nordugrid.org:39281

Show PFNs for LFN

I: query lrc lfn <lfn>
C: globus-rls-cli query lrc lfn <lfn> rls://rls.nordugrid.org:39281

Show LFN for a PFN

I: query lrc pfn <pfn>
C: globus-rls-cli query lrc pfn <pfn> rls://rls.nordugrid.org:39281

Wildcard version of the above

I: query wildcard lrc lfn *3014*
C: globus-rls-cli query wildcard lrc lfn '<pattern>' rls://rls.nordugrid.org:39281

Modifying records

Create an lfn-pfn pair (where the lfn did not exist beforehand):

I: create <lfn> <pfn>
C: globus-rls-cli create <lfn> <pfn> rls://rls.nordugrid.org:39281

Add a pfn to an already existing lfn:

I: add <lfn> <pfn>
C: globus-rls-cli add <lfn> <pfn> rls://rls.nordugrid.org:39281

Delete a pfn from a lfn:

Note: if the last PFN is removed, the LFN is also removed, so there's no reverse of the create operation!

I: delete <lfn> <pfn>
C: globus-rls-cli delete <lfn> <pfn> rls://rls.nordugrid.org:39281

Define an lfn attribute in the RLS-server:

Note: <attribute-type> usually is "string".

I: attribute define <attribute-name> lfn <attribute-type>
C: globus-rls-cli attribute define <attribute-name> lfn <attribute-type> rls://rls.nordugrid.org:39281

Add an attribute plus value to an lfn:

I: attribute add <lfn> <attribute-name> lfn <attribute-type> <attribute-value>
C: globus-rls-cli attribute add <lfn> <attribute-name> lfn <attribute-type> <attribute-value> rls://rls.nordugrid.org:39281

Add a SE (compare with adding a PFN to an existing LFN):

I: add __storage_service__ gsiftp://hive-storage.unicc.chalmers.se:2811/storage/data
C: globus-rls-cli add __storage_service__ gsiftp://hive-storage.unicc.chalmers.se:2811/storage/data rls://rls.nordugrid.org:39281

Remove a SE (compare with removing a PFN from an LFN):

I: delete __storage_service__ gsiftp://hive-storage.unicc.chalmers.se:2811/storage/data
C: globus-rls-cli delete __storage_service__ gsiftp://hive-storage.unicc.chalmers.se:2811/storage/data rls://rls.nordugrid.org:39281

NorduGrid homepage