Disk Full on Database Servers
Cheat sheet · https://pcornel.dk/topic.php?topic=6196
Answer
Disk full on a database server stops writes or the whole server. Common causes: data growth, WAL/binlog/transaction log not truncating, temp files, backups or logs on the same disk.
Remember
Never delete WAL/log files by hand. Find why logs are retained (archiving failure, inactive slot, missing log backups). Free space safely, then fix the cause.
First checks
df -h— first check for this topicpsql -c "SELECT now(), version();"— PostgreSQL reachable and versionmysql -e "SELECT NOW(), VERSION();"— MariaDB/MySQL reachable and versionsqlcmd -S <server> -Q "SELECT @@VERSION"— SQL Server reachable and version
Verify in this order
growth or retained logs → disk fills → cause fixed → space freed safely
Where it usually breaks
Deleting WAL or binlog files by hand can make the database unrecoverable.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=6196