Categories

Categories

Archives

MythTV blues

After trying to troubleshoot some MythTV and system issues this afternoon, I managed to loose my storage raid array. It was really quite stupid. I forgot that you don’t need to make a partition for an md0 device…

For those of you needing further clarification, once a raid array (md device) is created, there is no need to make a partition on it. It _is_ the partition!

When mkfs.jfs /dev/md0 was used, it corrected the ‘partition’ that I created.

So, I destroyed the data on /dev/md0 by creating a partition and then formatting it. No big deal, it’s just TV. Oh wait. The new series of the Simpson’s and Doctor Who were in there. Plus three episodes of the best Saturday night comedy show Almost Live!

Doctor Who is the only one that I’m worried about. The guide data shows that the first two episodes won’t be airing for the next three weeks!

After all my troubles this afternoon, what else could go wrong? Well, this evening while trying to troubleshoot why I can no longer fast forward or rewind while watching live TV or recorded shows, I zeroed out the first megabyte of the raid array trying to determine the SCSI raid array performance.

Knowing that I just toasted the partition table and anything else that might have been important, I tried to copy off the shows that I was able to record from this afternoon – after destroying the raid array the _first_ time. Well, almost on queue, MythTV locked up the system while I was in the middle of copying the data from the raid array. Damn it! Throw me a fricken bone here!

What I did was:

dd ‹ /dev/zero › /dev/md0 bs=1k count=1024

What I thought I was doing and meant to do was:

dd ‹ /dev/zero › /mnt/store bs=1k count=1048576

This would create a 1GB file with zero’s in it. Basically, a quick way to calculate disk transfer speed. I thought that the reason I couldn’t FF or REW was because of slow disk performance. Well, with 119 MB per second transfer, it wasn’t the disks.

In the process of killing the raid array – twice, hard resetting, soft resetting, and replacing hardware, my MythTV databases got mangled and because of this I could not watch live TV or watch saved recordings. However, recordings that were underway, we’re still recording just fine, mythbackend couldn’t insert the information about the recording into the mythconverge database.

Here’s what the mythtv was reporting when the database was corrupt:

2006-04-02 22:04:44.554 DB Error (delta position map insert):

Query was:

INSERT INTO recordedmarkup (chanid, starttime, mark, type, offset) VALUES ( ‘105

4’ , ‘2006-04-02T22:04:43’ , ‘1’ , 6 , ‘0’ );

Driver error was [2/1016]:

QMYSQL3: Unable to execute query

To fix the problem I had to use these commands to repair the tables in the database:

myisamchk -r /var/lib/mysql/mythconverg/recordedmarkup.MYI

I tried myisamchk /var/lib/mysql/mythconverg/recorded.MYI which also had errors…

So I figured it wouldn’t hurt to just:
myisamchk -r /var/lib/mysql/mythconverg/*.MYI

Seemed to fix a lot of problems – including my original problem of FF and REV!!!

3 comments to MythTV blues

  • Oh, that’s great! You’re always there for a good laugh!

    I think you can use hdparam to also test the read/write speeds of a hard drive (not sure if it will test a logical raid array though…).

    I just ordered a $30 PCI nVidia card with TV-Out so I can make a 2nd frontend out of an old HP POS Celery 1GHz system… things are working great here 🙂 I’ve got 229 Recorded programs (211 hours from 276GB) and still moving strong!!

  • erich

    Well, I’m glad I can make someone laugh. I was just cursing my self for doing something so dumb! I figured out why I typed that… I clean and rebuild systems at work all the time and I’m used to zeroing the drives before I reuse them… So… as soon as my hands typed /dev/zero, my brain just continued with the logical device I was using…

    hdparam is a hack. It does not handle SCSI drives nor the software raid array. It didn’t work with my IDE drive either. dd is the only way (that I’ve ever seen) that actually works.

  • erich

    UPDATE May 29, 2006

    After fixing the sql database… I haven’t had a single problem. System has been up and running for a little over a month with out any user interaction!

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

  

  

  

 

This site uses Akismet to reduce spam. Learn how your comment data is processed.