Volume usage never seems to go down even when files are deleted?

I got traffic spike to my fly app, which filled up my volume with log files. However, even after deleting the large files, volume usage doesn’t go down on my Grafana dashboard. (In fact, usage has never gone down since the volume was created.)

What am I missing?

Hey there,

Just for clarity, which metric specifically are you looking at?

Volume usage on Grafana (Sign In · Fly)

Yes, we’re aware of this issue- the metric used by the Grafana dashboards (fly_volume_*) looks at the block-device usage, which doesn’t automatically go down when files are deleted (because of how our storage volumes work internally). You still have the deleted space available for reuse in your VM, the deleted space is just not reflected accurately in the metric. You might be able to try running fstrim -a within the VM and see if that reduces the usage reported by this metric.

We also have a fix prepared to change this dashboard metric to use the filesystem usage metrics (fly_instance_filesystem_*), which should reflect the usage reported by the filesystem more accurately. We haven’t deployed this yet but it should go out pretty soon.

1 Like

Ah, that’s good to know. Thanks for your help!

I haven’t figured out how to run fstrim -a, though (gives “fstrim: unrecognized option: a” on Alpine Linux)