[mythtv-users] storage drives unmountion

Daryl McDonald darylangela at gmail.com
Fri Jul 17 17:13:33 UTC 2020


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)

>
> You should be able to see all labeled partitions here:
>
> ls -al /dev/disk/by-label
>
> Here is what I get on my MythTV box:
>
> root at mypvr:~# ll /dev/disk/by-label/
> total 0
> drwxr-xr-x 2 root root 460 Jul 17 07:53  ./
> drwxr-xr-x 8 root root 160 Jul 17 07:52  ../
> lrwxrwxrwx 1 root root  10 Jul 17 07:52  rec1 -> ../../sdb3
> lrwxrwxrwx 1 root root  10 Jul 17 07:52  rec1boot -> ../../sdb1
> lrwxrwxrwx 1 root root  10 Jul 17 07:52  rec2 -> ../../sdd2
> lrwxrwxrwx 1 root root  10 Jul 17 07:52  rec2boot -> ../../sdd1
> lrwxrwxrwx 1 root root  10 Jul 17 07:52  rec3 -> ../../sda5
> lrwxrwxrwx 1 root root  10 Jul 17 07:52  rec3boot1 -> ../../sda2
> lrwxrwxrwx 1 root root  10 Jul 17 07:52  rec3boot2 -> ../../sda3
> lrwxrwxrwx 1 root root  10 Jul 17 07:52  rec3boot3 -> ../../sda4
> lrwxrwxrwx 1 root root  10 Jul 17 07:53  rec4 -> ../../sdp1
> lrwxrwxrwx 1 root root  10 Jul 17 07:52  rec5 -> ../../sdc1
> lrwxrwxrwx 1 root root  10 Jul 17 07:53  rec6 -> ../../sdo1
> lrwxrwxrwx 1 root root  10 Jul 17 07:52  rec7 -> ../../sde1
> lrwxrwxrwx 1 root root  15 Jul 17 07:52  ssd1 -> ../../nvme0n1p3
> lrwxrwxrwx 1 root root  15 Jul 17 07:52  ssd2 -> ../../nvme0n1p4
> lrwxrwxrwx 1 root root  11 Jul 17 07:52
> 'Ubuntu\x2018.04\x20LTS\x20amd64' -> ../../loop2
> lrwxrwxrwx 1 root root  10 Jul 17 07:53  UUI -> ../../sdf1
> lrwxrwxrwx 1 root root  10 Jul 17 07:53  vid1 -> ../../sdl2
> lrwxrwxrwx 1 root root  10 Jul 17 07:53  vid1boot -> ../../sdl1
> lrwxrwxrwx 1 root root  10 Jul 17 07:53  vid2 -> ../../sdm1
> lrwxrwxrwx 1 root root  10 Jul 17 07:53  vid3 -> ../../sdn1
> lrwxrwxrwx 1 root root  10 Jul 17 07:53  vid4 -> ../../sdk1
>
> Here is the fstab entry for my rec1boot partition:
>
> LABEL=rec1boot          /mnt/rec1boot   ext3
> relatime,errors=remount-ro,nofail 0  2
>
> (sorry, my email client wraps long lines)
>
> So if I need to do fsck on my rec1boot drive, I would do this:
>
> sudo su
> umount /mnt/rec1boot
> fsck -C -f /dev/disk/by-label/rec1boot
> mount /mnt/rec1boot
> exit
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20200717/4f78e7d8/attachment.htm>


More information about the mythtv-users mailing list