outscale / osc-bsu-csi-driver

Apache License 2.0
8 stars 17 forks source link

Could not resize Luks volume ? #812

Open albundy83 opened 1 month ago

albundy83 commented 1 month ago

/kind bug

What happened? Hello, I have tried to increase PVC volume size but it just fails :( Here the error message :

MountVolume.Setup failed while expanding volume for volume "pvc-xxxxxxxxxxxxxxx" : Expander.NodeExpand failed to expand the volume : rpc error: code = Internal desc = Could not resize Luks volume "vol-xxxxx": exit status 1

If I can provide you more details, just tell me :-)

What you expected to happen? Could not resize Luks volumeolume resized

How to reproduce it (as minimally and precisely as possible)? Here the storageclass I have used (I have tried with both ext4 and xfs):

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: gp2-delete-immediate-encrypted
allowVolumeExpansion: true
parameters:
  encrypted: 'true'
  luks-cipher: aes-xts-plain64
  csi.storage.k8s.io/node-stage-secret-name: luks-key
  csi.storage.k8s.io/node-stage-secret-namespace: kube-system
  csi.storage.k8s.io/provisioner-secret-name: osc-csi-bsu
  csi.storage.k8s.io/provisioner-secret-namespace: kube-system
  csi.storage.k8s.io/fstype: xfs
  type: gp2
provisioner: bsu.csi.outscale.com
reclaimPolicy: Delete
volumeBindingMode: Immediate
---
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: gp2-delete-immediate-encrypted-ext4
allowVolumeExpansion: true
parameters:
  encrypted: 'true'
  luks-cipher: aes-xts-plain64
  csi.storage.k8s.io/node-stage-secret-name: luks-key
  csi.storage.k8s.io/node-stage-secret-namespace: kube-system
  csi.storage.k8s.io/provisioner-secret-name: osc-csi-bsu
  csi.storage.k8s.io/provisioner-secret-namespace: kube-system
  csi.storage.k8s.io/fstype: ext4
  type: gp2
provisioner: bsu.csi.outscale.com
reclaimPolicy: Delete
volumeBindingMode: Immediate

Anything else we need to know?:

Environment

albundy83 commented 2 weeks ago

It seems that it's a feature that has been implemented in earlier release. Any chance to increase the external-resizer ?

Bizyroth commented 2 weeks ago

Hello, i had the same problem but i solved it. Here how i did:

Prerequisite

How to do

Little analysis

I think that the increasing size of the volume goes well. After increasing the pvc size, i manually mount the outscale disk on a VM and everything was ok. But when i launched the pod i had the same error has you with Luks encryption.

Hope this help you

albundy83 commented 2 weeks ago

Well, it should work without all this steps. It's juste that csi driver must be updated

outscale-hmi commented 1 week ago

https://github.com/outscale/osc-bsu-csi-driver/pull/814 PR already done

albundy83 commented 6 days ago

Hello,

Will you release soon?