[mythtv-users] storage drives unmountion

Leo Butler leo.butler81 at googlemail.com
Sun Jul 19 22:44:18 UTC 2020


Daryl McDonald <darylangela at gmail.com> writes:

> On Fri, Jul 17, 2020 at 8:31 AM Stephen Worthington <
> stephen_agent at jsw.gen.nz> wrote:
>
>> On Fri, 17 Jul 2020 06:54:37 -0400, you wrote:
>>
>> >Last summer, when OTA recordings declined, I used Kodi more frequently. I
>> >replaced every component suspecting a hardware failure. After some serious
>> >head knocking I figured my drives were becoming corrupt due to some
>> >imported recordings from my daughter's failing windows laptop. Things
>> >settled down and a new season of OTA recordings proved my theory, I
>> >thought. This summer, as kodi usage increased I would see crawling
>> messages
>> >indicating that a drive had been successfully unmounted. I guess I was
>> >wrong, so I bought an Android TV box for Kodi, suspecting tha Kodi didn't
>> >play nice with Mythtv.
>> >Now I see Chewit's post, from this:
>> >https://forum.kodi.tv/showthread.php?tid=297545 article and I'm wondering
>> >if my drives were corrupted last year because Kodi unmounted them during
>> >recordings, because they had "labels" storage1,2, or 3. Has anyone else
>> had
>> >problems using kodi and Mythtv on the same box with labeled recordings
>> >storage space?  TIA  Daryl
>> >
>> >last year Ubuntu 18.04 and myth 0.29, this year Ubuntu 20.04 and myth 31,
>> >same labeling system throughout.
>>
>> Whenever you have a partition that is not unmounted before the drive
>> is shut down (eg power failure, the system crashed, the USB cable got
>> pulled out), you always want to run a full fsck on it before using it
>> again.  If you have not been doing that, you could have corrupt
>> partitions.  So you should do "fsck -C -f <partition>" on all your
>> suspect partitions.  If you get any errors that need fixing, fix them
>> and then run fsck -C -f again and keep doing it until it runs and says
>> there are no errors.  If you fail to do this and leave the filesystem
>> on a partition in a corrupted state, and then write to that partition,
>> the corruption only gets worse until the partition becomes unusable.
>>
>> If you are using labels on your partitions for mounting them, this is
>> no different these days than using UUIDs or directly specifying the
>> partition using /dev/sdXn.  A long time ago, there could be problems
>> with using labels with some filesystems, but those problems were
>> fixed.  Ubuntu 18.04 is well beyond the kernels where those fixes
>> happened.
>>
>> The article you referred to is about LibreELEC, a specialised distro
>> for running Kodi.  The article looks as though it is about using UDEV
>> rules to do automounting of partitions, and is irrelevant for Ubuntu
>> unless you have added such UDEV rules yourself.  It could be relevant
>> to your Kodi boxes if they were running LibreELEC, but you said they
>> are Android.
>>
>> Importing recordings from a failing laptop can not corrupt the system
>> the files are copied to.  The only effect the imported recordings can
>> have is that the files themselves may be corrupt and not play
>> properly.
>>
>> Kodi when working with MythTV uses a plugin that allows it to be a
>> client of a MythTV server.  Kodi does not have any way of affecting
>> the recording files except by asking the MythTV server to do
>> something.  It does not have direct access to the recordings, but just
>> gets the data from a recording streamed to it by MythTV.  I can not
>> see any way that using Kodi could cause corrupt recordings.  There are
>> lots of MythTV users who use Kodi with no problems.
>>
>
> Not Kodi with Myth, just independently on the same PC.(each using its own
> FE) Last summer I was using ACPI wake up, and would sometimes find the box
> in limbo, unable to boot until the storage drives were fsck'ed, I abandoned
> ACPI and ran the box 24/7, but, seemingly,  at random drives would unmount
> and or remount with a pop sound as my clue, to fsck again.
>
>>
>> You need to tell us more about the crawling messages about unmounting.
>> Partitions should not be being unmounted unless you told the system to
>> do that.  Are those messages about network mounts, or actual
>> partitions?  I have never seen messages like that - are they being
>> displayed by Kodi?  What partitions do they refer to?  If they contain
>> recordings, and the unmounting is happening on the Ubuntu/MythTV box,
>> then you may get failed recordings due to not having a partition to
>> record to.  But unmounting could not happen with a recording in
>> progress as any open file on a mounted partition prevents unmounting
>> from being possible.  The system simply will not and can not unmount
>> any partition that is actually being used.
>>
>
> This year, because Android box does not have multiple desk-tops I bought a
> renewed  mini PC with windows. After installing kodi and OpenVpn, with kodi
> running I see the crawler,at the top of the screen "successfully unmounted
> drive" (it may have been more specific, but I went into shock and don't
> remember). There is only one drive in this PC so it must have been one of
> MS's restore partitions. With an SSD with Ubuntu 18.04, Kodi and OpenVpn,
> no such message. (one drive, one partition) Similarly, nicely into the
> summer, after significant Kodi usage, I see the crawler "successfully
> unmounted drive" and I freaked, not wanting a repeat of last summer, and
> got the android box.
>
>>
>> What is the basic problem you are getting?  Are you getting filesystem
>> corruption of your partitions (so that running fsck reports errors)?
>> Or are you getting corrupt recordings which do not play properly?
>>
>
> Problem is I can't get Kodi and Myth to play nice with each other. And it's
> not hardware, all the hardware from the original and subsequent faults has
> been repurposed in different locations, or compositions, and are
> functional. Separating the two programs is working/meeting my media center
> needs, with the added inconvenience of having two wireless keyboards and
> mice alongside  the armchair. (I'm not a remote kinda guy)

Daryl, It would be helpful to see the logs from the kodi backend. Having
said that, my first move would be to remove all mount/unmount privileges
from the kodi user (and if you are running kodi as a regular user, I
would create a special kodi account for such purposes). 

There are plenty of tools in gnu/linux to make the two programs
cooperate, but the most basic are separate accounts.

Leo


More information about the mythtv-users mailing list