[mythtv-users] recovery of files and filenames from ext4 partition

John Pilkington J.Pilk at tesco.net
Tue Feb 17 13:45:48 UTC 2015


On 17/02/15 10:35, Hika van den Hoven wrote:
> Hoi Mark,
>
> Tuesday, February 17, 2015, 10:38:14 AM, you wrote:
>
>> Just thought I would give a quick update on where I got to with my crashed
>> hard disk.
>
>> Testdisk worked quite well for me (thanks Doug). I had about 1.8TB of
>> recordings on the drive. On the first pass Testdisk was able to recover 387
>> of 498 missing recordings including one of two recordings that I really
>> wanted (most things I really want get watched quickly after recording, the
>> stuff that sits there for a long time tends to be well down the viewing
>> order). The recordings were missing their file names and extensions but I
>> wrote a script that checked the file size and the number of frames and
>> matched those to the database to get the correct names back (I assumed
>> everything was mpg because I only had recordings on the drive and I deleted
>> everything less than a couple hundred MB because the preview png get
>> regenerated automatically anyway).
>
>> After doing a few more passes with Testdisk I got another 62 recordings back
>> that also appear to be 100% intact (and the second of the two recordings I
>> really wanted). I also got another 22 recordings where the filesize was
>> correct but the frame count was off by a small amount so I am assuming there
>> may be a small amount of corruption in those files, although I have not been
>> able to pick it yet on the quick once-over I did.
>
>> That left about 27 recordings completely toast. Testdisk is still actually
>> working on the disk trying to read the faulty area's but it is really really
>> slow at this stage, only getting about a single byte back about every 10hrs
>> so it's pretty much done (there is about 75MB it is unable to read at last
>> count which is down from about 100Mb at the start). I might let it run a
>> little longer but figure at this stage there is nothing to be gained, the
>> lost recordings are nothing that particularly concern me.
>
>> The only other loss was a missed recording when the backend crashed and
>> wouldn't reboot, other than that I would have gotten away unscathed.
>
>> TL:DR - Testdisk did a great job recovering lost files from crashed hard
>> disk.
>
> Could you maybe create a wiki entry for future reference. With your
> scripts etc.?
>

Hmm:  yesterday I cleared a small directory with rm *.  Today, having 
cd-ed to a recordings directory, I pressed 'Return'.  Guess what...

It's an xfs partition, default for el7 clones, and TestDisk doesn't say 
it does that.  I thought hxtools might be worth a try, but the rpm is a 
cut-down version that doesn't include xfs_irepair. Looks as if it would 
be an 'interesting' learning experience, anyway.  I suspect I'm going to 
be saying 'it's only tv' too.  Lots and lots of DVDs to watch, and books 
to read...   and recent large commits to master to try.

I see there's a new build for ubuntu trusty.  I was waiting to try that, 
on the test box, before 'production'.  But now there's lots of disk 
space...  :-)

John


John





More information about the mythtv-users mailing list