kubernetes / cloud-provider-openstack

Apache License 2.0
623 stars 611 forks source link

[cinder-csi-plugin] Resize raw block device #2694

Open sergelogvinov opened 1 month ago

sergelogvinov commented 1 month ago

/kind bug

What happened:

During the volume expansion process, there is a risk of accidentally resizing an unmanaged (raw) block device if it already has a file system on it. Since raw block devices are not tied to any file system by Kubernetes, operations like resizing can potentially corrupt the existing file system, as it is unaware of the underlying changes.

https://github.com/kubernetes/cloud-provider-openstack/blob/04bd8e1343d630a0db3e9093dd71f59e477ee7ad/pkg/csi/cinder/nodeserver.go#L365-L402

What you expected to happen:

How to reproduce it:

Anything else we need to know?:

Environment: