https://rancher.com/ logo
Title
c

cool-state-48214

05/09/2022, 7:35 PM
hello everybody, hope you are all doin’ well. anybody succeeded in snapshoting a longhorn volume from k10 ? the tool from casten.io said cluster is not csi capable
g

great-tailor-21038

05/09/2022, 9:37 PM
Did you follow https://kb.kasten.io/knowledge/debugging-backups-with-longhorn-csi ? We (Kasten) have been able to deploy k3s with longhorn and take backups without issues. Feel free to open a support ticket with us if you need help (we have a section for community/trial K10 support on our support website at my.veeam.com)
b

bland-byte-60612

05/09/2022, 9:52 PM
Hi @cool-state-48214 Can you tell me what version of K3s you are using? I just tested Kasten K10 with Longhorn with K3s 1.21 without issue. I'm investigating if there is a CSI API issue on 1.22+
Update 2. I built a K3s cluster on 1.22 - I did duplicate the primer.sh error "Cluster is not CSI ready". However, I believe this to be a cosmetic issue with our primer script that we will have to look in to further. I suggest testing with kubestr as this validated on my cluster. I'll paste here my entire set of notes for setting up my 1.22 K3s cluster with longhorn and Kasten.
Prepare K3s Nodes for Longhorn ISCSI (CentOS 7)
--------------------------------
yum install -y iscsi-initiator-utils

cat <<EOF > iscsid.te
module iscsid 1.0;
require {
        type iscsid_t;
        class system module_load;
}
allow iscsid_t self:system module_load;
EOF
checkmodule -M -m -o iscsid.mod iscsid.te
semodule_package -m iscsid.mod -o iscsid.pp
semodule -i iscsid.pp
rm -f iscsid.mod iscsid.te iscsid.pp
(Install Longhorn from Rancher UI)
Install snaphot CRDs
------------------------------------
git clone <https://github.com/kubernetes-csi/external-snapshotter.git>
kubectl kustomize external-snapshotter/client/config/crd | kubectl create -f -
kubectl -n kube-system kustomize external-snapshotter/deploy/kubernetes/snapshot-controller | kubectl create -f -

Enable Longhorn Snapshot Class
--------------------------------------

cat <<EOF>> longhorn-csi-snapshotclass.yaml
apiVersion: <http://snapshot.storage.k8s.io/v1|snapshot.storage.k8s.io/v1>
kind: VolumeSnapshotClass
metadata:
  name: longhorn
  annotations:
    <http://k10.kasten.io/is-snapshot-class|k10.kasten.io/is-snapshot-class>: "true"
driver: <http://driver.longhorn.io|driver.longhorn.io>
deletionPolicy: Delete
EOF
kubectl apply -f longhorn-csi-snapshotclass.yaml --kubeconfig k3sconfig

Install local minio for longhorn
--------------------------------------
kubectl create -f <https://raw.githubusercontent.com/longhorn/longhorn/master/deploy/backupstores/minio-backupstore.yaml>

Go to the Longhorn UI. In the top navigation bar, click Settings. In the Backup section, set Backup Target to

<s3://backupbucket@us-east-1/>

And set Backup Target Credential Secret to:

minio-secret

Testing CSI
---------------------------------------
kubestr csicheck -s longhorn -v longhorn

Install Kasten K10
----------------------------------------
helm repo add kasten <https://charts.kasten.io/>
helm repo update
kubectl create namespace kasten-io
helm install k10 kasten/k10 --namespace=kasten-io

Port Forwarding Kasten UI
---------------------------------------
kubectl --namespace kasten-io port-forward service/gateway --address 172.18.117.110 8080:8000 > /dev/null 2>&1 & 

Demo Application (Pacman)
---------------------------------
kubectl create namespace pacman
helm repo add veducate <https://saintdle.github.io/helm-charts/>
helm install pacman veducate/pacman -n pacman
c

cool-state-48214

05/10/2022, 8:05 AM
thank you so much @bland-byte-60612!!! I apreciate! I have tested k10 with k3s (latest version v1.23.6+k3s1) The problem is when I started to snapshot a namespace, all is working fine until snapshoting longhorn volume. Will try with version 1.21. My problem seems to be the same as https://github.com/longhorn/longhorn/issues/2217 Thanks again for your time and keep up the good work, k10 is awesome
well, fired up a scaleway machine, just follow your runbook (ubuntu, not centos), and snapshoting not working on v1.21 k3s :
Job failed to be executed Failed to fetch the snapshot session Volume Snapshots are not supported for this storage provider.Try K10's Generic Storage Backup method(https://docs.kasten.io/latest/install/generic.html?#generic-storage-backup-and-restore) or contact support@kasten.io
which is pretty the same as k10 prerequisites tool
g

great-tailor-21038

05/10/2022, 9:39 AM
Did you follow all the steps? including installing the snapshot CRDs and the snapshotclass with the annotation? As far as I know, that is what we're looking at to determine if a (CSI) storage provider is able to do snapshot. (Note: K10 doesn't, yet, support the 1.23/1.24 flavours of K8s or K3s. 1.21 should work though, we have it running internally).
c

cool-state-48214

05/10/2022, 9:53 AM
Yes, I follow all the steps provided by @bland-byte-60612 , the only diff is I'm on ubuntu
g

great-tailor-21038

05/10/2022, 10:08 AM
Can you file a case a case on my.veeam.com? Select "Kasten by Veeam K10 Trial" at the bottom of the product list, and please attach a log bundle (In K10 UI, Settings > Support > Download Logs, or https://docs.kasten.io/latest/operating/support.html#gathering-debugging-information if the UI doesn't work for you). We'll have one of our support engineer reach out.
b

bland-byte-60612

05/10/2022, 12:28 PM
One final thought there @cool-state-48214 - Make sure you follow the snapshot CDR process as I detailed above. Also make sure your S3 backup target in Longhorn is working properly and then test with kubestr.