[mythtv-users] borked my /video fs, recover original filenames from SQL?
bjm at lvcm.com
Tue Apr 3 06:15:39 UTC 2007
Mike Grusin wrote:
> Well, I borked up my FE+BE system pretty good tonight...
> I wanted to recover 10GB of space that used to serve as the ringbuffer in
> 0.18 and has been idle since. Before messing around with the partitions, I
> thought it would be good to do a fsck on the /cache and /video partitions
> which I'd be merging. It's JFS, and jfs_fsck came back with no problems.
> But then I looked at the switches, and saw "-f" for force checking (as I
> understand it, if the JFS journal appears clean, it doesn't do a full
> check). I did that, and all heck broke loose. It found a filesystem
> problem on the partition I use for /video (which hasn't caused any problems
> before) and "fixed" it, "recovering" all my video files to lost+found with
> "Ixxxxxx.RCN" filenames. D'OH!
> There's nothing in there that's too valuable to lose, but before I wipe the
> mess clean, I wanted to see if anyone had any ideas for easily fixing it.
> It looks like everything's there, with the right creation dates and sizes,
> just bad filenames.
> Which leads me to wonder if I can't extract a list of the filenames, dates,
> and sizes out of SQL and manually write a batch file to name them back?
$ mysql -u mythtv -pmythtv mythconverg
mysql> select basename,title from recorded;
The basename has the chanid, date and time in it so there should
be no problem matching them up and renaming the files to match
the basename fields. You can check the content of files with:
$ mythtv /video/lost+found/<filename>
More information about the mythtv-users