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
- 1.5.x
- 1.4.x
- 1.3.x
Prerequisites
-
Kubernetes cluster is 1.21 or higher.
-
Different Operating Systems (OS) have different requirements for the Longhorn installation. Use the links below to learn more about the requirements for your OS.
Parameters
The table lists commonly used parameters you can configure when adding this pack. Refer to the Settings Reference resource for a complete list of Longhorn parameters and their descriptions.
Parameter | Description | Default |
---|---|---|
pack.namespace | The namespace where the Longhorn will be installed. If the namespace does not exist, it will be created. | longhorn-system |
charts.longhorn.global.persistence.defaultClass | The volume type to be used. | true |
charts.longhorn.global.persistence.defaultFsType | The default file system. | ext4 |
charts.longhorn.global.persistence.defaultClassReplicaCount | The default number of copies of data store in your cluster. | 3 |
charts.longhorn.global.persistence.defaultDataLocality | The default location where data computation will occur. | disabled |
charts.longhorn.global.persistence.reclaimPolicy | The policy that regulates dynamically provisioned volumes when its corresponding PersistentVolumeClaim is deleted. The default policy is Delete . This means that a dynamically provisioned volume will be automatically deleted when corresponding PersistentVolumeClaim is deleted. For important data, it is more appropriate to use the "Retain" policy. | Delete |
charts.longhorn.global.persistence.migratable | The ability to transfer data to another data storage systems. | false |
charts.longhorn.global.persistence.recurringJobSelector.enable | The management of recurring jobs. You can enable this feature and type a comma-separated list of jobs to activate. | false |
Usage
The official Longhorn documentation contains several guides and examples. The following guides are a good place to start when learning how to use Longhorn.
We also recommend you check out the Examples section of the Longhorn documentation. The examples section contains several use cases of how to configure Longhorn.
Known Issues
The following known issues exist in the Longhorn 1.5.X release.
-
A deadlock may occurs when using a RWX volume and a cluster node is recreated. This issue is disclosed as a known issue in the Longhorn GitHub repository] and a fix is on the roadmap. Workarounds provided by the community can be found in the issue discussion.
-
Rebooting or upgrading a cluster with Longhorn has a small possibility of triggering a race condition that causes pods to be stuck in the terminating state. This issue is related to a known issue in the Longhorn GitHub repository and a fix is on the roadmap.
Prerequisites
-
Kubernetes cluster is 1.21 or higher.
-
Different Operating Systems (OS) have different requirements for the Longhorn installation. Use the links below to learn more about the requirements for your OS.
Parameters
The table lists commonly used parameters you can configure when adding this pack. Refer to the Settings Reference resource for a complete list of Longhorn parameters and their descriptions.
Parameter | Description | Default |
---|---|---|
pack.namespace | The namespace where the Longhorn will be installed. If the namespace does not exist, it will be created. | longhorn-system |
charts.longhorn.global.persistence.defaultClass | The volume type to be used. | true |
charts.longhorn.global.persistence.defaultFsType | The default file system. | ext4 |
charts.longhorn.global.persistence.defaultClassReplicaCount | The default number of copies of data store in your cluster. | 3 |
charts.longhorn.global.persistence.defaultDataLocality | The default location where data computation will occur. | disabled |
charts.longhorn.global.persistence.reclaimPolicy | This 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" policy. | Delete |
charts.longhorn.global.persistence.migratable | The ability to transfer data to another data storage systems. | false |
charts.longhorn.global.persistence.recurringJobSelector.enable | The management of recurring jobs. You can enable this feature and type a comma-separated list of jobs to activate. | false |
Usage
The official Longhorn documentation contains several guides and examples. The following guides are a good place to start when learning how to use Longhorn.
We also recommend you check out the Examples section of the Longhorn documentation. The examples section contains several use cases of how to configure Longhorn.
Prerequisites
-
Kubernetes cluster is at least version 1.18 and not higher than 1.24.
-
Different Operating Systems (OS) have different requirements for the Longhorn installation. Use the links below to learn more about the requirements for your OS.
Parameters
The table lists commonly used parameters you can configure when adding this pack. Refer to the Settings Reference resource for a complete list of Longhorn parameters and their descriptions.
Parameter | Description | Default |
---|---|---|
pack.namespace | The namespace where the Longhorn will be installed. If the namespace does not exist, it will be created. | longhorn-system |
charts.longhorn.global.persistence.defaultClass | The volume type to be used. | true |
charts.longhorn.global.persistence.defaultFsType | The default file system. | ext4 |
charts.longhorn.global.persistence.defaultClassReplicaCount | The default number of copies of data store in your cluster. | 3 |
charts.longhorn.global.persistence.defaultDataLocality | The default location where data computation will occur. | disabled |
charts.longhorn.global.persistence.reclaimPolicy | This 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 policy. | Delete |
charts.longhorn.global.persistence.migratable | The ability to transfer data to another data storage systems. | false |
charts.longhorn.global.persistence.recurringJobSelector.enable | The management of recurring jobs. You can enable this feature and type a comma-separated list of jobs to activate. | false |
Usage
The official Longhorn documentation contains several guides and examples. The following guides are a good place to start when learning how to use Longhorn.
We also recommend you check out the Examples section of the Longhorn documentation. The examples section contains several use cases of how to configure Longhorn.
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.5.1"
type = "helm"
registry_uid = data.spectrocloud_registry.public_registry.id
}