Skip to content

EOS Namespace Injection

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:

  1. Migration to CTA, where the catalogue has been populated with the correct metadata.
  2. Moving a file from one EOS instance to another.

Procedure

The metadata migration to CTA involves two main parts:

  1. 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.
  2. 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:

  1. Check that a keytab file for the CTA admin user is present, in this example /root/
  2. 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:

  1. Make sure that you have the correct gRPC key in eos.grpc.keytab
  2. 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.