For those enjoying the cost benefits Linux hosting there are some downsides. One of those is waking up to the rude reality that your hard-drive is maxed-out ‘fuller than a woman’s purse.‘
Tomorrow, I swear, I’ll get back to the less geeky stuff … I’ve got a great not-so-nerdy topic for tomorrow.
But for today, a propeller-headed post dedicated to my good friend Chuck Holton, who not only runs LiveFire.us, but also HomeSteadingToday.com. The latter of which started generating errors when he tried to prune and optimize the datatables driving his bulletin-board. A trivial task these days with tools such as vBulletin and/or phpMyAdmin.
Unfortunately a rogue spammer conjured up a situation reminiscent of Dante’s first circle of hell – pushing in email faster and before a scheduled disk-check job provided by the hosting company could run.
Meaning, because we didn’t get warnings, we were without a clue as to what and where the problem existed – a situation not only caused by spammers, but by rude residents for those of you on shared server solutions.
How is it I speak with such authority? Well a few months back, Chuck informed me at around 1am that he was having troubles, I issued the following MySQL directive:
repair table home_posts_text
The response was that wonderfully descriptive error message “28 when writing to datafile.” (Can you say ‘ubiquitous?’ … Sure … I knew you could).
Here is the response … with some of the names changed to protect the hackable. Note the 100% in bold: Filesystem Size Used Avail Use% Mounted on:
/dev/sda5 31G 30G 52M 100% / /dev/sda1 99M 81M 13M 86% /boot none 629M 0 629M 0% /dev/shm /dev/sda3 289M 8.9M 264M 4% /tmp
One way to avoid this situation is to augment your hosting provider’s nightly solution with a ‘cron-able‘ script of your own. One that would will check that usage % with greater frequency than once a night … and instruct it to send everyone in the known universe an email when it gets close to the danger zone.
Before I re-invent the wheel, I’m looking for such a script … unless you already have or know of such a script, if so, then please, leave a comment.