[mythtv-users] Balancing the free space after adding a new storage drive or partition

Stephen Worthington stephen_agent at jsw.gen.nz
Sat Mar 16 07:04:14 UTC 2013


Over the years I have been using MythTV, I have regularly run out of
storage and had to add a new recordings drive.  But when you do that,
you wind up with a lot of old storage partitions which are full or
nearly full, and one almost empty partition on the new drive.  This
results in all your recordings going only to the new drive, as
mythbackend does not normally expire recordings while there is free
space available.  So if too many recordings happen at the same time,
all on the new drive, then bits go missing from some of the
recordings.  So what I used to do was to manually move enough
recordings from my older storage partitions to the new one to allow
mythbackend to record to all of them as necessary.  That was a fiddly
and time consuming process, so eventually I wrote a script to do the
job.  I have recently enhanced the script and updated it for
compatibility with MythTV 0.26, and now it seems good enough (and
foolproof enough) for other people with the same problem to be able to
make use of it.

I have put a copy of the script on a blind URL on my personal web
server for anyone who would like to try it:

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

Please consider it to be beta software.  I have used it myself and
tested it fairly thoroughly, but there could still be bugs.  Please
let me know here if you have any problems or suggestions.  I make no
promises to be able to add new features, as the time I have available
to work on it is limited, but it never hurts to ask.  I will endeavour
to fix any bugs that are found.

The comments at the top of the script tell you how to use it, so if
you are interested just download a copy and take a look.


More information about the mythtv-users mailing list