linode / linode-blockstorage-csi-driver

Container Storage Interface (CSI) Driver for Linode Block Storage
Apache License 2.0
64 stars 54 forks source link

Support volume filesystem expansion on volume expansion #67

Open thorn3r opened 3 years ago

thorn3r commented 3 years ago

Feature Request

Support volume filesystem expansion when a Block Storage Volume is resized


Summary

When a Block Storage Volume is expanded the filesystem is not resized. This results in the Volume being larger and costing more money, but the usable storage remains the same. To make use of the expanded storage space, a user must shell into the node it's attached to and resize the filesystem on the Volume.

This was mentioned in the #linode channel on the Kubernetes slackspace, where a user mentioned a similar issue was raised on another provider, who implemented this with https://github.com/piraeusdatastore/linstor-csi/pull/70

igorbrigadir commented 2 years ago

I came up against this recently too - having to SSH into a node to run a command seems really unnecessary for expanding a volume.

wbh1 commented 3 weeks ago

Info dumping here for myself (or whoever gets around to working on this):

rl0nergan commented 5 days ago

Started working on this, but discovered that even when manually rescanning the drive via echo 1 > /sys/block/$devName/device/rescan the new device size isn't detected so filesystem can't be resized. Only solution I've found to detect the new device size is to reboot the node or detach/re-attach the volume. More details on this limitation can be found here, but until this is supported online filesystem expansion doesn't appear to be possible