[mythtv-users] rebalance deleted recordings

Warpme warpme at o2.pl
Thu Mar 20 17:52:54 UTC 2014


On 20/03/14 14:22, Brian J. Murrell wrote:
> Every now and then the amount of space that deleted recordings consume
> on my various storage drives gets way out of balance.  You might ask
> "who cares?".  But it is an important metric.
>
> The reason it's so important is that when your drives are full (which
> they should always be since deleted recording expiration happens on
> demand -- as space is required for new recordings) and mythtv wants to
> record something it expires recordings from the drive it wants to record
> to.  However, if there are no deleted recordings on the drive it wants
> to record to it will start expiring non-deleted recordings.  And it will
> even do this if there are deleted recordings on other drives but it
> needs to use all of the drives to balance recording I/O load.
>
> So the solution here is to rebalance the storage drives, moving
> recordings from a disk that has no deleted recordings on it to a disk
> that has lots of deleted recordings on it.
>
> I wonder if anyone has written this script yet, before I set off and
> write it.
>
> Cheers,
> b.
>
>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org
Yeah,
I had this king of problem when I added new 4T HDD (/myth/tv1) to my 
default recording storage group.
Before addition, this SG had single, 3T dir. (/myth/tv) full of recordings.
I add 4T HDD and added /myth/tv1 dir to SG.
After sometime I started experience deletion of non-expirable 
recordings. Investigation shows me that it is because /myth/tv has 100% 
non-expirable recordings. Despite that, myth schedules storage rec. to 
/myth/tv/ so some non-expirable rec. had be deleted to make room for new 
recordings.
This is IMHO result deficiency of myth SG scheduler (as I think it not 
takes into account expirable rec.size) .
Solution was to re-balance occupancy of expirable recordings between on 
all members of SG (target is to have equal amount of expirable rec. on 
each member of SG).
Now, after 6 months I see creeping out-of-balance, so after some time 
I'll have to repeat balancing process:

---------------------------------------------------------

Rec.group        : any
Source vol.      : /myth/tv
Destination vol. : /myth/tv1

/myth/tv:
     All recordings   : 2.2T    total
     Non-expirable    : 1.5T    total

/myth/tv1:
     All recordings   : 3.4T    total
     Non-expirable    : 2.8T    total

---------------------------------------------------------


I wrote bash script to interactively doing this - but as it not uses 
perl/python bindings - I'm not attaching it here.
If You are interested - pls PM me.
br



More information about the mythtv-users mailing list