This message was deleted.
# harvester
a
This message was deleted.
h
Worked for me. .0 is not prime and might have bugs. What do you get in the logs?
Did you create a target volume larger than the source? There is an enhancement to do that automatically
t
I tested it with 2 difference CSIs. I do not even see the Migration option. Haven’t check the logs.
h
Live Storage Migration works for me. Using Longhorn and Linstor.
t
that is wild. it never shows up for me.
h
The VM needs to be up, and not via the Rancher UI because it needs 2.14.* for the UI extension that matches.
t
I am in harvester on a brand new node.
f
interesting, is there an installation guide to get Linstor in Harvester somewhere?
h
Copy code
# vi kustomization.yaml

apiVersion: <http://kustomize.config.k8s.io/v1beta1|kustomize.config.k8s.io/v1beta1>
kind: Kustomization
namespace: linbit-sds
resources:
  - <https://charts.linstor.io/static/v2.10.4.yaml>
generatorOptions:
  disableNameSuffixHash: true
secretGenerator:
  - name: drbdio-pull-secret
    type: <http://kubernetes.io/dockerconfigjson|kubernetes.io/dockerconfigjson>
    literals:
      - .dockerconfigjson={"auths":{"<http://drbd.io|drbd.io>":{"username":"<mailto:email@user.com|email@user.com>","password":"yourPassword"}}}
# kubectl apply -k .
They hadn't build the kernel module, so it needs to be built on boot.
Copy code
# vi loader.yaml

apiVersion: <http://piraeus.io/v1|piraeus.io/v1>
kind: LinstorSatelliteConfiguration
metadata:
  name: harvester-loader-override
spec:
  podTemplate:
    spec:
      volumes:
        - name: usr-src
          emptyDir: { }
          hostPath:
            $patch: delete
      initContainers:
        - name: kernel-header-copy
          image: <http://registry.opensuse.org/isv/rancher/harvester/os/v1.8/main/baseos-headers|registry.opensuse.org/isv/rancher/harvester/os/v1.8/main/baseos-headers>
          args:
            - cp
            - -avt
            - /container/usr/src
            - /usr/src/linux/
          volumeMounts:
            - name: usr-src
              mountPath: /container/usr/src
          securityContext:
            privileged: true
        - name: drbd-module-loader
          command:
          - sh
          - -exc
          - |
            cp /entry.sh /usr/src/
            cp /drbd.tar.gz /usr/src/
          volumeMounts:
          - name: usr-src
            mountPath: /usr/src
          securityContext:
            privileged: true
        - name: drbd-module-loader-from-source
          image: <http://registry.suse.com/bci/bci-sle16-kernel-module-devel:16.0|registry.suse.com/bci/bci-sle16-kernel-module-devel:16.0>
          args:
          - sh
          - -exc
          - |
            cp /usr/src/drbd.tar.gz /drbd.tar.gz
            /usr/src/entry.sh
          env:
          - name: LB_HOW
            value: compile
          - name: KDIR
            value: /usr/src/linux/
          volumeMounts:
            - name: lib-modules
              mountPath: /lib/modules
              readOnly: true
            - name: usr-src
              mountPath: /usr/src
              readOnly: true
          securityContext:
            privileged: true
# kubectl apply -f loader.yaml
Copy code
kubectl create -f - <<EOF
apiVersion: <http://piraeus.io/v1|piraeus.io/v1>
kind: LinstorCluster
metadata:
  name: linstorcluster
spec: {}
EOF
And then, here, change the hostname and the hostDevices
Copy code
apiVersion: <http://piraeus.io/v1|piraeus.io/v1>
kind: LinstorSatelliteConfiguration
metadata:
  name: storage-ampere-1
spec:
  nodeSelector:
    <http://kubernetes.io/hostname|kubernetes.io/hostname>: ampere-1
  storagePools:
    - name: vg1-thin
      lvmThinPool:
        volumeGroup: vg1
        thinPool: thin
      source:
        hostDevices:
          - /dev/nvme1n1
---
apiVersion: <http://piraeus.io/v1|piraeus.io/v1>
kind: LinstorSatelliteConfiguration
metadata:
  name: storage-ampere-2
spec:
  nodeSelector:
    <http://kubernetes.io/hostname|kubernetes.io/hostname>: ampere-2
  storagePools:
    - name: vg1-thin
      lvmThinPool:
        volumeGroup: vg1
        thinPool: thin
      source:
        hostDevices:
          - /dev/nvme3n1
---
apiVersion: <http://piraeus.io/v1|piraeus.io/v1>
kind: LinstorSatelliteConfiguration
metadata:
  name: storage-ampere-3
spec:
  nodeSelector:
    <http://kubernetes.io/hostname|kubernetes.io/hostname>: ampere-3
  storagePools:
    - name: vg1-thin
      lvmThinPool:
        volumeGroup: vg1
        thinPool: thin
      source:
        hostDevices:
          - /dev/nvme1n1
if they all have
/dev/sda
as the available disk.
Copy code
apiVersion: <http://piraeus.io/v1|piraeus.io/v1>
kind: LinstorSatelliteConfiguration
metadata:
  name: storage-satellites
spec:
  storagePools:
    - name: vg1-thin
      lvmThinPool:
        volumeGroup: vg1
        thinPool: thin
      source:
        hostDevices:
          - /dev/sda
Create the StorageClass
Copy code
apiVersion: <http://storage.k8s.io/v1|storage.k8s.io/v1>
kind: StorageClass
metadata:
  # The name used to identify this StorageClass.
  name: linstor-thin
  # The name used to match this StorageClass with a provisioner.
  # <http://linstor.csi.linbit.com|linstor.csi.linbit.com> is the name that the LINSTOR CSI plugin uses to identify itself
provisioner: <http://linstor.csi.linbit.com|linstor.csi.linbit.com>
volumeBindingMode: WaitForFirstConsumer
allowVolumeExpansion: true
parameters:
  # LINSTOR will provision volumes from the drbdpool storage pool configured
  # On the satellite nodes in the LINSTOR cluster specified in the plugin's deployment
  storagePool: "vg1-thin"
  resourceGroup: "linstor-thin"
  # Setting a fstype is required for "fsGroup" permissions to work correctly.
  # Currently supported: xfs/ext4
  <http://csi.storage.k8s.io/fstype|csi.storage.k8s.io/fstype>: xfs
  <http://linstor.csi.linbit.com/placementCount|linstor.csi.linbit.com/placementCount>: "2"
check things...
Copy code
# kubectl exec deploy/linstor-controller -n linbit-sds -- linstor storage-pool list

# kubectl exec deploy/linstor-controller -n linbit-sds -- linstor resource list-volumes
👍 1
@thousands-advantage-10804 back to the topic - I just migrated from lhv1 to Linstor, then to LHv2 and then back to LHv1, without dropping the VM once.
t
thats awesome. I have yet to see the migration option. Even on a new install with longhorn and portworx csis.