I had a major issue at home with my MythTV backend server… and off course, right before I was implementing a decent backup strategy.
I wanted to move to a Raid5 solution to increase speed and disk capacity, but wanted to do an Ubuntu 9.04 reinstall, move all data and config over from the old single-disk install, and keep running on settings and recordings already in the database. At the same time I wanted to upgrade the backend to Ubuntu 9.10, and use the newer MythTV 0.22 packages.
My install went pretty fine, using software Raid 5 on 3 disks I still had lying around (WD Raid edition SATA2), formatting the 500GB usable space as an ext4 volume, and installation of MythTV and other related packages was done without any issues. I started copying from the old single-disk setup to the new soft-Raid volume, and was almost done migrating. The configuration of MythTV through mythtv-setup couldn’t find my Technotrend S-1500 DVB-S card I used for months now, without any issues on Ubuntu 9.04… so I needed to have a look at that… but I even didn’t get to that point!
All of a sudden, the session over ssh was having some big issues, not finding commands, giving errors etc… Returning to the console, a lot of raid error messages were displayed, so a reboot and recover/rebuild was needed… the machine didn’t take any commands anymore… even a ‘halt’ or ‘reboot’ didn’t work…
When powering down and back up, the machine hung at the kernel loading, giving me a serious error not retrieving md0 anymore… Panic!!!
I disconnected my original disk, booted a Live session of the Ubuntu Desktop 9.10 cd (ext4 is better supported in 9.10 than it is in 9.04), and tried almost everything I know and could find about retrieving data from a faulty software raid volume… to no result…
I decided to do a fresh install on ext3 instead of ext4 with the Ubuntu 9.04 distro, to resolve the card-support issues I was having with Ubuntu 9.10, which worked out pretty fine again.
Card was detected, and scanning gave the results I expected.
I hooked up the original single-disk install SATA drive, and wanted to start copying the database, recording and settings files, but I wasn’t able to mount any of the original partitions on the disk. After some looking around on the disk, I found all partitions vanished! The disk was empty! Even more panic!!!!
Testdisk, an open source partition and data recovering program, had me regain access and information of the recordings partition, and I immediately made a copy of the data to my backup-server, but still no /etc or /var/lib/mysql to be retrieved to get access to the original database and settings… So I need to start from scratch, and convert the old recordings to standard mpg or avi files, so I can at least play them without info etc… That’s not the end of the world!
Now, the MythTV 0.22 upgrade part was going to be the hardest…, or so I thought.
In Ubuntu 9.04, the 0.22 MythTV packages aren’t available through the normal repositories…
I searched in google, and eventually found a page on the MythBuntu site that describes the necessary steps and packages needed to upgrade a 9.04 (or even a 8.10) Ubuntu distro with the MythTV 0.22 release…
The MythTV backend server was easily upgraded through the use of the MythBuntu Repositories package
After installing this deb file through dpkg -i, going into aptitude and doing an update/upgrade, the MythTV packages were upgraded to 0.22 automatically.
I tried connecting with my 0.21 based frontend machines (which run Ubuntu 8.04 LTS), but found that the database structure was changed in such a way the 0.21 cannot contact and use the 0.22 database structure… An upgrade to 0.22 on these machines is needed as well.
I installed the same MythBuntu Repositories package package on these 2 machines, and found it could only install the already installed 0.21 version. I needed to upgrade the distro to 8.10 or higher… I decided to go all the way up to 9.10…
The standard AMD based pc which resides in my living room and is hooked onto the beamer, is the easiest… if anything goes wrong, I can just reinstall it with 9.10 from scratch…, so I started with this one before messing up the MythBuntu 8.04 installation on the AppleTV in the bedroom (which is a lot more work to do a complete (re)installation).
Though not supported, I changed over the /etc/apt/sources.list hardy listings to karmic, and did an apt-get update followed by an apt-get upgrade and an apt-get dist-upgrade… I met a lot of errors installing or configuring packages, and needed to uninstall a lot of packages through aptitude, but eventually using apt-get dselect-upgrade and another apt-get upgrade and dist-upgrade, the machine eventually ended up booting fine with Ubuntu 9.10.
I installed the MythTV 0.22 packages through aptitude and ended up configuring the connection to the newly installed database on the backend. Two minutes , and some screen adjustments later, I was looking at LiveTV through the new 0.22 MythTV release!
For the AppleTV, I will follow the same things, but I’m making a full rsync of the complete filesystem first. If anything goes wrong, I can just rsync it back over it, and have the machine working again…
Now I just need to convert all recordings to a viewable format (mpg or avi) and change all the filenames so I know what recording is in what file… that will take another weekend to do so, I think.
First impressions of 0.22: faster, slicker, … but I didn’t see that many adjustments or changes… (except from the new theme stuff, which was the biggest change announced off course)
Next on the list: BACKUPS!!!! I have a backupserver giving me 2,3TB through NFS of which still 1,2TB is free, why wouldn’t I use it??? :p
More to follow later…
At least now, I’m up to date again…
