> ## Documentation Index
> Fetch the complete documentation index at: https://docs.akua.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Piraeus (LINSTOR)

> Replicated block storage across multiple nodes for production workloads

<Frame>
  <img className="block dark:hidden" src="https://mintcdn.com/akua-1dce587a/3H5lVc027NQakOso/images/heros/piraeus-light.svg?fit=max&auto=format&n=3H5lVc027NQakOso&q=85&s=cc2891101a9b777b889528779e63e5a9" alt="A replicated Piraeus volume spanning workers with failover and readiness indicators." width="1536" height="864" data-path="images/heros/piraeus-light.svg" />

  <img className="hidden dark:block" src="https://mintcdn.com/akua-1dce587a/3H5lVc027NQakOso/images/heros/piraeus-dark.svg?fit=max&auto=format&n=3H5lVc027NQakOso&q=85&s=212be3f663d8ca4d3ee9a076fc15068e" alt="A replicated Piraeus volume spanning workers with failover and readiness indicators." width="1536" height="864" data-path="images/heros/piraeus-dark.svg" />
</Frame>

Piraeus is a production-grade storage solution built on <Tooltip headline="LINSTOR" tip="LINSTOR is an open-source storage management system for Linux. It manages replicated block storage across multiple nodes using DRBD, providing automatic synchronization and failover.">LINSTOR</Tooltip> and <Tooltip headline="DRBD" tip="DRBD (Distributed Replicated Block Device) is a Linux kernel module that mirrors block devices between nodes in real time. It's the underlying replication technology used by LINSTOR and Piraeus.">DRBD</Tooltip>. It replicates data across multiple <Tooltip headline="Worker Nodes" tip="Worker nodes are the compute machines that run your applications in a Kubernetes cluster. They provide compute capacity and local disk storage.">worker nodes</Tooltip>, so if a node fails, your applications continue running on another node with a complete copy of their data.

## When to use

* **Production workloads**: databases, message queues, and any application where data loss is unacceptable
* **Multi-node clusters**: two or more worker nodes for meaningful replication
* **High availability**: applications that need to survive node failures without downtime

## How it works

Piraeus runs a storage controller and satellite agents on your worker nodes. When an application requests a volume:

1. LINSTOR creates a <Tooltip headline="Block Device" tip="A block device provides raw storage that can be formatted with a filesystem. Unlike file-based storage, block devices offer lower latency and are the standard for databases and other performance-sensitive applications.">block device</Tooltip> and replicates it across multiple nodes
2. DRBD keeps replicas synchronized in real time at the kernel level
3. If the primary node fails, Kubernetes reschedules the <Tooltip headline="Pod" tip="A pod is the smallest deployable unit in Kubernetes. It runs one or more containers and can mount volumes for persistent storage.">pod</Tooltip> to a node with an up-to-date replica
4. The application resumes with all its data intact, with no manual recovery needed

**Key characteristics:**

* Configurable replication (synchronous by default, with asynchronous options for performance-sensitive workloads)
* Automatic failover: pods reschedule to healthy nodes with existing replicas
* Volume snapshots and cloning for backup and testing
* <Tooltip headline="Thin Provisioning" tip="Thin provisioning allocates storage on demand as data is written, rather than reserving the full volume size upfront. A 100 GB volume only uses actual disk space for the data it contains.">Thin provisioning</Tooltip>: storage is allocated on demand, not reserved upfront

## Replication modes

DRBD supports three replication protocols that control when a write is considered complete:

| Protocol       | Mode             | Write confirmed when                                               | Best for                                                                             |
| -------------- | ---------------- | ------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
| **Protocol C** | Synchronous      | Local **and** remote disk writes complete                          | Most workloads; strongest data safety (default)                                      |
| **Protocol B** | Semi-synchronous | Local disk write completes and data reaches the peer node's memory | Faster writes with near-synchronous safety                                           |
| **Protocol A** | Asynchronous     | Local disk write completes and data is placed in the send buffer   | Maximum write performance, useful for long-distance replication or disaster recovery |

**Protocol C** (synchronous) is the default and the right choice for most production workloads. Every write is confirmed on both nodes before your application proceeds, so no data is lost if a node fails.

**Protocol A** (asynchronous) gives you significantly faster write performance because the application doesn't wait for the remote node to confirm. The trade-off is that a small window of recent writes could be lost if the primary node fails before the data reaches the replica. This mode is commonly used for disaster recovery across data centers where the network latency of synchronous replication would be too high.

## Deploy

Navigate to your cluster's **Storage** tab, click **Deploy Storage**, and select **Piraeus (LINSTOR)**. Deployment takes a few minutes as Piraeus installs its controller and satellite components on each worker node.

After deployment, a default <Tooltip headline="StorageClass" tip="A StorageClass defines what type of storage is available in your cluster and how volumes are provisioned. When an application requests storage, Kubernetes uses the StorageClass to automatically create the right kind of volume.">StorageClass</Tooltip> is created. Any application requesting a <Tooltip headline="PersistentVolumeClaim" tip="A PersistentVolumeClaim (PVC) is a request for storage by an application. Kubernetes matches the claim to a StorageClass and provisions a volume automatically.">PersistentVolumeClaim</Tooltip> will get a replicated volume distributed across your nodes.

## Worker node storage

Piraeus uses the local disks on your worker nodes for storage. When choosing servers for a cluster with Piraeus:

* **Disk space**: each node contributes its local disk to the storage pool. More disk space per node means more total storage capacity.
* **Disk type**: NVMe SSDs provide the best performance for database workloads. Standard SSDs work well for most applications.
* **Number of nodes**: at least two for meaningful replication, three for full redundancy (data survives any single node failure).

<Tip>
  Using your worker nodes' local disks is the most straightforward and cost-effective approach. You avoid provisioning separate cloud volumes, and Piraeus handles replication automatically. This works well for most workloads: production-grade durability without extra infrastructure costs.
</Tip>

## Cloud provider CSI drivers

If your worker nodes run on a cloud provider with its own block storage (Hetzner Cloud Volumes, AWS EBS, etc.), you have a choice:

* **Piraeus with local disks**: simpler setup, no cloud-specific dependencies, replication handled by DRBD. Your data is replicated across nodes regardless of the underlying cloud provider.
* **Cloud <Tooltip headline="CSI Driver" tip="A Container Storage Interface (CSI) driver is a plugin that connects Kubernetes to a specific storage system. Cloud providers and storage vendors publish CSI drivers for their products.">CSI driver</Tooltip>**: uses the cloud provider's managed block storage. The cloud provider handles durability and snapshots, but you pay per volume and are tied to that provider.

Both approaches are valid. Piraeus with local disks is provider-agnostic and keeps your infrastructure portable. A cloud CSI driver may be preferable if you want cloud-managed snapshots or your provider offers specialized storage tiers.

<Note>
  Akua's built-in Piraeus deployment works on any cluster: managed or imported, any cloud provider or bare metal. You don't need to choose a storage strategy based on your infrastructure provider.
</Note>

## Related topics

<CardGroup cols={2}>
  <Card title="Local Path Provisioner" icon="folder" href="/clusters/storage/local-path">
    Direct local disk storage for development and latency-sensitive workloads.
  </Card>

  <Card title="Storage overview" icon="database" href="/clusters/storage">
    Compare storage providers and deploy to your cluster.
  </Card>

  <Card title="Add workers" icon="server" href="/clusters/add-workers">
    Connect compute capacity to provide local disk for Piraeus.
  </Card>

  <Card title="Piraeus Operator on GitHub" icon="github" href="https://github.com/piraeusdatastore/piraeus-operator">
    Project source and upstream documentation.
  </Card>
</CardGroup>
