> 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-f-erasure-coding-to-tape.md). Agents can also search and read this documentation through its [MCP server](https://documentation.atempo.com/~gitbook/mcp).

# APPENDIX F : Erasure Coding to Tape

Miria 4.2 introduces the Erasure Coding to Tape (EC2T) feature, specifically designed for\
archiving cold data on tape libraries. This innovative technique enhances reliability and durability, enabling data reconstruction even when some tapes are damaged or lost.

### Overview

EC2T is primarily intended for organizations managing extremely large archives, spanning tens of petabytes and encompassing billions of files. These organizations face two significant constraints:

* The requirement to protect the archive with a disaster/failure-proof protection mechanism.\
  This constraint leads organizations to rethink the design of an archive system capable of\
  withstanding the loss of a few media elements or even an entire tape library, without\
  impacting the end-user's ability to retrieve data.
* The requirement to reduce the storage volume associated with the archive or the inability— for technical or financial reasons—to implement standard archiving best practices. As an\
  example, creating three copies on different media types and locations would become\
  impractical at such a scale.

> **Important**:
>
> * The first iteration of this feature as delivered in Miria 4.2 is designed for Cloud Service Providers (CSP) deploying the solution across multiple data centers with local tape libraries and wanting to implement a service of cold archiving via the use of Miria REST API or Tasks. Its deployment and configuration require support from Atempo Professional Services resources. If you are considering deploying it in your environment, please reach out to Atempo for guidance.
> * Our intention is to enhance the product interfaces to ensure the availability of this\
>   feature for all customer profiles. Additionally, we aim to improve the associated\
>   documentation to facilitate autonomous deployment.

EC2T technique involves dividing eligible data into data chunks, incorporating extra parity chunks for redundancy, and distributing data and parity chunks across different tape libraries or locations equipped with tape libraries, bolstering data availability and resilience.\
By leveraging EC2T, organizations can achieve a cost-effective, resilient, and efficient solution for managing massive archives while maintaining data resiliency.\
Key benefits of using Erasure Coding to Tape with Miria:

* Smaller storage footprint compared to using two or three copies.
* Improved data resiliency, since the system can support the loss of multiple tape media or a full tape library, provided that the appropriate erasure coding schema is selected.
* Granular restore at file level that does not recall all tapes: when data to retrieve is smaller than an erasure-coded fragment, Miria will retrieve a single tape and efficiently extract the file to be retrieved.

> **Important**:
>
> * Do not use in production without first contacting Atempo for guidance and conducting prior testing.
> * This feature is currently in beta and its documentation does not yet provide a full\
>   description of the recommended erasure coding patterns and associated deployment constraints.

### Understanding Erasure Coding to Tape

#### High-Level Description of the Technique Used

Erasure coding is a data protection technique, similar to RAID on disk, that breaks data into\
fragments and expands it with redundant fragments for recovery purposes before storing it on different tape media. In our EC2T implementation, we utilize Reed-Solomon codes, which\
leverage polynomial mathematics to correct errors and reconstruct lost data, ensuring reliable and durable storage for large archives.

The main steps of the Erasure Coding to Tape (EC2T) process are:

1. **Data encoding:** The data is processed through Miria acting as an encoder, where it is divided into multiple equal-sized fragments, represented as K data blocks. Alongside these data fragments, the encoder generates additional redundant fragments, represented as M blocks, which are used for recovery purposes. The couple (K+M) is the erasure coding schema used to encode / decode the data.
2. **Data storage:** Miria stores all (K+M) fragments on the tape storage system. These fragments are stored sequentially across multiple tapes, with each tape containing one fragment.
3. **Data recovery:** In the event of data recovery, up to K fragments out of the K fragments are retrieved from the tape storage and decoded by Miria to reconstruct the data. Note that if the data to recover is smaller than the size of a fragment, Miria will only access one tape to retrieve the file.

   **In case of damaged or lost tape:** Within the limit of M or less fragments damaged or lost, Miria will recall all fragments available to rebuild the original data, the system can withstand the loss of up to M fragments while still ensuring data availability. Consequently, even if some tapes are damaged or lost, the original data can be successfully reconstructed using the remaining fragments, providing robust fault tolerance and maintaining data accessibility.

The diagram (Figure 52) demonstrates the core concept of Erasure Coding to Tape, highlighting how data is fragmented, stored, and subsequently reconstructed for recovery.

<figure><img src="https://2203078701-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fw5h0P6nnTAuQFNt2ofjn%2Fuploads%2Fmnxop0e1GwsqtxgTueIM%2Fimage.png?alt=media&amp;token=064edc06-fb2c-4c94-9850-1ac5e415a970" alt=""><figcaption></figcaption></figure>

### Deployment and Limitations - Erasure Coding Schema

> **Important**:
>
> * As of now the Erasure Coding To Tape is incompatible with Easy Move, and requires a Network Attached Storage (NAS) as a temporary caching area. Please note that object storage support is underway.
> * As previously described, the current deployment target is Cloud Service Providers (CSP) implementing a cold archiving service across multiple data centers (<mark style="color:blue;">Figure 53</mark>).

<figure><img src="https://2203078701-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fw5h0P6nnTAuQFNt2ofjn%2Fuploads%2FOBV105vLXBbwBZRVldZT%2Fimage.png?alt=media&amp;token=fb94e868-2ec2-4767-82e5-f2ee51acbd3f" alt=""><figcaption><p><strong>Figure 53:</strong> Sample high-level description architecture for a Cloud Service Provider with 3 data centers, each equipped with a tape library</p></figcaption></figure>

#### Impact of the Erasure Coding Schema on Data Resiliency

When selecting the erasure coding schema (K+M) for your configuration, the choice depends on the number of fragments (i.e., media) you are willing to lose and the specific use case, such as having one single tape library, three tape libraries in a single location, or three tape libraries in different locations.\
The chosen configuration impacts the level of protection provided in terms of the number of tape media losses supported and the disaster resilience.

* **Single tape library:** In this scenario, the erasure coding schema is chosen to protect\
  against the loss of individual tapes within the library. For example, if you select a (K+M)\
  schema of (10+3), you can reconstruct the original data using any 10 out of the 13\
  fragments. This configuration allows for the loss of up to 3 tape media within the library,\
  providing protection against media failures or accidental damage. However, it does not\
  offer protection against disasters affecting the entire library.
* **Three tape libraries in a single location:** To provide protection against the loss of entire\
  tape libraries, you can distribute the erasure-coded fragments across multiple libraries. For instance, using a (6+3) schema, you can store 3 fragments in one library, 3 fragments in the second library, and the remaining 3 fragments in the third library. In this case, you can tolerate the loss of one entire tape library while still being able to reconstruct the original data. However, this configuration does not protect against disasters affecting the entire location.
* **Three tape libraries in different locations:** For maximum disaster resilience, distribute\
  the erasure-coded fragments across tape libraries in geographically distinct locations.\
  Using a (8+4) schema, you can store 4 fragments in each library. This configuration allows for the loss of one entire tape library, that is up to 4 tape media without compromising data availability. In this case, the erasure coding schema provides protection against both media failures and disasters affecting a single location.\
  In summary, selecting the appropriate (K+M) schema for your erasure coding configuration depends on the level of protection required, the number of tape libraries, and their geographical distribution. By carefully considering these factors, you can achieve the desired balance between storage efficiency, fault tolerance, and disaster resilience.

#### Impact of the Erasure Coding Schema on Tape Usage

The erasure coding schema (K+M) selected significantly impacts tape usage, including the\
number of tapes required and the overall storage volume on tapes. Comparing different\
scenarios, such as an (8+4) schema, dual copies to tape, and three copies to tape, highlights the trade-offs between storage efficiency, fault tolerance, and disaster resilience.

* **(8+4) erasure coding schema:** In this scenario, data is divided into 8 fragments and\
  expanded with 4 fragments for redundancy, resulting in a total of 12 fragments. Erasure\
  coding is using 1 tape per fragment to store. This scenario use 12 tapes leaving the tapes open, so that they can be used with the following jobs. This schema allows for the loss of up to 4 tape media while still being able to reconstruct the original data. To provide protection against disasters affecting entire tape libraries or locations, the fragments must be distributed over the tape libraries and locations.
* **Dual copies to tape within a single tape library:** Creating two copies of the data on\
  separate tapes provides a simple form of protection against tape media failures. Assuming each copy requires 2 tapes, you would need 2 copies, resulting in a total of 4 tapes. This approach offers protection against the loss of up to 1 tape media. However, it does not provide protection against disasters affecting entire tape libraries or locations, unless copies are stored in geographically distinct locations.
* **Three copies to tape:** Creating three copies of the data on separate tapes further\
  enhances fault tolerance. Assuming each copy requires two tapes, you would need a total of 6 tapes. This approach allows for the loss of up to 2 tape media while still maintaining data availability. Similar to the dual copies scenario, this method does not inherently provide protection against disasters affecting entire tape libraries or locations, unless copies are stored in geographically distinct locations.

The tables in the following sections present the storage overhead and savings associated with a selection of erasure coding schemas, comparing their storage footprints to single copy and dual copy scenarios.

You can use these tables to select the erasure coding schema that offers the media loss rate corresponding to your needs and the storage overhead compatible with your budget.

#### Erasure Coding Schema for Three Libraries / Three Locations

The table below describes the storage overhead and savings for a selection of (K+M) schemas compared to single copy and dual copy scenarios:

* Green cells highlight the efficiency ratio, in terms of space saving for the selected (K+M)\
  schemas.
* Yellow cells specify interesting values in terms of supported media loss, but offers\
  comparatively reduced storage savings, compared to the green cells.
* Orange cells still provide some benefits in terms of storage space saving, but their main\
  interest is that the associated schema supports a higher number of media loss.

<table><thead><tr><th align="right">Total # of Drives used to Write (K+M)</th><th width="120.33331298828125" align="right">M = Max # Media Loss (# parity chunks)</th><th width="114.33331298828125" align="right">K (# data chunks)</th><th width="128.3333740234375" align="right">Storage overhead vs single copy</th><th width="160.65625" align="right">Storage Saving vs dual copy</th></tr></thead><tbody><tr><td align="right">12</td><td align="right">4</td><td align="right">8</td><td align="right">50%</td><td align="right">50%</td></tr><tr><td align="right">13</td><td align="right">5</td><td align="right">8</td><td align="right">63%</td><td align="right">38%</td></tr><tr><td align="right">14</td><td align="right">5</td><td align="right">9</td><td align="right">56%</td><td align="right">44%</td></tr><tr><td align="right">15</td><td align="right">5</td><td align="right">10</td><td align="right">50%</td><td align="right">50%</td></tr><tr><td align="right">15</td><td align="right">6</td><td align="right">9</td><td align="right">67%</td><td align="right">33%</td></tr><tr><td align="right">16</td><td align="right">6</td><td align="right">10</td><td align="right">60%</td><td align="right">40%</td></tr><tr><td align="right">17</td><td align="right">6</td><td align="right">11</td><td align="right">55%</td><td align="right">45%</td></tr><tr><td align="right">18</td><td align="right">6</td><td align="right">12</td><td align="right">50%</td><td align="right">50%</td></tr><tr><td align="right">18</td><td align="right">7</td><td align="right">11</td><td align="right">64%</td><td align="right">36%</td></tr><tr><td align="right">19</td><td align="right">7</td><td align="right">12</td><td align="right">58%</td><td align="right">42%</td></tr><tr><td align="right">20</td><td align="right">7</td><td align="right">13</td><td align="right">54%</td><td align="right">46%</td></tr><tr><td align="right">20</td><td align="right">8</td><td align="right">12</td><td align="right">67%</td><td align="right">33%</td></tr><tr><td align="right">21</td><td align="right">7</td><td align="right">14</td><td align="right">50%</td><td align="right">50%</td></tr><tr><td align="right">21</td><td align="right">8</td><td align="right">13</td><td align="right">62%</td><td align="right">38%</td></tr><tr><td align="right">22</td><td align="right">8</td><td align="right">14</td><td align="right">57%</td><td align="right">43%</td></tr><tr><td align="right">22</td><td align="right">9</td><td align="right">13</td><td align="right">69%</td><td align="right">31%</td></tr><tr><td align="right">23</td><td align="right">8</td><td align="right">15</td><td align="right">53%</td><td align="right">47%</td></tr><tr><td align="right">23</td><td align="right">9</td><td align="right">14</td><td align="right">64%</td><td align="right">36%</td></tr><tr><td align="right">24</td><td align="right">8</td><td align="right">16</td><td align="right">50%</td><td align="right">50%</td></tr></tbody></table>

#### Erasure Coding Schema for One Library / One Location

The table below describes the storage overhead added for a selection of (K+M) schemas\
compared to single copy and dual copy scenarios:

* Green cells highlight the efficiency ratio, in terms of space saving for the selected (K+M)\
  schemas.
* Yellow cells specify interesting values in terms of supported media loss, but offers\
  comparatively reduced storage savings, compared to the green cells
* Orange cells still provide some benefits in terms of storage space saving, but their main\
  interest is that they support a higher number of media loss.

| Total # of Drives used to Write (K+M) | M = Max # Media Loss (# parity chunks) | K (# data chunks) | Storage overhead vs single copy | Storage Saving vs dual copy |
| ------------------------------------: | -------------------------------------: | ----------------: | ------------------------------: | --------------------------: |
|                                     3 |                                      1 |                 2 |                             50% |                         50% |
|                                     5 |                                      2 |                 3 |                             67% |                         33% |
|                                     6 |                                      2 |                 4 |                             50% |                         50% |
|                                     7 |                                      3 |                 4 |                             75% |                         25% |
|                                     8 |                                      3 |                 5 |                             60% |                         40% |
|                                     9 |                                      3 |                 6 |                             50% |                         50% |
|                                     9 |                                      4 |                 5 |                             80% |                         20% |
|                                    10 |                                      4 |                 6 |                             67% |                         33% |
|                                    11 |                                      5 |                 6 |                             83% |                         17% |
|                                    11 |                                      4 |                 7 |                             57% |                         43% |
|                                    12 |                                      5 |                 7 |                             71% |                         29% |
|                                    12 |                                      4 |                 8 |                             50% |                         50% |

<mark style="color:blue;">Formules utilisées :</mark>

* <mark style="color:blue;">**K + M = Nombre total de disques**</mark>
* <mark style="color:blue;">**Storage overhead vs single copy = M / K**</mark>
* <mark style="color:blue;">**Storage Saving vs dual copy = 100% − Storage overhead**</mark>

<mark style="color:blue;">Exemples :</mark>

* <mark style="color:blue;">K=2, M=1 → 1/2 =</mark> <mark style="color:blue;">**50%**</mark> <mark style="color:blue;">d’overhead</mark>
* <mark style="color:blue;">K=3, M=2 → 2/3 =</mark> <mark style="color:blue;">**67%**</mark> <mark style="color:blue;">d’overhead</mark>
* <mark style="color:blue;">K=6, M=5 → 5/6 =</mark> <mark style="color:blue;">**83%**</mark> <mark style="color:blue;">d’overhead</mark>

### Deployment Considerations

Contact your Atempo sales representative if considering deploying this Miria capability, to get in touch with an Atempo specialist to guide you in this process. This initial release of Erasure Coding to Tape requires Atempo Professional Services support to be deployed.

### Using Erasure Coding To Tape

We have upgraded the Media Management section of the Web Interface to support and guide the activation of the EC2T. It now supports the configuration and selection of erasure coding schemas (K+M), ensuring the compliance with fault tolerance/resiliency requirements.\
Additionally, our REST API endpoints are updated to incorporate EC2T activation and\
configuration, enabling seamless integration and efficient archiving.

> **Important**:
>
> * All libraries used during erasure coding must be accessible by all Data Movers.
> * ARM 64-based Macs cannot be used as Agent / Data Mover when EC2T is enabled.


---

# 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-f-erasure-coding-to-tape.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.
