How can I trigger a filesystem resize when a persistent disk is resized on GCP?

411 Views Asked by At

On GCP, is there a way to trigger a filesystem resize (possibly by running a systemd unit) when the size of the disk backing a mounted filesystem is changed?

I was hoping these kind of events would be possible through udev but by running udevadm monitor --environment I only see events for attach/detach rather than disk resize.

I'm thinking my only option is to run resize periodically or force the instance to be restarted when the disk size changes.

1

There are 1 best solutions below

0
On

That's correct, the only way of re-size your VM filesystem is by doing it manually.

You can take a look here to follow the steps to resize your filesystem for Windows or Linux Instances.