[mythtv-users] wanted: script to balance autoexpire recordings in storage dirs to avoid premature deletion

Peter Watkins peterw at tux.org
Fri Jan 21 03:58:10 UTC 2011


On Mon, Jan 17, 2011 at 11:58:49AM -0500, Michael T. Dean wrote:
>   On 01/14/2011 01:08 AM, Peter Watkins wrote:

> > Here's what I'd like: a script I could run periodically (via cron,
> > probably at least daily) that would examine the Autoexpire list for
> > the entire storage group
> 
> There is only one autoexpire list--that includes all recordings on all 
> hosts and in all Storage Groups and all the SG directories.  (So, you'll 
> have to "sort it out" yourself.)  The list is available with:

I have no problem with that!

> mythbackend --printexpire

This looks pretty good, but it's more "human-readable" than designed
for a script -- e.g. (at least in Ubuntu's 0.21+fixes) it lists 
title or title : subtitle. It would be great if this also printed
the filename, but perhaps the file size in MB will suffice.

> "Soon", changes will go into MythTV that will allow us to completely 
> change the way we're storing information about recordings (and MythVideo 
> videos).  Once these changes are in, a gradual transition to the new 
> "recordedfile" schema layout will take place.  Once that transition is 
> complete for recordings, it will allow us to identify where each 
> recording "most likely" exists.
> 
> Additionally, we*** plan to move some code that currently exists only 
> within the auto-expirer to be available to all of MythTV.  This code 
> tracks which SG directories are available from which hosts, where those 
> directories are redundant, and which host is the "local" host for the 
> directory.  Once that is available and we know where each recording most 
> likely exists, we'll have 2 new capabilities:  first, we'll be able to 
> identify the most-efficient path for getting the recording from disk to 
> the frontend/client that requests it (as MythTV will actually understand 
> your file system layout); and second, we'll be able to create a new SG 
> scheduler method that takes into account auto-expire priority when 
> choosing the most-appropriate directory/filesystem to use for a new 
> recording.  Unfortunately, there's a lot of work that has to happen for 
> this to become a reality, so you'll likely want to do your script for 
> the (not-so) short term.

:-) 

Many thanks for your help!

-Peter

> *** Currently, there's probably more "me" in this "we" than anyone else, 
> but assuming someone smarter than I doesn't provide a good reason not to 
> do this, it will be the plan.  :)



More information about the mythtv-users mailing list