[mythtv-users] understanding storage group balancing
Stephen Worthington
stephen_agent at jsw.gen.nz
Thu Aug 6 17:46:39 UTC 2020
On Thu, 6 Aug 2020 13:41:15 -0400, you wrote:
>
>On 8/6/20 1:23 PM, Stephen Worthington wrote:
>> 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.
>
>I'm going to check out the script for later use, but I think my problem
>is outside use of the drives and not a mythtv problem.
>
>Jim A
That is one of the reasons to use the script. I run it when I put
heaps of new music files in my music directory, which is on one of my
recording drives. The other main use I have for it is when I add or
upgrade a recording drive. Recently I upgraded an old 3 Tbyte drive
to a new 16 Tbyte one, so I had to run the script over several days to
balance the free space again.
More information about the mythtv-users
mailing list