Lucene search

K
veeamVeeam softwareVEEAM:KB4592
HistoryJun 07, 2024 - 12:00 a.m.

Debugging Backups with Longhorn CSI

2024-06-0700:00:00
Veeam software
www.veeam.com
3
longhorn csi
veeam
debugging
backups
software

AI Score

6.9

Confidence

High

Challenge

Veeam Kasten for Kubernetes backup job that doesn’t complete while using Longhorn CSI drivers is never-ending even after the proper installation of CSI snapshotter components and controllers.

No errors are noticed generally for this issue. The job waits for the volumesnapshot object in the k8s to become readyToUse.

During this state, the manifest for the volumesnapshot shows “readyToUse: false”

$ kubectl get volumesnapshot k10-csi-snap-h5vglbt6b7fr6dnd -n postgresql
NAME                            READYTOUSE   SOURCEPVC                    SOURCESNAPSHOTCONTENT   RESTORESIZE   SNAPSHOTCLASS      SNAPSHOTCONTENT                                    CREATIONTIME   AGE
k10-csi-snap-h5vglbt6b7fr6dnd   **false**        data-postgres-postgresql-0     

Solution

The default behavior of associating a Longhorn backup (backup to a target s3/NFS) or a Longhorn snapshot to a CSI snapshot is dependent on the version of the Longhorn driver used.

The sections below provide details regarding the behaviors and recommended ways to configure CSI snapshots with different versions of Longhorn drivers.

Longhorn versions 1.2.4 and lower

In Longhorn versions 1.2.4 or below, when the snapshot is invoked through a CSI driver, Longhorn will default to Longhorn backups due to the unavailability of CSI snapshot mapping to Longhorn snapshot.

**Note:**There is no explicit mention of this behavior in Longhorn documentation. However, a reference to this behavior can be found here in the GitHub issue comment.

So, it is required to have a backup target when we run Veeam Kasten for Kubernetes policies.
The following can be configured as Backup targets.

  • S3 Object store
  • S3 compatible Object store like MinIO
  • NFS (must support NFSv4)

Please refer to this longhorn documentation to configure the Backup target.

Longhorn Versions 1.3.0 and higher

From version 1.3.0, Longhorn allows configuration options and the capability to handle CSI snapshots. It can be either pointed to Longhorn Snapshot or Longhorn Backup based on the requirement.

It is recommended to use longhorn snapshots with Veeam Kasten for Kubernetes to take advantage of snapshot capability for platform-agnostic portable backups using exports in Veeam Kasten for Kubernetes.

For CSI snapshots to be associated with a longhorn snapshot, the type parameter has to be set tosnap in longhorn volumesnapshotclass.

apiVersion: snapshot.storage.k8s.io/v1
deletionPolicy: Delete
driver: driver.longhorn.io
kind: VolumeSnapshotClass
metadata:
  name: longhorn
parameters:
  type: snap 

To submit feedback regarding this article, please click this link: Send Article Feedback
To report a typo on this page, highlight the typo with your mouse and press CTRL + Enter.

AI Score

6.9

Confidence

High