Root partition fills up for very short periods of time

SYSTEM INFORMATION
OS type and version Almalinux 9.5
Virtualmin version 7.30.7

Hi

my root partition (/) fills up regularly for very short periodes of time (< 1 minute). This temporarily causes issues with my database (for instance)

/home and /boot are fine. it’s only the root-partition (see screenshot). it goes from 40% free space to 0and back up to 40% in a matter of a few minutes.

I can’t figure out what’s causing this and can’t even find which folders or files are being filled. It happen at random intervals (it seems). I’ve setup a cron task to output the results of a “du” command to a logfile every 5 minutes but even that doesn’t give me a good pointer.

Anyone has any idea how to resolve this issue?

you need to find whats growing so fast. maybe logs?
when it’s 0% free space, what’s the output of
du -skh /var/*
just a guess, but check various directories to identify what’s taking up the space.

Maybe kill the server and reinstate ? Then install what you had before the problem and the install domains 1 by 1 untill you hit the issue which may or may not show up the problem.
This assumes you have backups

that’s always a solution but I’d rather figure out what’s going on with my server

That’s the spirit!

It could be a cron job that is the culprit, if the incident occurs in a set frequency. Or even a virtual server owner manually creating a 30+ GB backup, which could take up space temporarily. There might be other possibilities…

ok so I’ve setup a small cron-script to log some disk size every minute.
At this point the almalinux-root-disk is 96% full
but the root dir (/) is only using 42 GB (roughly 50%)
What am I missing here?

So I’ve disabled my scheduled backups and that has improved things drastically (it still happens but at a much lower frequency + with less impact). Obviously I need backups so I’ll need to figure something out to make this work again. I’m thinking about moving my MariaDB databases from /var to /home.

Hmm. Virtualmin’s backup has options to NOT include things like mailboxes and databases with every backup, if it is these that are eating up space.

You could also configure a different temporary directory for backups rather than move database storage.

Earlier today I changed the webmin tmp directory to the /home partition and ran a dbdump… which caused my sites to go down again when it hit the biggest database (10 GB). So that’s defenitely the cause.

This is good progress if you have pinpointed the cause.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.