Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LUN migration between old to new Snynology box how to reference Cloned LUN's #90

Open
tzago opened this issue Sep 22, 2024 · 1 comment

Comments

@tzago
Copy link

tzago commented Sep 22, 2024

Referencing these issues #88 and #84 as they are somehow similar to my use case here which is how to figure out the VolumeHandle which is not present in DSM.
My case is a Synology NAS migration from Snynology02 to new Synology01 box.
I used the Hyper Backup to back up luns from one synology nas to another.
All luns were backuped successfully although I noted that the backupd luns ISCSI IQN target got the same name as the LUN which starts with k8s-csi-pvc-*
While I noticed that the correct Target IQN name must start with iqn.2000-01.com.synology:x.pvc-*
where x in my case is my Synology Hostname.

I confirm that my cloned Lun on my new synology works fine while mounting it from the command line on my destination host.
something like
sudo iscsiadm --mode node --targetname iqn.2000-01.com.synology:Synology01.pvc-xxxxxx-yyyy-zzzz-wwww-ea0db6860e76 --portal 192.168.0.1:3260,0 --login
But whenever I try to create a PV and PVC and use it on a new POD I get

"source":"","storage.kubernetes.io/csiProvisionerIdentity":"1726942005718-8081-csi.san.synology.com"},"volume_id":"a3bb180f-600f-455e-bc69-96773597ef28"}
2024-09-21T20:19:24Z [ERROR] [driver/utils.go:108] GRPC error: rpc error: code = Internal desc = rpc error: code = NotFound desc = Volume[a3bb180f-600f-455e-bc69-96773597ef28] is not found
2024-09-21T20:21:26Z [INFO] [driver/utils.go:104] GRPC call: /csi.v1.Node/NodeGetCapabilities

I am assuming here that what I am really missing to understand is how we can figure out what is the volumeHandle that I must set in my PV to correctly correlate it to my Cloned LUN in my new Synology which I already proved it is working via iscsiadm via cli.

In short, what is the correlation of volumeHandle and the Synology ISCSI IQN target and where I can find what is the correct volumeHandle UID to use?

This is how I am am creating my PV with main goal of having it attaching to my cloned LUN in my new Synology box.

apiVersion: v1
kind: PersistentVolume
metadata:
  annotations:
    pv.kubernetes.io/provisioned-by: csi.san.synology.com
  finalizers:
  - kubernetes.io/pv-protection
  name: pvc-47f2f3c8-f098-4c9a-95d2-ea0db6860e76
spec:
  accessModes:
  - ReadWriteOnce
  capacity:
    storage: 5Gi
  csi:
    driver: csi.san.synology.com
    volumeAttributes:
      dsm: 192.168.0.1
      formatOptions: ""
      protocol: iscsi
      source: ""
      storage.kubernetes.io/csiProvisionerIdentity: 1726942005718-8081-csi.san.synology.com
    volumeHandle: a3bb180f-600f-455e-bc69-96773597ef27
  persistentVolumeReclaimPolicy: Retain
  storageClassName: synology-iscsi-storage
  volumeMode: Filesystem

@tzago tzago changed the title Use static provisioning to bind an already created LUN LUN migration between old to new Snynology box how to reference Cloned LUN's Sep 22, 2024
@james-callahan
Copy link

where I can find what is the correct volumeHandle UID to use?

I ended up using synoiscsiwebapi lun list on my synology box, the uuid is what to use as the volumeHandle. I was able to match it using the name field.
I can't see how to get this info in the synology web ui.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants