MythTV – part 3 What I did on my (Bank) Holiday

So finally what I did today, and most of yesterday. Which you could call phase 2½. The PC I’d used for phase 2 had a 60Gb hard drive. With stuff that was already on there and by the time I’d used the Myth box for a week I’d used nearly 2/3rds of that, leaving about 20Gb or roughly 20 hours worth of recording time. Which is OK, but after using it for real the first thing you realise is you can never have too much disc space. The whole point about MythTV is that you set it to just ‘collect’ stuff you’re interested in and watch it when you get around to it. However to really take advantage of that you want enough disk space so that you’re not juggling what to delete when wanting to record something new. In other words the more disk space the better.


So this weekend was all about adding another 60Gb drive. In order to do that however I needed to have a version of Linux that had something called logical volumes. It’s a feature that allows you to present two or more disk partitions as if they were one unit. Which means I could add an extra disk and have it look as if I had one big disk.


Unfortunately Suse 9.3 didn’t appear to have this feature. It might have been possible to add it by downloading the necessary software but I don’t have the internet at home yet (recall the stuff with the phone – not sorted yet, not quite). Also it’d just be easier to just install a version that had it all integrated and working. So the plan was


  • Back up data from PC including existing recordings and all the settings needed to put MythTV back the same way.
  • install the new disk
  • install a version of Linux that has logical volume support (Fedora Core 6)
  • set up a small partition for the OS, and use the rest of both disks to set up a logical volume to be used for the recordings
  • compile a new kernel – the TV card needs a later one than comes with FC6
  • install the various software that MythTV needs.
  • recover the data from the back up
  • install MythTV and configure it
  • recover the MythTV settings – this involves restoring a MySQL database backup


And go!


Simple right? Well a couple of hours on Saturday night had the backup and the new disk and OS installed. Yesterday was a slow process of re-installing software. It took 75 minutes to compile the kernel and an hour to compile MythTV – the later I ended up doing twice. About an hour to restore the backed up data. So how come it took around 12 hours to get a working system?


The problem was that MySQL database. Even though it was a brand new installation and I could connect using the MySQL client, MythTV itself wouldn’t connect to the database. The socket, a file MySQL uses for connections was configured to be in one place, but MythTV was convinced it was in another. I couldn’t understand this. It was a clean compile of MythTV and an installation of MySQL from the FC6 disks. It couldn’t be pointing to the wrong place. I checked the MySQL config file and that was pointing to /tmp, but every time I ran MythTV is was pointing to /var/lib/mysql. And I couldn’t find where this was set. I grep’d the entire source tree of MythTV and couldn’t find it. How could that be?


In the end I had to grep my entire hard drive to find it. I realised that I’d copied the MySQL config as part of my backup. That was the one that pointed to /tmp. The default one that came with Fedora pointed to /var/lib/mysql. But it’s a config setting so it should be changeable right? Well MythTV uses a programming system called QT and QT has a MySQL plugin library. So it seems that MythTV calls MySQL through this library rather than directly. Fair enough – but it’s this library that’s pointing to /var/lib/mysql. As far as I can tell it’s hard-coded i.e. there’s no way to tell the QT to look elsewhere. This seems daft to me. So daft that I hope I’m wrong, that it can be configured. But so far I’ve not found a way.


Anyway I just reset the MySQL config file to point to /var/lib/mysql and everything worked. Hoo-(finally)-ray!


About shuggie

My name is Shuggie, Paul or LatePaul depending on where you know me from. I work in computers (databases) and occasionally write about softw
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s