[mythtv-users] understanding storage group balancing

Stephen Worthington stephen_agent at jsw.gen.nz
Thu Aug 6 17:23:25 UTC 2020


On Thu, 6 Aug 2020 11:28:26 -0500, you wrote:

>On 8/6/20 11:07 AM, Jim Abernathy wrote:
>> I've been observing that no recordings are being written to one of my directories in my Storage Group - Default.  I have 2 directories defined 
>> but only one has any files in it. The volume that is getting all the recordings has  about 300GB of free space more than the other volume.
>> 
>> df -h shows:
>> 
>> /dev/md1        1.8T  402G  1.4T  24% /mnt/md1
>> /dev/md0        1.8T  702G  1.1T  41% /mnt/md0
>> 
>> jim at mythbuntu:~$ ls /mnt/md1/recorded-tv2/
>> 10404_20200806103000.ts      11701_20200806110000.ts
>> 10404_20200806103000.ts.png  11701_20200806110000.ts.png
>> jim at mythbuntu:~$ ls /mnt/md0/recorded-tv1/
>> lost+found
>> jim at mythbuntu:~$
>> 
>> So my question: is mythtv using the storage group directory that is on the volume with the most free disk space?
>
>Check which "Storage Group Disk Scheduler" is in use.
>
>You probably want "Balanced Free Space" 'til the 2nd disk fills.
>
>Then switch to your preferred scheduler, e.g."Balanced Disk I/O"
>
>Ref: https://www.mythtv.org/wiki/Setup_Storage_Directories#Storage_Group_Disk_Scheduler
>
>> I was kind of hoping that it would use the 2 directories on different volumes to balance the writes for multiple recordings at the same time.
>
>It can.

If you want to correct the balance immediately, I have a script that
does that:

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

It will move files from the most full drive to the most empty one
until all directories in the Default storage group are within 20
Gibytes of the same amount of free space.  It stops automatically when
it gets too close to the time for a recording to start, or you can
stop it manually at any time.  The files to move are selected
randomly.  See the comments at the beginning of the file for how to
use it.


More information about the mythtv-users mailing list