[mythtv-users] recording retention rules

Stephen Worthington stephen_agent at jsw.gen.nz
Wed Nov 8 01:09:29 UTC 2017


On Tue, 7 Nov 2017 18:27:07 +0000, you wrote:

>Jim Abernathy <jfabernathy at outlook.com> wrote:
>
>> I think I understand this, but want to confirm with some experts.
>> 
>> If I have my mythtv 0.28 configured as default for TV recording retention, will all my recordings be kept until I delete them since I have 500GB of free space.
>
>Yes ... but ...
>
>There's a setting for how much free space to keep, and IIRC it defaults to 5G. This is (IIRC) per-entry in the storage group, so if you have 500G and only one recordings directory then nothing will be automatically expired.
>
>It gets much more "interesting" if you have multiple recordings directories. Then it's possible to have one directory full while you have plenty of free space in others - and then you can get newer recordings autoexpired before older ones, depending on various settings.

If you have multiple recording partitions where the free space is very
low on some and high on others (as happens when you add a new
recording partition), it is best to move recording files between the
partitions to balance up the free space.  You can do that manually by
just picking some files and moving them - but make sure that MythTV is
not going to be recording anything or playing anything so it is not
using the recording files at the time.  Or you could try my script I
have that automates the process by stopping automatically before the
next recording time or when the space is balanced.  It is available on
my web server:

http://www.jsw.gen.nz/mythtv/balance_storage.sh

Just put it in /usr/local/bin and give it full execute permissions:

chmod a+x /usr/local/bin/balance_storage.sh

You will need to also install two other packages it uses:
mythtv-status and xmlstarlet.  Then run it when MythTV is not busy and
it will stop when the storage is balanced or a recording is due to
start.  See the top of the file for more information.


More information about the mythtv-users mailing list