Finding what fills the disk

Back to list2026-03-31archived
You

df says 96% full, du disagrees. What is going on?

ChatGPT

Almost always a deleted file still held open by a process, so the space is gone but no path points at it. lsof +L1 lists them; restarting the holder releases the space instantly.

You

My service restarts in a loop and floods the journal.

ChatGPT

Add a backoff. RestartSec=5 plus StartLimitIntervalSec=120 and StartLimitBurst=5 turns a hot loop into five attempts and then a stop, which is what you want: a service that cannot start should stay down loudly rather than churn quietly.