Skip to main content

Longhorn

Longhorn is a lightweight distributed block storage system for cloud native storage Kubernetes that allows you to replicate storage to Kubernetes clusters. Once Longhorn is installed, it adds persistent volume support to the Kubernetes cluster using containers and microservices.

Longhorn creates a dedicated storage controller for each block device volume and replicates the volume across multiple nodes.

Version Supported

Prerequisites

  • Kubernetes cluster is 1.21 or higher.

Parameters

The table lists commonly used parameters you can configure when adding this pack.

ParameterDescriptionDefault
defaultClassThe volume type to be used.true
defaultFsTypeThe default file system.ext4
defaultClassReplicaCountThe default number of copies of data store in your cluster.3
defaultDataLocalityThe default location where data computation will occur.disabled Best effort
reclaimPolicyThis means that a dynamically provisioned volume will be automatically deleted when deletes when corresponding PersistentVolumeClaim is deleted. For important data, it is more appropriate to use the "Retain" policyDelete
migratableThe ability to transfer data to another data storage systemsfalse
recurringJobSelector:enableThe management of recurring jobs. You can enable this feature and type a comma-separated list of jobs to run: recurringJobSelector:enable:jobList [ ]false

Usage

Longhorn provides these features:

  • Enterprise-grade distributed storage with no single point of failure.
  • Incremental snapshots of block storage.
  • Backup to secondary storage (NFSv4 or S3-compatible object storage) built on change block detection.
  • Recurring snapshot and backup.

For more information, check out Longhorn guide on How to Create Volumes.

Terraform

When using this Pack as a base layer, you need the following terraform code.

data "spectrocloud_registry" "public_registry" {
name = "Public Repo"
}

data "spectrocloud_pack_simple" "csi-longhorn" {
name = "longhorn"
version = "1.3.1"
type = "helm"
registry_uid = data.spectrocloud_registry.public_registry.id
}

References