[mythtv-users] Reviving a myth system after hardware failure on /var

Simon Hobson linux at thehobsons.co.uk
Wed Nov 5 14:43:06 UTC 2014


Stephen Worthington <stephen_agent at jsw.gen.nz> wrote:

> cd /mnt/old/recordings
> for a in * ; do
>    ddrescue -v /mnt/old/recordings/$a /mnt/new/recordings/$a
> /mnt/rescue/$a.log
> done
> 
> (Watch out for line wrapping - the ddrescue line is all one line and
> is long enough that it will likely show up as two)

From the "learn something new every day" dept - I'd never thought of using ddrescue on individual files like that.

I second having a bootable USB stick (or CD/DVD) appropriate to the installed distro - makes life so much easier. A generic boot disk works for many tasks, but when you get into doing chroots and stuff, it's easier if the systems are very similar.

But back to the OPs situation, it's a bit "post horse departed, closing of stable door" suggestion - but RAIDing the OS directories would be a great protection against this problem. On the first error, I think MD would have thrown the faulty drive out of the array (for each partition/array it's involved with as an error occurs in that partition) leaving the good drive running.
Recovery from that is a matter of partitioning the new drive, and telling MD to use it - then MD takes care of rebuilding the data onto it from the good drive(s).
Failing that, do periodic clones onto another disk so that you have a recent copy should the disk fail completely.



More information about the mythtv-users mailing list