This is kind of a head scratcher for me, so I’m hoping someone has some suggestions on where to look next to solve a mystery.
I have a Percona/MySQL system that ran out of disk space. The data folder is about 35GB, binlog space capped with binlog_space_limit at 15G, OS and all other system data takes up around 4-5GB. The system is using a 60GB disk. When I logged into the system df showed the drive as 100% used but there were only 11 full size (1G) binlog files. By calculation the system should have had nearly 10GB free. Maybe 8-9GB if the current binlog file was close to the 1GB max (it wasn’t). I shut down MySQL, changed binlog_space_limit to 3G and restarted MySQL. 9 binlog files were purged but over 14GB of disk space not showed as available.
Where I’m stuck is that it seems like there is some hidden usage associated with the binlog files that I hadn’t accounted for. I don’t mind if the usage is legitimate but I do need to be able to account for it so that we don’t run out of space again. Given the minimal changes I made, I figure it has to be something in the shutdown or in the binlog purge that freed up the extra space, I’m just out of ideas on what it could be.