Next: registerGUID
Up: Catalog Commands
Previous: registerFile
  Contents
usage: edg-replica-manager registerFile SURL [options]
Register a file that already is on a Grid-aware store. It returns the GUID
with which the file was registered. Optionally an LFN may be given as well.
-l,--logical-file-name <lfn> The logical file name to register this file
with
Arguments:
SURL The SURL of the file to register.
Register a file in the Replica Catalog that is already stored
on a Storage Element.
Semantics
The source file needs to be a qualified storage file name URI,
following the rule
srm://storage.element.host/path/file.name
The logical name is optional; it may declare a logical identifier that
can be used later to look up any instance of the file. The method
returns the GUID, the Grid Unique IDentifier of the file. The details are:
- If the source file is not registered yet:
- no logical name is given: a new GUID is generated, the file is registered
and the GUID is returned to the caller.
- a logical name is given: a new GUID will be allocated and returned,
and the logical name will also be registered and can be used to
retrieve the file later.
- If the file is already registered:
- no logical name is given: the GUID that already exists is returned.
- a logical name is given that does not exist yet:
it is added as an alias in the Replica Catalog so
that the file can be looked up later using that name as well.
- a logical name is given which already exists: it is checked whether the
logical name really corresponds to the file. If not, an
exception is thrown, otherwise the existing GUID is returned.
This method does not include any data movement (i.e. the
storage file is not copied) and assumes that the storage file
is already located at a known Storage Element. If the SURL does not
exist on the SE, the command fails.
By specifying an SURL that is already registered, this method can
be used to add a new alias to it (in addition to the addAlias command)
Arguments
- SURL
- The file to be registered. It must be a valid
Storage URL, i.e. the host part of the given URI needs
to be a recognized Storage Element, as described above.
Options
- logical-file-name
- The logical alias to be included in the
catalog. Using this LFN the file may be retrieved as well, in addition
to its GUID. If this option is omitted, the GUID will be the only name
by which the file can be retrieved.
Return value
The call returns 0 on success and -1 on failure and prints the GUID with
which this file was registered to stdout.
Errors
The call can fail for many reasons. Some of the reasons are:
- The user has no/expired credentials.
- The SURL does not exist.
- The SURL or logical-file-name is an invalid URI.
- The RLS or RMC are unattainable or ill-configured.
Next: registerGUID
Up: Catalog Commands
Previous: registerFile
  Contents
2005-02-04