arkade icon indicating copy to clipboard operation
arkade copied to clipboard

Add Longhorn to set up persistent storage

Open Christian-Rau opened this issue 4 years ago • 5 comments

Longhorn is a great tool used to set up and manage persistent data storage in any cluster. It comes with a simple GUI.

https://github.com/longhorn/longhorn

Thank you!

Christian-Rau avatar Jan 27 '21 08:01 Christian-Rau

I'm open to someone working on a PR for this, can you give some details on the installation method? Does it use helm?

Is it available for any other architecture other than x86_64? Potentially ARM64 but not ARMHF?

alexellis avatar Jan 28 '21 13:01 alexellis

Sounds great. For this purpose, there are 2 installation methods.

  • kubectl
  • Helm

Installation of Longhorn on K3s clusters, require some extra setup. According to the docs:

  • Longhorn v0.7.0 or higher.
  • open-iscsi or iscsiadm installed on the node.

The helm charts are located here: https://github.com/longhorn/charts

Helm 2: helm install ./longhorn/chart --name longhorn --namespace longhorn-system

Helm 3: When installing Longhorn with Helm 3, the namespace is created separately.

kubectl create namespace longhorn-system
helm install longhorn ./longhorn/chart/ --namespace longhorn-system

The yaml file for kubectl is here: longhorn.yaml

ARM64 support According to the 1.1.0 release notes (latest stable at the time of writing): ARM64 support (experimental) Longhorn now supports ARM64 architecture in addition to AMD64. You can deploy Longhorn as usual in ARM64 without any modification. What exactly as usual means I will try to look into.

Hope it helps. Edit: added link to open-iscsi and added info about ARM64 support.

Christian-Rau avatar Jan 28 '21 14:01 Christian-Rau

I would like work on PR on this, I just don't have the skills to do it. However, I would like to learn how to do it.

Christian-Rau avatar Feb 04 '21 20:02 Christian-Rau

open-iscsi or iscsiadm installed on the node

This is where users are likely to find this confusing.

Is there any documentation for adding that package to kind or k3s?

alexellis avatar Feb 07 '21 09:02 alexellis

sorry for late reply.

Rancher docs always confuse me... so they did again.

It seems there is an open-iscsi installer that does the trick. It enables the iscsi deamon as well.

kubectl apply -f https://raw.githubusercontent.com/longhorn/longhorn/v1.1.0/deploy/iscsi/longhorn-iscsi-installation.yaml

Then we need to make sure each node has a NFSv4 client installed. and ext4 or XFS file system is supported. and curl, findmnt, grep, awk, blkid, lsblk must be installed.

This script should check of the above req. curl -sSfL https://raw.githubusercontent.com/longhorn/longhorn/v1.1.0/scripts/environment_check.sh | bash

Edit: updated the requirements section

Christian-Rau avatar Apr 22 '21 17:04 Christian-Rau