[mythtv-users] MythTV miscalculates the amount of free disk space

Michael T. Dean mtdean at thirdcontact.com
Mon Mar 4 12:02:06 UTC 2019


On 03/02/2019 11:38 AM, Jan Ceuleers wrote:
> On 02/03/2019 17:32, Jonatan Lindblad wrote:
>> Den 2019-03-02 kl. 12:58, skrev Jan Ceuleers:
>>> On 02/03/2019 12:36, Paul Harrison wrote:
>>>> Since both drives are empty and otherwise identical, mythbackend can't
>>>> tell them apart. For all it knows the mounts point to the exact same
>>>> drive. Until there is content on one or both of the drives it's unable
>>>> to tell them apart.
>>> Thanks Paul.
>>>
>>> Sounds like a bug to me though. I thought that the backend verified it
>>> could write to each storage group by creating temporary files, so if
>>> that's correct it would also be an opportunity for it to find out
>>> whether directories it thinks are the same are in fact.
>> Nope, it is not a bug.  See this thread for example https://lists.gt.net/mythtv/users/280821#280821
> Thanks Jonathan. Now that a recording has been stored on one of these
> new disks the backend does indeed recognise the disks as separate.
>
> Still looks like a bug to me though, even if it works as designed.
>
> Anyway, case closed - thanks.

Patches for a new feature that can distinguish the disks are gladly 
accepted.  We'd love to see how you solve the problem.

You can't use the disk ID's--not every backend has direct file system 
access (some see the same file system via NFS, some via CIFS, some via 
...).  You can't use a temporary file written to see if it exists on 
both (some users have multiple different directories on the same file 
system in different Storage Groups and some users have multiple network 
shares on the same file system all with no common directory available 
within both directory structures).  You can't use any approach that 
requires testing or flagging or ... at setup because Storage Groups can 
change outside of MythTV (directory names stay the same but the volumes 
mounted in those locations change). I'm sure there are many other varied 
use cases that your patch will include ingenious methods for reliably 
distinguishing the differences between various configurations of file 
systems/mounts.

In the end, we decided that it's not a problem as the user can see all 
the storage outside of MythTV and the false negative test for uniqueness 
(thinking 2 different file systems are the same) is only likely to occur 
with new, empty disks (meaning lots of storage available) and that a 
false positive test for uniqueness would be significantly worse than a 
false negative--i.e. it's much better that we say, "You only have 4TB 
available," and you're later happily surprised to see that you have a 
full 8TB available than to say, "You have 1GB available," when you 
actually have lots more and you're not-happily surprised to see that 
MythTV started deleting shows in the auto-expiration list to make room 
for new recordings even though you had plenty.

I will agree that it makes it difficult for the user to see if his 2 
new, identical disks were properly recognized by MythTV after changing 
around the settings, but I don't have an answer for how to handle all 
the varied configurations that can exist.  The only approach that's ever 
been proposed that is guaranteed to work is to go back to the 
pre-Storage-Groups approach of having a single directory into which all 
recordings are written, but that's not my preferred solution.

Mike


More information about the mythtv-users mailing list