SynologyOpenSource / synology-csi

Apache License 2.0
520 stars 114 forks source link

Failed to map target #23

Open newbenji opened 2 years ago

newbenji commented 2 years ago

I got most of it to work i can see the lun and the iscsi gets created, even if the logs from controller say it gave error. But it cant map the the 2 together, and if i try with through the web interface myself from that lun i get lun [xxxx] is not available due to load fail

If i create a lun with same name and map it to the iscsi myself it seem i can get it to create a pv in the cluster and bound the pvc So maybe something changed in the api for the DSM 7.0.1-42218 Update 2

newbenji commented 2 years ago

Difference on made through the storage class and through web interface

The type is type ADV Where its type file made manuel

[O] Number of LUNs: 2
1: uuid: 036952c6-a102-45d7-bff2-c6529fc3241e ,vpd_unit_sn: 036952c6-a102-45d7-bff2-c6529fc3241e ,lun_id: 1 ,name: k8s-csi-pvc-99ad19de-5dfe-4457-91e5-48517ecdd24a ,type: ADV ,location: /volume1 ,size: 1073741824 (1GB) ,description:  ,direct_io_pattern: 0 ,dev_config:  ,emulate_3pc: 1 ,emulate_tpws: 1 ,emulate_caw: 1 ,emulate_fua_write: 0 ,emulate_sync_cache: 0 ,emulate_tpu: 0 ,can_snapshot: 1 ,restored_time: Thu Jan 01 01:00:00 CET 1970 ,snapshots: null ,retention: null ,scheduled_task: null
2: uuid: 21b5a4f9-e00b-4a70-9a16-597fbdb11620 ,vpd_unit_sn: 21b5a4f9-e00b-4a70-9a16-597fbdb11620 ,lun_id: 2 ,name: manuel-created ,type: THIN ,location: /volume1 ,size: 1073741824 (1GB) ,description:  ,direct_io_pattern: 0 ,dev_config:  ,emulate_3pc: 0 ,emulate_tpws: 0 ,emulate_caw: 1 ,emulate_fua_write: 0 ,emulate_sync_cache: 0 ,emulate_tpu: 0 ,can_snapshot: 0 ,restored_time: Thu Jan 01 01:00:00 CET 1970 ,snapshots: null ,retention: null ,scheduled_task: null
newbenji commented 2 years ago

got it to work now with some added parameters. maybe change the default for type or add to documentation

synoiscsiwebapi lun list
[O] Number of LUNs: 2
1: uuid: 21b5a4f9-e00b-4a70-9a16-597fbdb11620 ,vpd_unit_sn: 21b5a4f9-e00b-4a70-9a16-597fbdb11620 ,lun_id: 2 ,name: manuel-created ,type: THIN ,location: /volume1 ,size: 1073741824 (1GB) ,description:  ,direct_io_pattern: 0 ,dev_config:  ,emulate_3pc: 0 ,emulate_tpws: 0 ,emulate_caw: 1 ,emulate_fua_write: 0 ,emulate_sync_cache: 0 ,emulate_tpu: 0 ,can_snapshot: 0 ,restored_time: Thu Jan 01 01:00:00 CET 1970 ,snapshots: null ,retention: null ,scheduled_task: null
2: uuid: 67465e56-969b-4837-baeb-2bcf9f830d63 ,vpd_unit_sn: 67465e56-969b-4837-baeb-2bcf9f830d63 ,lun_id: 1 ,name: k8s-csi-pvc-fd763500-fc20-43cb-b595-afd89b5887a4 ,type: THIN ,location: /volume1 ,size: 1073741824 (1GB) ,description:  ,direct_io_pattern: 0 ,dev_config:  ,emulate_3pc: 0 ,emulate_tpws: 0 ,emulate_caw: 0 ,emulate_fua_write: 0 ,emulate_sync_cache: 0 ,emulate_tpu: 0 ,can_snapshot: 0 ,restored_time: Thu Jan 01 01:00:00 CET 1970 ,snapshots: null ,retention: null ,scheduled_task: null

works with this storageclass

allowVolumeExpansion: true
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  annotations:
    storageclass.kubernetes.io/is-default-class: "false"
  labels:
  name: synology-csi-delete
parameters:
  dsm: 1.1.1.1
  fsType: ext4
  type: thin
provisioner: csi.san.synology.com
reclaimPolicy: Delete
volumeBindingMode: Immediate
newbenji commented 2 years ago

note the parameter type thin is manual added now

newbenji commented 2 years ago

well the create and mount works now will test resize and delete later