storage
Longhorn Storage Calculator
Calculate the total storage required for Longhorn distributed block storage, including replica overhead, snapshot retention, and S3 backup sizing on Hetzner Object Storage.
Understanding Longhorn Storage Architecture
Longhorn is a CNCF project providing distributed block storage for Kubernetes. It creates replicated volumes that survive node failures, similar to how RAID works but distributed across the cluster.
How Longhorn Replication Works
When you create a Longhorn volume with 3 replicas, Longhorn stores a full copy on 3 different nodes. Each replica is kept in sync synchronously on write. If a node fails, Longhorn rebuilds the missing replica on another healthy node.
Storage Formula
Total local disk needed = (raw data × replicas) + (snapshots × change rate × retention)
Example: 100 GB data, 3 replicas, 1 snapshot/day, 7-day retention, 30% change rate:
- ›Replicas: 100 × 3 = 300 GB
- ›Snapshots: 100 × 0.3 × 7 = 21 GB
- ›Total: ~321 GB across the cluster (~107 GB per node)
Snapshot vs Backup
Longhorn has two distinct data protection mechanisms:
- 1.Snapshots — stored locally on the same disk as the volume. Fast but not offsite.
- 2.Backups — incremental uploads to S3 (or NFS). True disaster recovery.
Recommended Production Setup
For production, use both: local snapshots for fast recovery from accidental deletion, S3 backups for disaster recovery. Configure Hetzner Object Storage as the backup target — it costs ~€1/GB/month at scale.
Key Terms
Full glossary →Longhorn
A cloud-native distributed block storage system for Kubernetes. Longhorn creates replicated volumes across nodes and supports incremental backups to S3-compatible storage.
CSI (Container Storage Interface)
A standard interface for exposing storage systems to Kubernetes. CSI drivers allow storage vendors (Longhorn, Ceph, etc.) to provide persistent volumes to pods.
PVC (PersistentVolumeClaim)
A request by a pod for storage. A PVC binds to a PersistentVolume provisioned by a storage class (e.g. Longhorn). The PVC lifecycle is independent of the pod lifecycle.
Frequently Asked Questions
How much extra storage does Longhorn use for replicas?
Longhorn uses full copies for each replica — 3 replicas means 3× your raw data size. Snapshots add approximately 10–30% overhead depending on data change rate and retention period.
Does Longhorn backup to S3 compress the data?
Yes. Longhorn uses incremental backups with compression. The S3 backup size is typically 1.0–1.5× your raw data size (not 3×), since it only stores one copy to S3.
What is the Longhorn recommended minimum disk per node?
Each worker node participating in Longhorn should have at minimum (raw data size × replica factor / node count) + 20% headroom. For 3 nodes with 3 replicas and 100 GB data: each node needs ~35–40 GB for Longhorn volumes.
Can I use Hetzner Object Storage as Longhorn backup target?
Yes. Hetzner Object Storage is S3-compatible and works directly as a Longhorn backup target. Pricing is €0.0119/GB/month, making it very cost-effective for daily incremental backups.
Related Tools
K8s Cluster Cost
Calculate the monthly cost of running a Kubernetes cluster on Hetzner Cloud. Choose server types for control planes, workers, and load balancers with HA mode.
etcd Backup Size
Estimate the size of etcd snapshots and monthly backup storage for your Kubernetes cluster. Plan S3 storage costs for etcd backup retention.
Observability Sizing
Size your Prometheus, Grafana, Loki, and Alertmanager stack. Calculate RAM, disk, and CPU requirements based on your cluster size and retention period.
Related Generators
Related Comparisons
Related Guides
storage
Kubernetes Storage in 2026: When to Use Longhorn, Rook-Ceph, or OpenEBS
A deep dive into the three most popular self-hosted Kubernetes storage solutions — what each does well, how to install and configure Longhorn, and how to choose between them.
storage
Longhorn vs Rook/Ceph for Kubernetes Storage: Which Should You Use?
A practical comparison of Longhorn and Rook/Ceph for self-hosted Kubernetes storage — setup complexity, resource usage, performance, and when each is the right choice.