Earlier this evening, after making a few new posts as normal, I went back to edit an old one. This didn’t seem to want to work. When I clicked the button to insert an image, the box closed, but nothing was added.
Hmmm. So I clicked the Preview button. And got a message I haven’t seen in a long time, which told me that WordPress couldn’t see the database, and didn’t want to play. Now that’s never a good thing to see. So, I fired up an SSH connection and typed
The idea being to check over some things. But that didn’t want to play, either. Instead of giving me a nicely powerful command shell, the server told me that the file system was read-only. Now, I’m not a Linux expert by any stretch of the imagination, but I figured that not being able to write to the file system would account for the problems I was having. A bit of research told me that the operating system does this when there’s a problem with the file system to stop it getting any worse, which makes sense to me. I googled a bit more, found a few suggestions, and decided that the easiest one to try was a reboot.
Fortunately, Linode gives its users a management command shell called Lish which allows me to see what’s happening as the virtual machine boots. It came up, talked to itself a bit, then told me I had to manually check the file system by running the command
Which, by a curious coincidence, is quite close to one of the things I said when the trouble started. I duly typed the command, responded “Y” a few times when asked if I wanted it to fix things and went away to let it finish. Once it had finished fscking itself, the server came up without any rude messages.
Oh good, I thought, and tried that post edit again. No, it still didn’t want to play. But I knew what to do about that. I logged into phpMyAdmin, selected my database and told it to check all the tables. Some repairs were made, and normal service was resumed.
All good fun, and I learned a trick or two, Of course, I’ve no idea why the file system had a problem, but as it seems happy enough, I’ll file it under “damn annoying computer stuff” and leave it at that.
And what if that bit of fscking hadn’t worked? Well, I pay for Linode’s optional backup service. They take a daily snapshot of my virtual server and I can restore from that whenever I need to. And as the last backup was just a few hours before the fun started, I’d only have lost the posts I made this evening. Nice not to have lost them though.
 Since I moved away from shared hosting, in fact
 Not necessarily the best – people who know what they’re doing would probably prefer something else
 Such a useful word
 I have used it once, and it worked as advertised