[mythtv-users] Repair mysql tables after power failure?
mikep at randomtraveller.org.uk
Wed Oct 3 17:50:21 UTC 2007
David Brodbeck wrote:
> On Oct 3, 2007, at 6:51 AM, Mike Perkins wrote:
>> Hmmm. Note to self: add this to startup on the master backend, in
>> such a way it
>> runs before the backend starts. The master backend machine
>> currently stays up
>> forever, unless there's a power outage. Although I run a script
>> containing this
>> around 02:00 every night, I hadn't considered possible corruption
>> after a power
>> cut/restart. Filesystems get checked on startup, why not databases?
>> In fact, does Mysql do anything useful on startup in this regard?
> I don't think it does by default. Some distributions include a table
> check in their startup script. I like to add one, for the reasons
> you state.
> If you want to get really fancy, create a file in the startup script
> and delete it in the shutdown script, then only do the check on
> startup if the file is present. This would mimic the way fsck will
> only check "dirty" filesystems.
Consider it done. Is it worth adding something of this kind to Mythtv startup
generally? OK, I get a couple of outages/year so it's not a big problem
(actually, night before last, had 5 in 15 minutes, which is why this is in the
front of my brain just now). But power outages aren't the only reason a backend
can fall over. Should we be considering a database check every time the backend
comes up, if the above-mentioned "dirty" flag exists? i.e. built in to the
backend startup and shutdown scripts?
More information about the mythtv-users