MythTV Adventures
by xinit • 3/1/2005 • geek • 0 Comments
Some recording errors had spontaneously popped up in programs I had MythTV grabbing, and I didn’t really have much of a chance to look into it. My first line of attack was looking at hard drive performance, as it had every indication initially of being a buffer issue with the HD. Ran hdparm and tuned the buffers, and no change. I moved the recording path to another physical drive, and no change, so it must be a program or kernel issue. Since I hadn’t recompiled my kernel or any libraries,. those weren’t likely candidates for the trouble, and so I decided that it was time to actually look through the logs. It didn’t occur to me that the issue could be related to mysql; the database storing all the information about shows.
When the system was recording, about every 3-6 minutes, the hard drive in the system would rattle, and the recording would drop 10-20 seconds of show. A bit annoying as it always seemed to conicide with plot points or punchlines. I started looking through the logs, and found that there were a number of errors in the mysql logs pointing to a file named "recordedmarkup.MYI" – a ton of errors, and frequent enough to be the problem. A bit of searching on google turns up less than a page of references to that file, but thankfully this message on a MythTV mailing list did pop up;
> shutdown at some point. In order to fix that table do the following: > > 1. Shutdown mysql > 2. CD to the data directory that contains the MYI file in question > 3. myisamchk -r recordedmarkup.MYI > 4. Restart MySQL > 5. Eat some cheese and watch TV.
Sure enough, on running myisamchk, there’s a bunch of inconsistencies in the file, and after repair, my test recording worked out just fine; no dropouts. I can leave bittorrent downloads of TV shows alone for a while, sparing me the wrath of Shaw Cable’s acceptable use police complaining about my bandwidth use.
