> For the complete documentation index, see [llms.txt](https://docs.trilio.io/openstack/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.trilio.io/openstack/deployment/requirements/preparing-the-installation.md).

# Installation Strategy and Preparation

Before embarking on the installation process for Trilio in your OpenStack environment, it is highly advisable to carefully consider several key elements. These considerations will not only streamline the installation procedure but also ensure the optimal setup and functionality of Trilio's solutions within your OpenStack infrastructure.

## **Tenant Quotas**

Trilio uses Cinder snapshots to compute full and incremental backups. On most storage backends it also creates temporary Cinder volumes from those snapshots to read the data. Both are created in the tenant's own project, so they count against the tenant's Cinder quotas: `snapshots`, `volumes`, `gigabytes`, and their per-volume-type variants (for example `gigabytes_<type>`) when those are set.

The backup target type (NFS or S3) does not change any of the requirements below.

#### Why Trilio needs Cinder snapshots (all backends)

Every backup, full or incremental, takes a new Cinder snapshot of each Cinder volume in the workload, so the data is read from a point-in-time copy while the instance keeps running. This includes volumes on Ceph RBD: the snapshot is requested through the Cinder API and Cinder counts it like any other snapshot.

After a backup succeeds, Trilio deletes the previous snapshot and keeps the newest one. It must keep it because it is the base for the next incremental: Trilio finds the changed blocks by comparing the new snapshot with the one from the previous backup. If a backup fails, Trilio deletes the new snapshot and keeps the previous one.

So each protected volume holds one Trilio snapshot between backups, and two while any backup after the first is running (full or incremental).

Nova ephemeral disks stored on Ceph (instances booted from an image with Nova's RBD image backend) are not Cinder volumes. Trilio snapshots them directly in Ceph, and they do not consume any Cinder quota.

#### Why Trilio needs temporary volumes (all backends except Ceph RBD)

* **Ceph RBD:** Trilio reads the data straight from the RBD snapshots and computes the changed blocks between the two snapshots inside Ceph (`rbd export-diff`). No temporary volumes are created.
* **All other Cinder backends** (iSCSI, Fibre Channel, NFS-backed Cinder and others): a Cinder snapshot cannot be read directly, so Trilio creates a temporary volume from it, attaches it to the compute node as a block device, reads it, and deletes it when the backup of that volume ends.
  * A full backup reads one snapshot, so it creates one temporary volume per Cinder volume.
  * An incremental backup compares two snapshots block by block, so it needs both attached at the same time: one temporary volume from the new snapshot and one from the previous snapshot. Both are created at the volume's current size.
  * Temporary volumes use the same volume type as the source volume, so they also count against that type's quotas.

#### Sizing the quota

Extra quota per Cinder volume of size S, on top of the volume itself:

| Phase                        | Ceph RBD               | Other Cinder backends                        |
| ---------------------------- | ---------------------- | -------------------------------------------- |
| Between backups              | 1 snapshot (S GB)      | 1 snapshot (S GB)                            |
| During the first full backup | 1 snapshot (S GB)      | 1 snapshot + 1 temporary volume (2 × S GB)   |
| During a later full backup   | 2 snapshots (2 × S GB) | 2 snapshots + 1 temporary volume (3 × S GB)  |
| During an incremental backup | 2 snapshots (2 × S GB) | 2 snapshots + 2 temporary volumes (4 × S GB) |

Size the quota for the incremental row, which is the peak.

Example for one 20 GB volume, during an incremental:

* Ceph RBD: 2 snapshots, 40 GB.
* Other backends: 2 snapshots and 2 volumes, 80 GB (40 GB of snapshots plus 40 GB of temporary volumes).

Notes:

* The snapshot part of the `gigabytes` figures applies because Cinder charges snapshot size against the `gigabytes` quota by default (`no_snapshot_gb_quota = False`). If your cloud sets it to `True`, snapshots only consume the `snapshots` count, and the figures drop to 0 GB on Ceph RBD and to 2 × S GB on other backends.
* The values are per volume. Add them up for every volume whose backups can run at the same time, across all workloads in the tenant.
* If a backup is interrupted, temporary volumes can be left behind. They are named `temp_volume-<snapshot id>` and carry the metadata `fortriliovault=True`. Delete them to release the quota.

#### Restore

During the restoration process, Trilio generates supplementary instances and Cinder volumes. To facilitate seamless restore operations, tenants should maintain adequate quota levels for Nova instances and Cinder volumes. Failure to meet these quota requirements may lead to disruptions in restoration procedures.

## **AWS S3 Eventual Consistency**

The AWS S3 object consistency model includes:

1. Read-after-write
2. Read-after-update
3. Read-after-delete

Each of these models explains how an object becomes consistent after being created, updated, or deleted. None of these methods ensures strong consistency, leading to a delay before an object becomes fully consistent.

Although Trilio has introduced measures to address AWS S3's eventual consistency limitations, the exact time an object achieves consistency cannot be predicted through deterministic means.

There is no official statement from AWS on how long it takes for an object to reach a consistent state. However, read-after-write has a shorter time to reach consistency compared to other IO patterns. Therefore, our solution is designed to maximize the read-after-write IO pattern.

#### AWS Region Considerations

The time in which an object reaches eventual consistency also depends on the AWS region.

For instance, the AWS-standard region doesn't offer the same level of strong consistency as regions like us-east or us-west. Opting for these regions when setting up S3 buckets for Trilio is advisable. While fully avoiding the read-after-update IO pattern is complex, we've introduced significant access delays for objects to achieve consistency over longer periods. On rare occasions when this does happen, it will cause a backup failure and require a retry.

## **Trilio Cluster**

Trilio can be deployed as a single node or a three-node cluster. It is highly recommended that Trilio is deployed as a three-node cluster for fault tolerance and load balancing. Starting with the 3.0 release, Trilio requires additional IP or FQDN for the cluster and is required for both single-node and three-node deployments. Cluster IP a.k.a virtual IP is used for managing clusters and is used to register the Trilio service endpoint in the keystone service catalog.
