EOS Namespace Injection
Deprecated
This page is deprecated and may contain information that is no longer up to date.
Introduction¶
The cta-eos-namespace-inject
tool is a general purpose tool for injecting files that are on tape with valid CTA catalogue metadata into EOS. Two examples of usage are:
- Migration to CTA, where the catalogue has been populated with the correct metadata.
- Moving a file from one EOS instance to another.
Procedure¶
The metadata migration to CTA involves two main parts:
- Populate the CTA catalogue with all tape-related metadata. Set a dummy instance name when populating the CTA catalogue before using the tool. If you are moving a file from one EOS instance to another, setting a dummy is not necessary.
- Run the
cta-eos-namespace-inject
tool for injection of files into EOS.
To use the tool call:
cta-eos-namespace-inject --json/-j <json-path>
where the JSON file is a text file with one JSON object for each line. The tool will check if the metadata for a file is consistent with what is found in the CTA catalogue. Example of JSON file:
{"eosPath": <path>, "diskInstance": <instance>, "archiveId": <id>,
"size": <size>, "checksumType": <checksum>, "checksumValue": <value>}
{"eosPath": <path>, "diskInstance": <instance>, "archiveId": <id>,
"size": <size>, "checksumType": <checksum>, "checksumValue": <value>}
{"eosPath": <path>, "diskInstance": <instance>, "archiveId": <id>,
"size": <size>, "checksumType": <checksum>, "checksumValue": <value>}
The container in which a file will be injected must be set up before running the tool.
The tool should be run from the frontend as it needs access to both EOS and the catalogue. This means that cta-cli.conf
and eos.grpc.keytab
must be copied to the frontend. cta-cli
should be placed in /etc/cta
, while the location of eos.grpc.keytab
should be specified in cta-frontend-xrootd.conf
.
For authentication you must have a way of communicating with mgm
as well as a valid gRPC key for communication with EOS.
To set up kerberos for the frontend:
- Check that a keytab file for the CTA admin user is present, in this example
/root/
- Run kinit:
KRB5CCNAME=/tmp/${CTAADMIN_USER}/krb5cc_0 kinit -kt /root/${CTAADMIN_USER}.keytab ${CTAADMIN_USER}@TEST.CTA
To set up gRPC for communication between the frontend and EOS:
- Make sure that you have the correct gRPC key in
eos.grpc.keytab
- Add a gRPC gateway:
eos -r 0 0 vid add gateway ${FRONTEND_IP} grpc
Make sure to remove access that is not required by the frontend after using the tool. You can check that the migration was successful by retrieving the migrated files.
For details please refer to the tool`s specific command line arguments and/or configuration files.