[mythtv-users] Two new physical drives appear as subdirectories of the same drive: why?

Mike Perkins mikep at randomtraveller.org.uk
Sun Mar 6 23:03:07 UTC 2022


On 06/03/2022 22:03, UB40D via mythtv-users wrote:
> On Sun, 6 Mar 2022 at 00:33, Gary Buhrmaster <gary.buhrmaster at gmail.com>
> wrote:
> 
>> On Sat, Mar 5, 2022 at 11:56 PM UB40D via mythtv-users
>> <mythtv-users at mythtv.org> wrote:
>>
>>> Thanks for this explanation but I find it mindboggling... Why does Myth
>> need "heuristics" when perfectly reliable first-hand information is
>> available from the computer and OS about which drive is which?
>>
>> Because some people choose to use different
>> directories on the same drive, and therefore
>> the amount of space available on the drive is
>> not always a simple thing to calculate.  Only
>> when the available space is different does
>> MythTV "guess" that they must be different
>> drives (and calculates space as if they are
>> different).
>>
> 
> I am not sure I understand the problem the programmers experienced when
> they wrote the code that way. It seems to me that there is no need for
> heuristics (= guesswork) when unequivocal information is readily available.
> 
> for every directory d listed in mythtv setup as containing recordings:
>     df -h $d will return something like
> Filesystem      Size  Used Avail Use% Mounted on
> /dev/sdd1        17T   16T  294G  99% /mnt/wd18000a1
> 
> so it is trivial to figure out both
> a) how much free space is left on the drive that hosts that directory
> b) whether that directory is on the same filesystem or drive of any other
> directory (to avoid double-counting)
> 
> I may be missing something crucial but I still fail to see why any
> guesswork might be needed.
> 
> BTW I did copy some files from the "recording" drive to one of those new
> "read-only" drives and indeed they now appear as separate drives, and the
> reported total amount of free space is now what I expected, so thanks to
> David and you for that suggestion.
> 
Your arrangement implies that one partition = one storage directory. In the past this was not always 
the case. Users may have created more than one storage directory on a single partition, perhaps to 
keep different recordings separate or for other reasons. When that is true it is not possible to 
discover the free space in each storage directory. Indeed, there may have been other non-myth 
directories on those devices as well, adding to the fun.

In these days, when storage is stupid cheap, such configurations are not usually necessary.

-- 

Mike Perkins



More information about the mythtv-users mailing list