[mythtv-users] does myth 'best practice' have me adding anything to cron?

Michael T. Dean mtdean at thirdcontact.com
Wed Mar 23 11:46:23 UTC 2016


On 03/23/2016 01:16 AM, Mike Hodson wrote:
> On Tue, Mar 22, 2016 at 5:31 AM, Michael T. Dean wrote:
>> Chances are the database ones are all just ones people have created to run
>> optimize_mythdb.pl (and have nothing to do with mythfilldatabase) , which
>> checks and attempts to repair MythTV's MySQL database tables and optimized
>> the indices and some other stuff.  This action isn't performed automatically
>> by MythTV because it's dangerous--if something goes wrong, you could lose
>> data. Therefore, users are forced to do it themselves.  The safest way is
>> manually/interactively when MythTV is not running (with understanding of the
>> process and what can go wrong and how to recover when it does), though in
>> general, the danger is small enough that you can run it in a daily cron and
>> it is likely to do more good than harm.
>>
> This entire paragraph leads me to one question: Why does MythTV have
> database errors? Does it not use Inno/Xtra/TokuDB (any that have
> proper transactions) ?
>
> If so 'checking' tables does nothing useful. If not, why not?

MythTV doesn't have database errors.  Some systems running MythTV have 
corrupt database files because MySQL isn't always shut down 
properly--i.e. sometimes it crashes because power is lost or the kernel 
OOM killer kills it or ...

When MySQL crashes in the middle of a write, it generally leaves the 
MySQL binary data files in a broken state that must be repaired. So, 
since most MythTV users don't want to be on-call database admins, a lot 
of people just run the optimize_mythdb.pl script in a cron job and hope 
for the best (and fix things up when they notice a problem).

Mike


More information about the mythtv-users mailing list