Longhorn: Understanding How It Works with Practical Examples
Disaster Recovery Volumes
In the event of a disaster, Longhorn provides a Disaster Recovery Volume feature that allows you to restore a volume from a backup cluster if the main cluster fails. DR volumes improve data resiliency by continuously syncing data from backups in the backup store.
Before activation, DR volumes are limited and cannot perform actions like creating, deleting, or reverting snapshots, making backups, or creating persistent volumes/claims. They are created from backups and incrementally restored from the latest data.
If the main cluster goes down, a DR volume can be activated immediately to reduce recovery time. Let's say we have two clusters, MainCluster and DRCluster. In MainCluster, we have a volume called MainVolume. We want to create a DR volume called DRVolume in DRCluster using the backup of MainVolume.
To activate a DR volume, you need to:
- Create a backup store in
MainCluster. This will create a backup ofMainVolume(as well as other volumes in the main cluster, but our interest is inMainVolume). - Create
DRCluster(a separate Kubernetes cluster). - Install Longhorn in
DRCluster.
End-to-End Kubernetes with Rancher, RKE2, K3s, Fleet, Longhorn, and NeuVector
The full journey from nothing to productionEnroll now to unlock all content and receive all future updates for free.
