> For the complete documentation index, see [llms.txt](https://documentation.atempo.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.atempo.com/miria-4.6/admin-guide/appendix/appendix-h-scality-tape-library-protocol-deployment-and-troubleshooting.md). Agents can also search and read this documentation through its [MCP server](https://documentation.atempo.com/~gitbook/mcp).

# APPENDIX H : Scality Tape Library Protocol : Deployment and Troubleshooting

The protocol used to manage the archiving of cold data from a Scality storage to Miria, as well as the restore and deletion of that data, is called Tape Library Protocol (TLP). This chapter covers the installation, configuration, and troubleshooting of the TLP.

## Scality Tape Library Protocol - Documentation Deployment and troubleshooting

This document aims at helping Scality TLP users with deployment and useful commands

[Introduction to Feature Concepts and Architecture](#introduction-to-feature-concepts-and-architecture)

* [Feature Overview](#feature-overview)
* [Architecture Overview](#architecture-overview)
* [Definitions](#definitions)

[Installing and Configuring the Tape Library Protocol with the Data Management Platform & Scality](#installing-and-configuring-the-tape-library-protocol-with-the-data-management-platform-and-scality)

* [Prerequisites](#prerequisites)
* [Known Limitations](#known-limitations)
* [Configuring the TLP Application in the Data Management Platform](#configuring-the-tlp-application-in-the-data-management-platform)
* [Configuring WebSocket to use SSL (optional)](#configuring-websocket-to-use-ssl-optional)
* [Configuring the TLP Server in Scality Artesca](#configuring-the-tlp-server-in-scality-artesca)
* [Testing Overview](#testing-overview)

[Troubleshooting](#troubleshooting)

* [Web Socket Server Process and Logs](#web-socket-server-process-and-logs)
* [Troubleshooting Tips](#troubleshooting-tips)

### Introduction to Feature Concepts and Architecture

#### Feature Overview

This feature is dedicated to using the Data Management Platform to automatically archive cold objects from a Scality object storage, that is an Artesca SDS (Software Defined Storage) or a RING S3, to a tape library controlled by the Data Management Platform:

* Within the Scality storage, the data is tagged as cold data and a protocol is in charge of automatically triggering the move of the data to cold storage by messaging the Data Management Platform.
* the Data Management Platform is executing the instructions received and seamlessly collecting the cold data on the Scality storage. All metadata are managed by Artesca.
* To make a copy unto an archive repository and archiving policy predefined in the Data Management Platform's configuration. Retentions are managed by Artesca therefore using an unlimited retention in the Data Management Platform, is mandatory.
* And last, confirm the successful archiving to the Scality storage, so the storage clear the object data and record its new location in cold tier storage.

**Key Benefits:**

* Efficient Data Tiering: The combined solution allows organizations to manage data across various storage types efficiently, moving less frequently accessed data to cost-effective storage tiers such as a tape library while keeping critical data on high-performance storage tiers.
* Enhanced Data Transfer and Seamless Integration: The integration leverages Scality's object APIs to boost data transfer rates through parallel access provided by both solutions' architectures. The Data Management Platform functions as a data mover between the Scality Artesca SDS and the tape library, managing retention policies and ensuring seamless media handling.
* Cost-Effective Archiving: Tape storage can be utilized for cold data, reducing storage costs while maintaining accessibility. The data can easily be recalled temporarily by the user via mechanisms native to the Scality storage.

#### Architecture Overview

<figure><img src="https://2203078701-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fw5h0P6nnTAuQFNt2ofjn%2Fuploads%2FXEOsyZb8hiFInNSmwBUT%2Fimage.png?alt=media&amp;token=c121133b-6a7a-42f1-a9bc-2340399cc2f6" alt=""><figcaption></figcaption></figure>

Please note:

* The protocol used to manage the archiving / the restore / the deletion of cold data from the Scality storage to the Data Management Platform is called "Tape Library Protocol" (TLP).
* The TLP protocol includes a built-in retry process and security measures to ensure that data has indeed been archived before it is deleted from the primary storage.
* It also has a mechanism to perform temporary data recall on the primary storage. Note that the recalled data is still considered cold data and is kept only on the primary storage for a short period.
* On Scality storage, TLP client is configured to use the Data Management Platform as its TLP server:
  * The TLP client is natively available with the Artesca storage.
  * It can be deployed with the RING as a "professional service" deployment performed by Scality. Untested so far at the date of publication of this documentation.
  * The TLP Client sends TLP commands to the TLP Server (ie the Data Management Platform side) to archive, restore, delete or monitor objects archiving.
  * The TLP protocol is an existing protocol within the Scality Artesca storage, that was sed to integrate with DMF. This protocol has not been customised to integrate with the Data Management Platform.
* On the Data Management Platform's server, a TLP WebSocket Server is natively installed:
  * It listens for TLP commands from Scality TLP Client on a dedicated port.
  * TLP WebSocket Server interact with the Data Management Platform Engine through Rest API command.
  * A periodically, the Data Management Platform process checks if there is any action to do and start archiving or restore objects.

#### Definitions

* **Transition Workflow**:
  * Is a Scality's term describing the workflow used to move a bucket's data to a cold storage location. Please note, in such a case, the data can no longer be retrieved quickly. A restore request must be made to get a temporary access to the data on the local storage, as the reference instance is still located on the cold storage.
* **Cold object**:
  * An object stored on a Scality object storage and having a storage class classified as a cold backend.
* **Cold storage**:
  * A storage location classified as a cold backend is used for archiving cold data, i.e., data that is not frequently accessed on the Scality object storage and must be moved to a cold tier.
* **TLP Client**:
  * The software component located on the Scality object storage in charge of issuing the TLP commands that are controlling the tiering of cold data to a cold backend.
* **TLP Server:**
  * The software component located on the Data Management Platform server being in charge of executing the TLP commands and tiering (ie copying) the data tagged as cold from the Scality storage to an archive repository.
* **TLP Commands:**
  * Commands sent by the **TLP Client** (ie Scality storage) to the **TLP Server** (ie the Data Management Platform server) to request or control the archiving, restore, deletion of cold objects or to monitor the processing of these requests.

### Installing and Configuring the Tape Library Protocol with the Data Management Platform & Scality

#### Prerequisites

**Scality:**

* TLP protocol is available:
  * with the Scality Artesca product: Artesca version 2.2.5 or later,
  * with the Scality RING by adding some custom Professional Service. Please refer to Scality for more information.
* The Scality Object storage must be fully operational and running prior to activating the TLP capabilities.

**The Data Management Platform:**

* Version 4.3 GA or above of the the Data Management Platform.
* TLP Server components is available and installed with the Data Management Platform Server setup.
* TLP Server Application is configured using the WebUI using administrator access.
* All cold storage managed by the Data Management Platform are by default supported, including tape libraries with the limitations listed in the next section.
* Deployment prerequisites:
  * The Data Management Platform server and data movers must be installed and fully activated prior to configuring and activating the TLP capabilities.
  * The backend storage to use as the cold backend (ie. Tape Library) and the archiving parameters must also be declared in the Data Management Platform before activating the TLP.
  * The Data Management Platform server and all data movers must have access to the storage.

**Please note regarding the Data Management Platform's Archiving configuration:** There is no need to create explicit Scality storage manager, or explicit repository for this type of archiving. These objects are automatically created by the process creating the TLP application in the Data Management Platform and are hidden to the users.

#### Known Limitations

Using TLP is not compatible with the following options:

* TLP cannot be mixed with Erasure Coding on AMM,
* TLP cannot be mixed with Tape Cache option of the Data Management Platform.

#### Configuring the TLP Application in the Data Management Platform

1. A new TLP application must be created via the Data Management Platform Web UI. Application menu)

   <figure><img src="https://2203078701-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fw5h0P6nnTAuQFNt2ofjn%2Fuploads%2FFHIuiZiHpYfsQ1z5MXAq%2Fimage.png?alt=media&amp;token=3d17683b-fdda-450d-a794-7cc081a5467e" alt=""><figcaption></figcaption></figure>
2. Click on new Scality TLP button to create a new application

<figure><img src="https://2203078701-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fw5h0P6nnTAuQFNt2ofjn%2Fuploads%2FExaEGiwDJ9PW3wIMmquc%2Fimage.png?alt=media&amp;token=e88ed0cf-71aa-4061-8771-0fcd754c272a" alt=""><figcaption></figcaption></figure>

3. In the application creation formular :

* Enter a Name
* Comment if needed
* With the current version, it is not possible to choose a Data Mover where the WebSocket server will be started. By default it is the Data Management Platform Server.
* Choose a port on which the WebSocket server will listen the TLP commands from Artesca.

{% hint style="warning" %}
Choose to activate or not the application. If activated, the WebSocket server will start.
{% endhint %}

* Define the job triggers. These values will define when the Data Management Platform will start a new job (archiving, retrieval).
* Minute: a new job will start after having detected that some objects are waiting for x minutes.
  * MB: a new job will start if the volume of waiting objects is higher than the volume defined.
  * Files: a new job will start if the number of waiting objects is greater than the defined value.
* Define if wanted job execution parallelization. Only volume and file criteria are available

<figure><img src="https://2203078701-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fw5h0P6nnTAuQFNt2ofjn%2Fuploads%2FkTXaqQXb1bgWyJX1Cevl%2Fimage.png?alt=media&amp;token=e2bb8a05-1041-44de-99d7-3745341df8b4" alt=""><figcaption></figcaption></figure>

4. When the application is created, it appears in the TLP application list.

<figure><img src="https://2203078701-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fw5h0P6nnTAuQFNt2ofjn%2Fuploads%2FOqi17gE6gY77eqpEqb6C%2Fimage.png?alt=media&amp;token=4de032d5-158f-4e73-8f37-6d79325f4bcf" alt=""><figcaption></figcaption></figure>

#### Configuring WebSocket to use SSL (optional)

Prerequisites:

* The Data Management Platform default certificate cannot be used by Artesca/RING.
* Auto-signed certificates without CN (Common Name) and SAN Subject Alternative Name) are not supported by Artesca/RING.

A dedicated certificate must be created using the procedure below.

**Creating new certificates for the WebSocket**

Once the Data Management Platform's TLP application is configured, you will need to create a new certificate.

1. Generate a new certificate:

```
# LD_LIBRARY_PATH=/<product-brand>/Binary/Lib /<product-brand>/Binary/Bin/openssl req -config /<product-brand>/Binary/Bin/openssl.cnf -subj "/C=FR/ST=Ile-de-France/L=Massy/O=<company>/OU=<product-brand>/CN=SERVER_NAME" -x509 -addext "subjectAltName = IP:SERVER_IP" -days 3652 -nodes -out /tmp/s.crt -keyout /tmp/s.*
```

Make sure to use the two options below:

* `CN=SERVER_NAME`
* `subjectAltName = IP:SERVER_IP`

with:

* SERVER\_NAME: the Data Management Platform server name
* SERVER\_IP = the Data Management Platform server IP

2. Replace the old certificate with the new one in apache2.2/conf/ssl/certs/server.crt and apache2.2/conf/ssl/private/server.key
3. In ada\_env.local, add the below parameter for each TLP application:

   `TLP_FORCE_SSL_`**DBNAME\_APPNODE**`=1`

   with:

   * DBNAME: The Data Management Platform Database name where TLP application has been created
   * APPNODE: TLP application ID in the Data Management Platform

     This information can be found in the TLP Log name:

     \<ADA\_HOME>/Binary/Adm/Tlp/tlp\_event\_DBNAME\_AAPNODE

     ada\_env.local can be found in \<ADA\_HOME>/Binary/Conf.

     If the file doesn't exit, it can be created manualy.
4. Restart ADA\_ADA.service

#### Configuring the TLP Server in Scality Artesca

**Storage location**

1. To use the TLP with the Data Management Platform, a storage location must be created on the Artesca. Currently there is no dedicated the Data Management Platform Location Type (creation is planned by Scality), but DMF one can be used.

* Enter a Location Name
* Location Type: for 2.2.5 Artesca use "Tape DMF"
* For the endpoint field, enter the WebSocket server URL

```
ws://<Data Management Platform server IP@>:<Port defined in the application>.
```

* It is possible to use WSS protocol.
* As RepoId, enter an archiving policy defined in the Data Management Platform. This archiving policy is the one defining where the data are saved.
* NamespaceId is not used, but something as to be entered.
* For the credentials part, the Data Management Platform Rest API username and password have to be given. Dedicated user may be created in the Data Management Platform.

<figure><img src="https://2203078701-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fw5h0P6nnTAuQFNt2ofjn%2Fuploads%2FXrVAusZ5jGlCpTXZnGCV%2Fimage.png?alt=media&amp;token=73ee147c-0a66-41c2-897a-5bfc129fc7fa" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
The host defined in the “Endpoint” field must be fully resolved and reachable by the Data Movers that will access the data.
{% endhint %}

**Create or Activate a Transition Workflow**

To trigger the TLP capabilities, a Transition Workflow must be created in the Scality storage.\
Please refer to the Scality documentation for more information.

#### Testing Overview

Connect to the Scality storage,\
Add objects or make sure you have objects to the bucket targeted for your test,\
Wait for the period of time configured in the Scality Storage Transition Workflow: “Days after object creation” criteria.\
Wait for 12 to 24h depending on the Scality storage built-in defaults to see results.

### Troubleshooting

[<mark style="color:blue;">Web Socket Server Process and Logs</mark>](#id-3.1-web-socket-server-process-and-logs)

[<mark style="color:blue;">Troubleshooting Tips</mark>](#troubleshooting-tips)

#### Web Socket Server Process and Logs

As soon as a new TLP application is created and active, the corresponding WebSocket server is started.

* The start of WS server is managed by the new **Supervisor** process (clone of the Data Management Platform Scheduler). The supervisor will also be in charge to manage the script launching the verification of the job execution needs.
* The supervisor is started by the scheduler as soon as the scheduler initialization is complete.
* The supervisor logs are in the Data Management Platform's log files.

```
# ps -edf | grep supervisor

root     2904829 2904567  0 nov.15 ?     00:00:22 /<product-brand>/Binary/Bin/ada_supervisor -start -pkey dc01damiena08v{CRLF}1731656856
```

* The WebSocket TLP server is a python script that is started or stopped based on the active/inactive flag of the application.
* If the program crashes, it is automatically restarted by the supervisor (in the next 5 minutes).

```
# ps -edf | grep python

root     3459928 2904829  0 14:31 ?     00:00:01 /<product-brand>/Binary/3rdParty/python/bin/python3.12 /<product-brand>/Binary/Perl/TLP/server.py -p 10000 -d ADA -r https://dc01damiena08v:443/ -a 4
```

* The WebSocket server logs are in dedicated files in **/\<product-brand>/Binary/Adm/Tlp** directory.
* Each application has its proper log files, identified with the database name and the application ID (APP\_NODE).

```
tlp_event_<DB name>_<Application ID>_<YYYY-MM-DD>
```

#### Troubleshooting Tips

**Data Management Platform: How to Activate the Debug Mode**

In the Data Management Platform server parameter file:

* **Add tunable to activate TLP server debug mode**

```
# cat /<product-brand>/Binary/Conf/parameters
product:ADA parameter:debug_tlp_server=1
```

**Data Management Platform: Checking the Logs in Debug Mode**

As result, in the TLP server log files different received commands and sent results will be shown.

* **Command ping**

```
2024-10-07 14:11:25|DEBUG|Received message from 140526451172288: {"id":"3a618afd-8fc1-413b-8de1-ca78388c2931","jsonrpc":"2.0","method":"ping"}

2024-10-07 14:11:25|DEBUG|Sent response to 140526451172288: {"jsonrpc": "2.0", "id": "3a618afd-8fc1-413b-8de1-ca78388c2931", "result": "pong"}
```

* **Command put\_s3**

```
2024-10-07 14:15:02|DEBUG|Received message from 140526451172288: {"params":{"repoIds":["ArchDest1"],"size":11,"nsId":"ADA","accessKey":"K20007DUV4JH94CZL758","eTag":"\"597cb049dbb4ea6fc06e7092be40eb6d\"","headers":{"X-Scal-Request-UIDs":"bd169759a740b9b105f5"},"secretKey":"VyDqhKE7ixssPYFFXmnBgZSHy0jzPXEEWLPz0KFE","stsToken":"yJzYWx0IjoiSk8zV09...",
```

```
3    "url":"https://s3.<product-brand>.dev/cbcbuck1/test_folder_cbc1_32/test_file_cbc1.txt","versionId":"aJ3NKR9qfbFt00000000001I4j3QKsvf"},"id":"5339bf3b-5257-431d-996b-208f1f25e707","jsonrpc":"2.0","method":"put_s3"}

5    2024-10-07 14:15:02|DEBUG|Sent response to 140526451172288: {"jsonrpc": "2.0", "id": "5339bf3b-5257-431d-996b-208f1f25e707", "result": {"jobId": "A_821"}}
```

* **Command poll\_s3**

```
1    2024-10-07 14:16:53|DEBUG|Received message from 140526451172288: {"params":{"jobId":"A_827"},"id":"576a3884-112f-4a92-a708-817d899e9057","jsonrpc":"2.0","method":"poll_s3"}

3    2024-10-07 14:16:53|DEBUG|GET https://localhost/restapi/tlp/poll_s3/A_827/?
4    2024-10-07 14:16:53|DEBUG|Sent response to 140526451172288: {"jsonrpc": "2.0", "id": "576a3884-112f-4a92-a708-817d899e9057", "result": {"status": "Success", "archiveId": "2-503-471",
5    "archiveVersion": 1728303303}}
```

* **Command get\_s3**

```
1    2024-10-07 16:41:13|DEBUG|Received message from 140526446789408: {"params":{"archiveId":"2-498-467","archiveVersion":17280501602,"nsId":"ADA","accessKey":"0REB4ZNAGPQN80Q772BN","headers":{"X-Scal-Request-UIDs":"ce793c46-4f01-46c4-a9dd-22e6a0629c37","x-scal-s3-version-id":"aJ3Ujq3btD670000000000114j3QKsvf"},"secretKey":"BOyxyRUyLitKTeZaFRY+YNUrp=ctTSE2hXj=xtbt","stsToken":"eyJzYWx0IjoiRmp4zTTVKME9N..","url":"https://s3.<product-brand>.dev/cbcbuck1/test_folder_cbc1_31/test_file_cbc1_3.txt"},"id":"0a72bdf6-0fa1-4c7b-843a-f58e7261cfc5","jsonrpc":"2.0","method":"get_s3"}

5    2024-10-07 16:41:13|DEBUG|Sent response to 140526446789408: {"jsonrpc": "2.0", "id": "0a72bdf6-0fa1-4c7b-843a-f58e7261cfc5", "result": {"jobId": "R_84"}}
```

* **Interpreting command result**

The result of poll\_s3, get\_s3 and delete\_s3 is a message with a TLP jobId. To help execution followup:

* put\_s3 resulting jobId is starting with A\_ (Archiving)
* get\_s3 resulting jobId is starting with R\_ (Retrieve)
* delete\_s3 resulting jobId is starting with D\_ (Delete)

The jobId is use by Artesca to follow the execution status of the TLP command.

**Scality Artesca: How to Check for Object Archiving Status**

**In Artesca UI:**

It is possible to verify that the objects have been correctly archived by the Data Management Platform when a snowflake icon is displayed for the object.

<figure><img src="https://2203078701-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fw5h0P6nnTAuQFNt2ofjn%2Fuploads%2F3k4DSm6ggKbviiCMyGSi%2Fimage.png?alt=media&amp;token=85720a17-ba4c-444b-8efa-70a9c14ab446" alt=""><figcaption></figcaption></figure>

**How to Search for Jobs with Objects in Error**

In case some objects are shown in error in the Artesca interface, it is possible to search for the associated job in the Data Management Platform linked to troubleshoot the processed object.\
In the Data Management Platform’s WebUI, go to the TLP application page, and click the Search button.

<figure><img src="https://2203078701-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fw5h0P6nnTAuQFNt2ofjn%2Fuploads%2FaRnjbRMrjVYgY8X8gV75%2Fimage.png?alt=media&amp;token=6fe7548f-cf93-437d-8f52-309a3a5b4647" alt=""><figcaption></figcaption></figure>

Then select the job type Archiving or Retrieval) and enter the path of the Scality object in error. It can be a substring path as shown in the following example.\
The result produces a list of objects matching the search request.\
Each object leads to a related job in the Data Management Platform’s job view panel.\
The job log analysis can help to further troubleshoot the object processed.

<figure><img src="https://2203078701-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fw5h0P6nnTAuQFNt2ofjn%2Fuploads%2FvkTgR9L90hqKrg5D7KoA%2Fimage.png?alt=media&amp;token=2924574a-fe58-4ad9-a57b-3a3adbd1dc65" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://documentation.atempo.com/miria-4.6/admin-guide/appendix/appendix-h-scality-tape-library-protocol-deployment-and-troubleshooting.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
