r/LinuxTeckHosting • u/LinuxBook • 7h ago
Quick Hosting Tip #4 - Linux Disk Space Monitoring: Fix a Full Server Disk
Question: A store went down at 3 AM with 'Error establishing a database connection'. Nothing had changed. What happened?
Try: df -h / && sudo du -sh /var/log/* | sort -rh | head -3
Story: A PHP warning fired on every request, an oversized journal ate 31G, and the
disk hit 100%. MySQL couldn't write and crashed. The fix: vacuum the journal, cap
SystemMaxUse, fix the warning, and add a disk alert.
Examples:
$ sudo journalctl --vacuum-size=1G
# Set SystemMaxUse=1G in /etc/systemd/journald.conf (then restart systemd-journald)
# Alert at 80% disk usage, not 100%
Note: 'Nothing changed' usually means something grew slowly. Monitor disk usage
trends, not just up/down status.
Ask: Has something like this happened to you? Share your story.
Follow r/LinuxTeckHosting - 1 practical Hosting tip every day. For more #HostingTips click here https://www.linuxteck.com/hosting-tips/