[mythtv-users] Recovering from a nasty crash
Dale E. Pontius
DEPontius at edgehp.net
Thu Aug 26 20:15:24 UTC 2010
Sometime around 3:00 AM my mythbackend machine crashed. I appear to
have a decent MythDB backup from Saturday morning, and don't know what
or how many of my recorded shows I will be able to recover, yet. A
quick search told me about "myth.find.orphans" which will bring the
database and recordings into sync, essentially by deletion. But what if
I want to save some of what I recorded on that Saturday? The fact that
I wanted to record it on Saturday will clearly be present in the
database backup that I have. Is there some way to marry this
information together that I'm not aware of? Even a manual edit,
transferring information from "will record" to "recorded", or some such?
Incidentally, this is mythtv-0.22 on Gentoo.
I have the machine set to backup the myth database in cron.daily, which
means around 3:00 AM every day. My machine has 2 hard drives, a 160GB
with the basic install and 100G of media, and a 200GB with more media.
It's all (unfortunately) under LVM2, so my media looks like one big 300G
partition. The crash appears to be because of some sort of channel
problem with the 160GB drive. I haven't managed to isolate it to the
motherboard or drive electronics, yet. But my error messages look like
channel problems, not bad sectors.
I bought a new 1TB drive the other day and have a temporary FC12 install
on it. ("temporary" Gentoo install??) I've reconnected the drives and
tried to drag information off of it last night. I noticed that the
Sunday AM MythDB backup was badly truncated, so it must have crashed in
the process of doing that. But I managed to copy the Saturday AM MythDB
onto the new drive, so I think I have the last "known/hped good"
database backup. I tar'ed up /etc, grabbed a few other specific files,
and then tried to do a big bulk copy.
The big bulk copy failed after getting some of the main OS install and
some of /media. Unfortunately on the /media side it died while trying
to grab files off of the 160G drive, though I'm pretty sure that the
200G drive is still good, and with a little luck I think I can recover
all of those recordings. Unfortunately there's no simple way to know
what recordings are on which drive.
I plan a second try tonight, and plan to be more focused about it.
Since it's Gentoo, I need /var/lib/portage/world, which I forgot last
night. I'd like to grab a few more nightly backups, (I keep 7) since
it's just possible that Friday's is corrupt, too. Then I want to go in
a more focused fashion after /home and /media specifically. On side
fact... I'm going to replug both ends of both drive cables, and swap
the channels. If it's the motherboard side, the fails will move to the
200G drive and I'll freely get the data off of the 160G drive. Maybe
the replug will fix it. (Not counting on that one.)
Incidentally, after the 160G drive fails, it completely drops out of
/dev. At that point there appear to be enough cached structures
in-kernel that I can still "ls /media" (not ls -l) and get error
messages for many recordings, but good listings for many others.
Presuming the drive fails again, and I can't get the data on a copy, I
plan to capture "ls /media" after the fail in a file and turn it into a
script to grab the recordings off of the 200G drive. I may need to
reboot to regain access to the 160G in order to reach data on the 200G,
but maybe not.
If anyone else has been in this situation and has any advice, I'd
appreciate hearing it.
More information about the mythtv-users