24 days ago
Hi, I'm on the Hobby plan and noticed a gap between the volume usage shown in
the Railway dashboard and what I see inside the container.
-
Dashboard: about 2.0–2.4 GB used on the volume
-
Inside the container (railway ssh, df -h on the mount path): 93 MB used of
4.6 GB (3%)
-
The volume usage on my bill matches the dashboard number (about 2 GB),
not the df number
The service creates backup files on the volume and deletes old ones regularly,
so I suspect the space from deleted files is still counted on the host side
(the device name looks like /dev/zd..., so maybe a zvol without discard/TRIM?).
I haven't confirmed this.
Questions:
-
Which number is used for the Hobby plan's 5 GB volume limit — the dashboard
number or the actual usage inside the volume?
-
Is space from deleted files expected to be reclaimed over time? If not,
is there a recommended way to reclaim it (for example, fstrim, or
recreating the volume)?
Thanks!
1 Reply
24 days ago
The 5 GB Hobby limit applies to the volume's provisioned size, the capacity you choose when sizing it, not to either usage number. A gap between the two figures will not hit that limit or block writes. Inside the container you have the full 4.6 GB filesystem available.
The dashboard figure is what billing uses. It measures the storage blocks allocated on our side, not the live data df sees. Volumes are mounted with continuous discard, so a lot of the space freed by deleting files gets reclaimed on its own over minutes to hours. The figure will still settle somewhere above df and not match it exactly. Volumes allocate in 16 KB blocks while ext4 frees space in 4 KB blocks, so a partially freed block can't be returned. Workloads that keep writing and deleting files tend to leave a steady gap like yours.
fstrim from inside the container will fail with "Operation not permitted", which is expected. Recreating the volume isn't worth it either, because a new volume behaves the same way. In cost terms, about 2 GB of extra usage comes to roughly $0.30/month at $0.15/GB-month. Your data is fine, and you don't need to do anything.
Status changed to Awaiting User Response Railway • 24 days ago
Status changed to Solved kaijpn • 23 days ago