Disk full
This runbook is for administrators when the disk under a public website is full. A full disk causes most "site down" symptoms. The detailed procedure is Disk full (hosting runbook); this page adds the checks a public body needs afterwards.
Contents
- Find what grew
- Free space safely
- What never to remove
- The audit trail while the disk was full
- Prevent it
- Related pages
Find what grew
df -h
du -sh var/* | sort -h | tail -15
./console exp:logs --listLook outside the installation too: backups written to the same disk, the database's data directory, system logs.
Free space safely
php bin/php/ezcache.php --clear-all --allow-root-user # caches are regenerated
./console exp:logs --archives # see the log archives
./console exp:logs --prune --dry-run # what pruning would remove
./console exp:logs --apply --prune
./console exp:logs --apply --compressA log growing by megabytes a minute is a symptom: find out why before emptying it with
./console exp:logs --apply --truncate=<key> (the content stays in the .1 archive). Warm the caches again when there is
space: php bin/php/warm.php --allow-root-user.
What never to remove
| Path | Why |
|---|---|
var/storage, var/<site>/storage | uploads and images: the organization's content |
settings/ | configuration |
var/storage/sqlite3/ | the SQLite database with its -wal and -shm files |
var/<site>/log/audit/ | the audit trail: evidence; archive it, do not delete it |
Do not run rm -rf under var/ by hand during an incident; use the commands above.
The audit trail while the disk was full
With [AuditSettings] OnWriteFailure=continue (the default) the site went on and unwritten records were noted in
error.log as AUDIT-UNWRITTEN; the audit dashboard warns. With refuse, security-relevant actions were refused
(AUDIT-REFUSED) (Audit trail, "When the audit cannot write").
Afterwards:
./console exp:logs --search=AUDIT-UNWRITTEN --file=var/log/error.log
./console exp:audit verify --allow-root-userRecord the gap in the audit trail in your incident notes: an auditor will ask about it.
Prevent it
- Log health warns from 80 % of
[HealthSettings] DiskBudgetfor the logs; Setup > System information warns under 5 GB or 10 % free and fails under 1 GB or 5 % (System information and health checks). - Retention set per log (Log retention and rotation).
- Backups written to another disk or system (Offsite and encrypted copies).
- Your monitoring system's disk alerts on every volume.
Related pages
- Site down
- Rotate and prune logs
- Check log health
- Storage layout (hosting)
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.
Become an Exponential Partner
Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.