### Successful Longhorn Installation Example Source: https://longhorn.io/docs/1.12.0/deploy/install/install-with-argocd Example output showing Longhorn pods running successfully. This indicates that the installation has completed and the components are operational. ```text NAME READY STATUS RESTARTS AGE longhorn-ui-b7c844b49-w25g5 1/1 Running 0 2m41s longhorn-manager-pzgsp 1/1 Running 0 2m41s longhorn-driver-deployer-6bd59c9f76-lqczw 1/1 Running 0 2m41s longhorn-csi-plugin-mbwqz 2/2 Running 0 100s csi-snapshotter-588457fcdf-22bqp 1/1 Running 0 100s csi-snapshotter-588457fcdf-2wd6g 1/1 Running 0 100s csi-provisioner-869bdc4b79-mzrwf 1/1 Running 0 101s csi-provisioner-869bdc4b79-klgfm 1/1 Running 0 101s csi-resizer-6d8cf5f99f-fd2ck 1/1 Running 0 101s csi-provisioner-869bdc4b79-j46rx 1/1 Running 0 101s csi-snapshotter-588457fcdf-bvjdt 1/1 Running 0 100s csi-resizer-6d8cf5f99f-68cw7 1/1 Running 0 101s csi-attacher-7bf4b7f996-df8v6 1/1 Running 0 101s csi-attacher-7bf4b7f996-g9cwc 1/1 Running 0 101s csi-attacher-7bf4b7f996-8l9sw 1/1 Running 0 101s csi-resizer-6d8cf5f99f-smdjw 1/1 Running 0 101s instance-manager-b34d5db1fe1e2d52bcfb308be3166cfc 1/1 Running 0 114s engine-image-ei-df38d2e5-cv6nc 1/1 Running 0 114s ``` -------------------------------- ### Example: Full Ingress Setup and Test Source: https://longhorn.io/docs/1.12.0/deploy/accessing-the-ui/longhorn-ingress Demonstrates a complete workflow including generating credentials, creating the secret, applying the Ingress manifest, and testing access via curl. This example uses 'foo' as username and 'bar' as password. ```bash $ USER=foo; PASSWORD=bar; echo "${USER}:$(openssl passwd -stdin -apr1 <<< ${PASSWORD})" >> auth $ cat auth foo:$apr1$FnyKCYKb$6IP2C45fZxMcoLwkOwf7k0 $ kubectl -n longhorn-system create secret generic basic-auth --from-file=auth secret/basic-auth created $ kubectl -n longhorn-system get secret basic-auth -o yaml apiVersion: v1 data: auth: Zm9vOiRhcHIxJEZueUtDWUtiJDZJUDJDNDVmWnhNY29Md2tPd2Y3azAK kind: Secret metadata: creationTimestamp: "2020-05-29T10:10:16Z" name: basic-auth namespace: longhorn-system resourceVersion: "2168509" selfLink: /api/v1/namespaces/longhorn-system/secrets/basic-auth uid: 9f66233f-b12f-4204-9c9d-5bcaca794bb7 type: Opaque $ echo " apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: longhorn-ingress namespace: longhorn-system annotations: # type of authentication nginx.ingress.kubernetes.io/auth-type: basic # prevent the controller from redirecting (308) to HTTPS nginx.ingress.kubernetes.io/ssl-redirect: 'false' # name of the secret that contains the user/password definitions nginx.ingress.kubernetes.io/auth-secret: basic-auth # message to display with an appropriate context why the authentication is required nginx.ingress.kubernetes.io/auth-realm: 'Authentication Required ' spec: rules: - http: paths: - pathType: Prefix path: "/" backend: service: name: longhorn-frontend port: number: 80 " | kubectl -n longhorn-system create -f - ingress.networking.k8s.io/longhorn-ingress created $ kubectl -n longhorn-system get ingress NAME HOSTS ADDRESS PORTS AGE longhorn-ingress * 45.79.165.114,66.228.45.37,97.107.142.125 80 2m7s $ curl -v http://97.107.142.125/ * Trying 97.107.142.125... * TCP_NODELAY set * Connected to 97.107.142.125 (97.107.142.125) port 80 (#0) > GET / HTTP/1.1 > Host: 97.107.142.125 > User-Agent: curl/7.64.1 > Accept: */* > < HTTP/1.1 401 Unauthorized < Server: openresty/1.15.8.1 < Date: Fri, 29 May 2020 11:47:33 GMT < Content-Type: text/html < Content-Length: 185 < Connection: keep-alive < WWW-Authenticate: Basic realm="Authentication Required" < ``` -------------------------------- ### Perform Preflight Dependencies Installation Source: https://longhorn.io/docs/1.12.0/advanced-resources/longhornctl Use this command to install and set up necessary dependencies before installing Longhorn. ```bash longhornctl install preflight ``` -------------------------------- ### Complete fleet.yaml for Longhorn Installation Source: https://longhorn.io/docs/1.12.0/deploy/install/install-with-fleet An example of a complete `fleet.yaml` file that includes namespace, Helm chart details, and CRD patch configurations for Longhorn deployment. ```yaml defaultNamespace: longhorn-system helm: repo: https://charts.longhorn.io chart: longhorn version: v1.12.0 releaseName: longhorn diff: comparePatches: - apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition name: engineimages.longhorn.io operations: - {"op": "replace", "path": "/status"} - apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition name: nodes.longhorn.io operations: - {"op": "replace", "path": "/status"} - apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition name: volumes.longhorn.io operations: - {"op": "replace", "path": "/status"} ``` -------------------------------- ### Install V2 Data Engine Prerequisites Source: https://longhorn.io/docs/1.12.0/deploy/install Use this command with the `--enable-spdk` flag to install prerequisites for the V2 Data Engine. A reboot may be required on some immutable Linux distributions after the initial install command. ```bash longhornctl --kubeconfig ~/.kube/config --image longhornio/longhorn-cli:v1.12.0 install preflight --enable-spdk ``` -------------------------------- ### Get Kubelet Logs (Containerized Installation) Source: https://longhorn.io/docs/1.12.0/troubleshoot/troubleshooting Retrieve logs from the Kubelet process when it is running as a container, such as in RKE environments. This helps in troubleshooting FlexVolume driver issues in containerized setups. ```bash docker logs kubelet ``` -------------------------------- ### Example Output: IOMMU Enabled Source: https://longhorn.io/docs/1.12.0/advanced-resources/v2-data-engine/interrupt-mode This is an example of the expected output when IOMMU is enabled, showing device paths within IOMMU groups. ```bash /sys/kernel/iommu_groups/0/devices/0000:e6:0b.1 /sys/kernel/iommu_groups/1/devices/0000:34:0a.6 /sys/kernel/iommu_groups/2/devices/0000:a0:00.0 ``` -------------------------------- ### Install Cryptsetup on SUSE/OpenSUSE Source: https://longhorn.io/docs/1.12.0/deploy/install Installs the cryptsetup tool on SUSE and OpenSUSE systems, enabling Longhorn's volume encryption capabilities. ```bash zypper install cryptsetup ``` -------------------------------- ### Example Longhorn Service Output Source: https://longhorn.io/docs/1.12.0/deploy/accessing-the-ui Example output from 'kubectl get svc' for Longhorn v0.8.0 and later, showing the ClusterIP of the longhorn-frontend service which is used to access the UI. ```text NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE longhorn-backend ClusterIP 10.20.248.250 9500/TCP 58m longhorn-frontend ClusterIP 10.20.245.110 80/TCP 58m ``` -------------------------------- ### Install Argo CD Source: https://longhorn.io/docs/1.12.0/deploy/install/install-with-argocd Install Argo CD into the 'argocd' namespace and apply the core installation manifest. Allow time for Argo CD components to deploy. ```bash kubectl create namespace argocd kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/core-install.yaml ``` -------------------------------- ### Basic Longhorn Installation with HTTPRoute Enabled Source: https://longhorn.io/docs/1.12.0/deploy/accessing-the-ui/longhorn-httproute Installs Longhorn using Helm, enabling HTTPRoute generation and configuring basic gateway references and hostnames. ```bash helm install longhorn longhorn/longhorn \ --namespace longhorn-system \ --create-namespace \ --set "httproute.enabled=true" \ --set "httproute.parentRefs[0].name=my-gateway" \ --set "httproute.parentRefs[0].namespace=default" \ --set "httproute.hostnames[0]=longhorn.example.com" ``` -------------------------------- ### Get Kubelet Logs (Native Installation) Source: https://longhorn.io/docs/1.12.0/troubleshoot/troubleshooting Retrieve logs from the Kubelet service when it is running natively on the node. This command is useful for diagnosing issues related to FlexVolume driver integration. ```bash journalctl -u kubelet ``` -------------------------------- ### Install V1 Data Engine Prerequisites Source: https://longhorn.io/docs/1.12.0/deploy/install Run this command to install the default V1 Data Engine prerequisites. Ensure you have the correct kubeconfig path and image tag. ```bash longhornctl --kubeconfig ~/.kube/config --image longhornio/longhorn-cli:v1.12.0 install preflight ``` -------------------------------- ### Add Fleet Helm Repository and Install Fleet Source: https://longhorn.io/docs/1.12.0/deploy/install/install-with-fleet Add the Fleet Helm repository and then install the Fleet CRDs and the Fleet controller. Ensure the `cattle-fleet-system` namespace is created if it doesn't exist. The `--wait` flag ensures the installation completes before proceeding. ```bash helm repo add fleet https://rancher.github.io/fleet-helm-charts/ helm -n cattle-fleet-system install --create-namespace --wait fleet-crd fleet/fleet-crd helm -n cattle-fleet-system install --create-namespace --wait fleet fleet/fleet ``` -------------------------------- ### Install open-iscsi on RHEL/CentOS/EKS Source: https://longhorn.io/docs/1.12.0/deploy/install Installs iscsi-initiator-utils, configures the initiator name, and enables the iscsid daemon on RHEL-based systems. ```shell yum --setopt=tsflags=noscripts install iscsi-initiator-utils echo "InitiatorName=$(/sbin/iscsi-iname)" > /etc/iscsi/initiatorname.iscsi systemctl enable iscsid systemctl start iscsid ``` -------------------------------- ### Install Cryptsetup on Debian/Ubuntu Source: https://longhorn.io/docs/1.12.0/deploy/install Installs the cryptsetup tool, which is used for setting up dm-crypt based device-mapper targets and supports LUKS2 format for Longhorn volume encryption. ```bash apt-get install cryptsetup ``` -------------------------------- ### Install NFSv4 Client on SUSE/OpenSUSE Source: https://longhorn.io/docs/1.12.0/deploy/install Installs the NFSv4 client userspace daemon and utilities on SUSE and OpenSUSE systems. ```bash zypper install nfs-client ``` -------------------------------- ### Install Longhorn using Helm Source: https://longhorn.io/docs/1.12.0/deploy/install/airgap Install Longhorn using Helm after configuring `chart/values.yaml` for an airgapped environment. Ensure the namespace is created. ```bash helm install longhorn ./chart --namespace longhorn-system --create-namespace ``` -------------------------------- ### Example: Triggering On-Demand Checksum for All Volumes via CLI Source: https://longhorn.io/docs/1.12.0/advanced-resources/data-integrity/on-demand-snapshot-data-integrity This example demonstrates the command to trigger on-demand snapshot checksum calculation for all volumes and shows the expected output indicating the request submission and completion. ```bash ./longhornctl-linux-amd64 checksum volume --all=true ``` ```text INFO[2026-03-18T17:04:27+08:00] Triggering on-demand snapshot checksum calculation INFO[2026-03-18T17:04:27+08:00] Requested on-demand checksum calculation for volume tmp1 volume=tmp1 INFO[2026-03-18T17:04:27+08:00] Requested on-demand checksum calculation for volume tmp2 volume=tmp2 INFO[2026-03-18T17:04:27+08:00] Snapshot checksum calculation may take some time. You can check the snapshot checksum via kubectl. INFO[2026-03-18T17:04:27+08:00] Checksum request submitted INFO[2026-03-18T17:04:27+08:00] Cleaning volume on-demand checksum requester INFO[2026-03-18T17:04:27+08:00] Completed volume on-demand checksum requester ``` -------------------------------- ### Kubernetes Block Volume Example Source: https://longhorn.io/docs/1.12.0/references/examples This example demonstrates how to provision and use a block volume with Longhorn. It includes a PersistentVolumeClaim configured for block access and a Pod that mounts the block device. ```yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: name: longhorn-block-vol spec: accessModes: - ReadWriteOnce volumeMode: Block storageClassName: longhorn resources: requests: storage: 2Gi --- apiVersion: v1 kind: Pod metadata: name: block-volume-test namespace: default spec: containers: - name: block-volume-test image: nginx:stable-alpine imagePullPolicy: IfNotPresent volumeDevices: - devicePath: /dev/longhorn/testblk name: block-vol ports: - containerPort: 80 volumes: - name: block-vol persistentVolumeClaim: claimName: longhorn-block-vol ``` -------------------------------- ### Watch Longhorn Pods Installation Source: https://longhorn.io/docs/1.12.0/advanced-resources/os-distro-specific/okd-support Monitor the creation of Longhorn pods in the 'longhorn-system' namespace to track installation progress. ```bash oc get pods \ --namespace longhorn-system \ --watch ``` -------------------------------- ### Install Longhorn (Helm3) Source: https://longhorn.io/docs/1.12.0/deploy/install/airgap Command to install Longhorn using Helm3. Ensure you are in the correct directory containing the chart. ```bash helm install longhorn ./chart --namespace longhorn-system ``` -------------------------------- ### Kubernetes CSI Persistent Volume Example Source: https://longhorn.io/docs/1.12.0/references/examples This example shows how to use a CSI Persistent Volume with Longhorn. It defines a PersistentVolume, a PersistentVolumeClaim, and a Pod that consumes the volume. ```yaml apiVersion: v1 kind: PersistentVolume metadata: name: longhorn-vol-pv spec: capacity: storage: 2Gi volumeMode: Filesystem accessModes: - ReadWriteOnce persistentVolumeReclaimPolicy: Delete storageClassName: longhorn csi: driver: driver.longhorn.io fsType: ext4 volumeAttributes: numberOfReplicas: '3' staleReplicaTimeout: '2880' volumeHandle: existing-longhorn-volume --- apiVersion: v1 kind: PersistentVolumeClaim metadata: name: longhorn-vol-pvc spec: accessModes: - ReadWriteOnce resources: requests: storage: 2Gi volumeName: longhorn-vol-pv storageClassName: longhorn --- apiVersion: v1 kind: Pod metadata: name: volume-pv-test namespace: default spec: restartPolicy: Always containers: - name: volume-pv-test image: nginx:stable-alpine imagePullPolicy: IfNotPresent livenessProbe: exec: command: - ls - /data/lost+found initialDelaySeconds: 5 periodSeconds: 5 volumeMounts: - name: vol mountPath: /data ports: - containerPort: 80 volumes: - name: vol persistentVolumeClaim: claimName: longhorn-vol-pvc ``` -------------------------------- ### Install Longhorn with Custom Settings via Helm Source: https://longhorn.io/docs/1.12.0/advanced-resources/deploy/customizing-default-settings Use the Helm command with the `--set` flag to modify specific default settings during installation. This is useful for quick overrides. ```bash helm install longhorn longhorn/longhorn \ --namespace longhorn-system \ --create-namespace \ --set defaultSettings.taintToleration="key1=value1:NoSchedule; key2:NoExecute" ``` -------------------------------- ### Install Longhorn using customized values.yaml Source: https://longhorn.io/docs/1.12.0/advanced-resources/deploy/customizing-default-settings Install Longhorn using Helm, providing a customized `values.yaml` file with the `--values` flag. This applies all modifications defined in the file. ```bash helm install longhorn longhorn/longhorn \ --namespace longhorn-system \ --create-namespace \ --values values.yaml ``` -------------------------------- ### Install Cryptsetup on RHEL/CentOS/Rocky Linux/AmazonLinux2 Source: https://longhorn.io/docs/1.12.0/deploy/install Installs the cryptsetup tool on RHEL-based systems, including CentOS, Rocky Linux, and Amazon Linux 2 used in EKS, for Longhorn volume encryption. ```bash yum install cryptsetup ``` -------------------------------- ### Install Longhorn on OKD with Helm Source: https://longhorn.io/docs/1.12.0/advanced-resources/os-distro-specific/okd-support Use this Helm command to install Longhorn on an OKD cluster, enabling OpenShift specific configurations and setting the OAuth proxy image. ```bash helm install longhorn longhorn/longhorn \ --namespace longhorn-system \ --create-namespace \ --set openshift.enabled=true \ --set image.openshift.oauthProxy.repository=quay.io/openshift/origin-oauth-proxy \ --set image.openshift.oauthProxy.tag=4.18 ``` -------------------------------- ### Check Installation Job Status Source: https://longhorn.io/docs/1.12.0/deploy/install/install-with-helm-controller Verify the status of the Helm installation job created by the Helm Controller. This helps in confirming that the installation process has started or completed. ```bash $ kubectl get jobs NAME COMPLETIONS DURATION AGE helm-install-longhorn-install 0/1 8s 8s ``` -------------------------------- ### Verify longhornctl Installation Source: https://longhorn.io/docs/1.12.0/advanced-resources/longhornctl/install-longhornctl Confirm that longhornctl has been installed correctly by checking its version. This command should output the installed version of the tool. ```bash longhornctl version ``` -------------------------------- ### Enable and Start iSCSI Daemon Source: https://longhorn.io/docs/1.12.0/advanced-resources/os-distro-specific/csi-on-rke-and-coreos Enables the systemd service for the iSCSI daemon to start automatically at boot. Alternatively, it can be started for the current session. ```bash sudo su systemctl enable iscsid reboot ``` ```bash sudo su systemctl start iscsid ``` -------------------------------- ### Create a Custom StorageClass with Node and Disk Selectors Source: https://longhorn.io/docs/1.12.0/nodes-and-volumes/nodes/storage-tags This example demonstrates creating a custom StorageClass named `longhorn-fast` to provision volumes with specific disk and node tag requirements. This is useful for creating specialized storage classes for different performance tiers. ```yaml kind: StorageClass apiVersion: storage.k8s.io/v1 metadata: name: longhorn-fast provisioner: driver.longhorn.io parameters: numberOfReplicas: "3" staleReplicaTimeout: "480" # 8 hours in minutes diskSelector: "ssd" nodeSelector: "storage,fast" ``` -------------------------------- ### Deploy Backupstore Credentials and Service Source: https://longhorn.io/docs/1.12.0/snapshots-and-backups/backup-and-restore/set-backup-target Apply the generated Kustomize configuration to deploy the backupstore credentials and service using kubectl. ```bash kubectl apply -k deploy/backupstores/overlays/generated-credentials/minio ``` -------------------------------- ### NFSv4 Client Installation Troubleshooting Source: https://longhorn.io/docs/1.12.0/nodes-and-volumes/volumes/rwx-volumes This message appears if the NFSv4 client is not installed on a node, which is a requirement for generic RWX volumes. Ensure the client is installed before attempting to mount. ```text for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount. helper program. ``` -------------------------------- ### Example Longhorn values.yaml Configuration Source: https://longhorn.io/docs/1.12.0/advanced-resources/deploy/customizing-default-settings A snippet of the `values.yaml` file showing various default settings that can be customized. Uncomment or modify lines to apply custom values. ```yaml defaultSettings: backupTarget: s3://backupbucket@us-east-1/backupstore backupTargetCredentialSecret: minio-secret createDefaultDiskLabeledNodes: true defaultDataPath: /var/lib/longhorn-example/ replicaSoftAntiAffinity: false storageOverProvisioningPercentage: 600 storageMinimalAvailablePercentage: 15 upgradeChecker: false defaultReplicaCount: 2 defaultDataLocality: disabled defaultLonghornStaticStorageClass: longhorn-static-example backupstorePollInterval: 500 taintToleration: key1=value1:NoSchedule; key2:NoExecute systemManagedComponentsNodeSelector: "label-key1:label-value1" priorityClass: high-priority autoSalvage: false disableSchedulingOnCordonedNode: false replicaZoneSoftAntiAffinity: false replicaDiskSoftAntiAffinity: false volumeAttachmentRecoveryPolicy: never nodeDownPodDeletionPolicy: do-nothing guaranteedInstanceManagerCpu: 15 orphanResourceAutoDeletion: "" orphanResourceAutoDeletionGracePeriod: 300 ``` -------------------------------- ### Install open-iscsi on Debian/Ubuntu Source: https://longhorn.io/docs/1.12.0/deploy/install Installs the open-iscsi package on Debian-based systems. ```shell apt-get install open-iscsi ``` -------------------------------- ### Backup Configuration Example Source: https://longhorn.io/docs/1.12.0/advanced-resources/data-recovery/recover-without-system This JSON object shows the structure of a backup configuration file, including backup name, volume name, and snapshot name. ```json {"Name":"backup-72bcbdad913546cf","VolumeName":"volume_1","SnapshotName":"79758033-a670-4724-906f-41921f53c475"} ``` -------------------------------- ### Install Longhorn Source: https://longhorn.io/docs/1.12.0/deploy/install/install-with-kubectl Apply the Longhorn deployment manifest to install Longhorn on a Kubernetes cluster. ```bash kubectl apply -f https://raw.githubusercontent.com/longhorn/longhorn/v1.12.0/deploy/longhorn.yaml ``` -------------------------------- ### Deploy Backupstore Credentials and Service Source: https://longhorn.io/docs/1.12.0/snapshots-and-backups/backup-and-restore/set-backup-target Apply the generated Kustomize overlay to deploy the backupstore credentials and associated service. This command uses 'kubectl apply -k' to apply the configuration from the specified overlay directory. ```shell kubectl apply -k deploy/backupstores/overlays/generated-credentials/azurite ``` -------------------------------- ### Install open-iscsi on SUSE/openSUSE Source: https://longhorn.io/docs/1.12.0/deploy/install Installs the open-iscsi package and enables the iscsid daemon on SUSE-based systems. ```shell zypper install open-iscsi systemctl enable iscsid systemctl start iscsid ``` -------------------------------- ### Install Gateway API CRDs Source: https://longhorn.io/docs/1.12.0/deploy/accessing-the-ui/longhorn-httproute Installs the necessary Custom Resource Definitions for the Gateway API. ```bash kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.2.0/standard-install.yaml ``` -------------------------------- ### Apply Snapshot Manifest with kubectl Source: https://longhorn.io/docs/1.12.0/snapshots-and-backups/setup-a-snapshot Apply the prepared manifest file to create the snapshot using kubectl. ```bash kubectl apply -f longhorn-snapshot.yaml ``` -------------------------------- ### Set up NFS Backupstore URL Source: https://longhorn.io/docs/1.12.0/snapshots-and-backups/backup-and-restore/set-backup-target The target URL for an NFS backupstore should point to the NFS service. Default mount options are used if `nfsOptions` is not specified. ```text nfs://longhorn-test-nfs-svc.default:/opt/backupstore ``` -------------------------------- ### Install Longhorn (Helm2) Source: https://longhorn.io/docs/1.12.0/deploy/install/airgap Command to install Longhorn using Helm2. Ensure you are in the correct directory containing the chart. ```bash helm install ./chart --name longhorn --namespace longhorn-system ``` -------------------------------- ### Deploy CIFS Credentials and Service Source: https://longhorn.io/docs/1.12.0/snapshots-and-backups/backup-and-restore/set-backup-target Apply the generated Kustomize overlay to deploy the CIFS credentials and associated service. ```bash kubectl apply -k deploy/backupstores/overlays/generated-credentials/cifs ``` -------------------------------- ### Run V2 Data Engine Preflight Check Source: https://longhorn.io/docs/1.12.0/deploy/install Execute the preflight check with the `--enable-spdk` flag for the V2 Data Engine. This validates additional requirements for SPDK and huge pages. ```bash ./longhornctl check preflight --enable-spdk ``` -------------------------------- ### Set up SMB/CIFS Backupstore with Custom Mount Options Source: https://longhorn.io/docs/1.12.0/snapshots-and-backups/backup-and-restore/set-backup-target To use custom mount options for a CIFS backupstore, append the `cifsOptions` query parameter to the target URL. Any specified options will replace the default options. ```text cifs://longhorn-test-cifs-svc.default/backupstore?cifsOptions=rsize=65536,wsize=65536,soft ``` -------------------------------- ### Default StorageClass Parameters Example Source: https://longhorn.io/docs/1.12.0/deploy/upgrade/longhorn-manager Shows the default parameters for a StorageClass, including replica count, stale replica timeout, backup source, and base image. ```yaml parameters: numberOfReplicas: staleReplicaTimeout: "30" fromBackup: "" baseImage: "" ``` -------------------------------- ### Verify Longhorn Installation Source: https://longhorn.io/docs/1.12.0/deploy/install/install-with-argocd Check the status of Longhorn pods in the 'longhorn-system' namespace to verify a successful installation. All pods should be in a 'Running' state. ```bash kubectl -n longhorn-system get pod ``` -------------------------------- ### Install longhornctl Binary Source: https://longhorn.io/docs/1.12.0/advanced-resources/longhornctl/install-longhornctl Install the verified longhornctl binary to a directory in your system's PATH, such as /usr/local/bin/longhornctl, making it accessible system-wide. ```bash sudo install longhornctl-linux-${ARCH} /usr/local/bin/longhornctl ``` -------------------------------- ### Set up SMB/CIFS Backupstore URL Source: https://longhorn.io/docs/1.12.0/snapshots-and-backups/backup-and-restore/set-backup-target The URL for a CIFS backupstore should follow the format `cifs:///`. The credential secret must be specified in the backup target configuration. ```text cifs://longhorn-test-cifs-svc.default/backupstore ``` -------------------------------- ### Download Longhorn Deployment Manifest Source: https://longhorn.io/docs/1.12.0/deploy/install/airgap Use wget to download the Longhorn deployment manifest file from the specified URL. ```bash wget https://raw.githubusercontent.com/longhorn/longhorn/v1.12.0/deploy/longhorn.yaml ``` -------------------------------- ### Longhorn VolumeAttachment CR Example Output Source: https://longhorn.io/docs/1.12.0/advanced-resources/volumeattachment This is an example of the YAML output for a Longhorn VolumeAttachment custom resource, showing spec and status details. ```yaml apiVersion: v1 ... spec: attachmentTickets: csi-f0471a334f0b249f964cd1dec461a5eb94c8d268cbbc904c1a8e9a37e2045208: generation: 0 id: csi-f0471a334f0b249f964cd1dec461a5eb94c8d268cbbc904c1a8e9a37e2045208 nodeID: rancher60-master parameters: disableFrontend: "false" lastAttachedBy: "" type: csi-attacher volume: pvc-b26e9514-aafd-46e0-b70c-4e3f187c7977 status: attachmentTicketStatuses: csi-f0471a334f0b249f964cd1dec461a5eb94c8d268cbbc904c1a8e9a37e2045208: conditions: - lastProbeTime: "" lastTransitionTime: "2025-07-05T09:17:27Z" message: "" reason: "" status: "True" type: Satisfied generation: 0 id: csi-f0471a334f0b249f964cd1dec461a5eb94c8d268cbbc904c1a8e9a37e2045208 satisfied: true ... ``` -------------------------------- ### Install Device Mapper on SUSE/OpenSUSE Source: https://longhorn.io/docs/1.12.0/deploy/install Installs the device mapper userspace tool on SUSE and OpenSUSE systems, supporting Longhorn's disk encryption capabilities. ```bash zypper install device-mapper ``` -------------------------------- ### Install Device Mapper on Debian/Ubuntu Source: https://longhorn.io/docs/1.12.0/deploy/install Installs the device mapper userspace tool on Debian-based systems. This framework is foundational for Longhorn's dm-crypt disk encryption. ```bash apt-get install dmsetup ``` -------------------------------- ### Generate Kustomize Overlay for Backupstore Credentials Source: https://longhorn.io/docs/1.12.0/snapshots-and-backups/backup-and-restore/set-backup-target Use the provided script to generate a Kustomize overlay for backupstore credentials. This command takes the Azure Blob Storage provider (e.g., 'azurite') as an argument and creates an overlay directory containing the necessary configuration. ```shell ./scripts/generate-backupstore-credentials.sh azurite ```