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

Gary Buhrmaster gary.buhrmaster at gmail.com
Mon Mar 7 06:09:04 UTC 2022


On Mon, Mar 7, 2022 at 2:28 AM Stephen Worthington
<stephen_agent at jsw.gen.nz> wrote:
>
> On Sun, 6 Mar 2022 23:03:07 +0000, you wrote:
>
> >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.
>
> But they do still exist.  I have two directories in different storage
> groups on each of my recording drives.  One is for my recordings, and
> the other is for recordings I did for my mother from my pay satellite
> service.  Her MythTV box has access to the directories containing her
> recordings, and I can transfer the database entries for them to her
> box so that they show up there are normal recordings.  All of that is
> now redundant as her MythTV box now has access to SAT>IP tuners for my
> satellite service and she records the satellite programmes that way.
> But there are still quite a few old recordings left in her
> directories.

I would recommend that UB40D, if they think they have
a better approach, submit a PR, remembering that those
people who use subdirs still exist and need to be handled
appropriately.

As with much of MythTV, the problem space is often
more complex than some people may initially realize,
but new approaches that handle the old, and the new.
are always encouraged.

Do (PR), or do not (no PR), there is no kibitz.


More information about the mythtv-users mailing list