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

UB40D ub40dd at googlemail.com
Sun Mar 6 22:03:23 UTC 2022


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20220306/33165b76/attachment.htm>


More information about the mythtv-users mailing list