Failing rebooting

  • I updated my OpelELEC to LibreELEC and most of it works great.
    I use a NUC, and I mount some external disks from the network with a script at autostart.

    Code
    p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff}
    span.s1 {font-variant-ligatures: no-common-ligatures}#nas mountsmkdir -p /media/hdd1/mkdir -p /media/hdd2/mkdir -p /media/hdd3/mkdir -p /media/hdd4/mkdir -p /media/hdd5/mkdir -p /media/hdd6/mount -t cifs -o username=user,rw //192.168.0.103/hdd1 /media/hdd1/mount -t cifs -o username=user,rw //192.168.0.103/hdd2 /media/hdd2/mount -t cifs -o username=user,rw //192.168.0.103/hdd3 /media/hdd3/mount -t cifs -o username=user,rw //192.168.0.103/hdd4 /media/hdd4/mount -t cifs -o username=user,rw //192.168.0.188/disk1 /media/hdd5/mount -t cifs -o username=user,rw //192.168.0.188/disk2 /media/hdd6/


    That works great, but the problem is when I reboot. Even if I reboot from Kodi, or via SSH with "reboot", I get a screen on the TV with some OK's, but some failer messages about problem unmounting some of the disk.

    I've never seen this problem before, and I wonder if someone can help me with something I can do to try to solve this problem..

    Thanks.

    /Söder


  • Little more info would be nice. Like photo of the tv. And correct autostart.sh

    I will get a photo of the TV later..

    This is my autostart.. #!/bin/sh #start IRexec/usr/bin/irexec -d /storage/.config/.lircrc #hdd1 mount#/storage/.config/mount_hdd1.sh #nas mount( sleep 15 /storage/.config/mount_nas.sh)& #ftp mounts( sleep 20 /storage/.config/mount_ftp.sh)&

    And this is the mount_nas.sh
    #nas mountsmkdir -p /media/hdd1/mkdir -p /media/hdd2/mkdir -p /media/hdd3/mkdir -p /media/hdd4/mkdir -p /media/hdd5/mkdir -p /media/hdd6/mount -t cifs -o username=user,rw //192.168.0.103/hdd1 /media/hdd1/mount -t cifs -o username=user,rw //192.168.0.103/hdd2 /media/hdd2/mount -t cifs -o username=user,rw //192.168.0.103/hdd3 /media/hdd3/mount -t cifs -o username=user,rw //192.168.0.103/hdd4 /media/hdd4/mount -t cifs -o username=user,rw //192.168.0.188/disk1 /media/hdd5/mount -t cifs -o username=user,rw //192.168.0.188/disk2 /media/hdd6/

    Sorry for format of the scripts...


    /Söder
    [hr]
    Here's some bad pictures of the TV.

    KKwhsGT.jpg
    A2g5kPl.jpg
    MWL4Hr1.jpg

    It's all the It's most of the hdd1-hdd6 that fails.

    BUT, I just saw, that the reboot goes through anyway. Now, when I was writing this post, and not pulling the power cord on the NUC, I saw Kodi boot up again... But it takes like 2 minutes..

    But still, there's something wrong, isn't it?

    /Söder

    Edited once, last by soder (October 30, 2016 at 9:03 PM).

  • Yes

    What about stuff like "mkdir -p /media/hdd1/"? I needed create these folder with my other method. What about now?

    And, what shall my user and password be, if I used it like this before?mount -t cifs -o username=user,rw //192.168.0.103/hdd1 /media/hdd1/

    Where shall these .mount files be, and how do I get them to mount automatic?

    /Söder

    Edited once, last by soder (October 31, 2016 at 3:21 PM).

  • Those systemctl command is run only once. After reboot shares will always be mounted.

    OOOOh. Cool. It works. I didn't need to move them to system.d, but could run them from /storage/.config

    But, now when I did a 'reboot' from ssh, I got the same failure as before, but only for /var/media/hdd5. It even happen when I do a reboot from within Kodi sometimes...
    EDIT:(Now on update, and the reboot that follows that, even more hdd's failed unmounting..

    Also, what happens if I boot up LibreELEC and the networks drive is offline? Are the folders there then, but with no content?

    /Söder
    [hr]
    Looks like there's is a problem. Or, is this a complete different thing?

    LibreELEC
    systemd: Do not unmount /storage and /flash at shutdown as this always fails by MilhouseVH · Pull Request #546 · LibreELEC/LibreELEC.tv · GitHub

    Looks like my problem wasn't about how I had did my mounts...

    /Söder

    Edited once, last by soder (October 31, 2016 at 7:09 PM).

  • What happens if you unmount them via

    Code
    systemctl stop nameofmy.mount


    Then check

    Code
    systemctl status nameofmy.mount

    Also, why are you mounting things in /var/media? Why not mount them into /storage/something???


  • What happens if you unmount them via

    Code
    systemctl stop nameofmy.mount


    Then check

    Code
    systemctl status nameofmy.mount

    Also, why are you mounting things in /var/media? Why not mount them into /storage/something???

    I use /media since when I had a HTPC with 4 hdd's. The hdd1 was also the one OpenELEC was installed, and I wanted the rest of the 1TB be where the other hdd's was, and that was in /media, since the other where mounted there automatically. When I then also had a NAS, I mounted them to /media.

    I'm now on a NUC, with a small ssd, and I still use my old HTPC as a "server", and from an old habit I want to mount all disks to the NUC at /media.

    About the "stop" and "status".

    ● media-hdd6.mount - cifs mount hdd6 script
    Loaded: loaded (/storage/.config/media-hdd6.mount; enabled; vendor preset: disabled)
    Active: inactive (dead) since Tue 2016-11-01 09:24:16 CET; 11s ago
    Where: /media/hdd6
    What: //192.168.0.188/disk2
    Process: 28533 ExecUnmount=/bin/umount /media/hdd6 (code=exited, status=0/SUCCESS)

    ● media-hdd5.mount - cifs mount hdd5 script
    Loaded: loaded (/storage/.config/media-hdd5.mount; enabled; vendor preset: disabled)
    Active: inactive (dead) since Tue 2016-11-01 09:24:16 CET; 4min 22s ago
    Where: /media/hdd5
    What: //192.168.0.188/disk1

    I don't know what to look for. I see a Process on hdd6, but not on the other, but there's also this line:
    "Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable."

    When I now go to /media, all the hdd1-hdd6 folders are there, but only hdd6 is empty. The other seems to still work.

    Can it be something with "username=user,password=" I use in the .mount? Should that be something else?

    /Söder

    Edited once, last by soder (November 1, 2016 at 9:01 AM).

  • I did some thinking, and thought that my problem could have something to do with my Transmission running.

    I renamed the start script for Transmission and rebooted, and then rebooted again. Then I got no failures and the reboot went through in about 10-20 seconds.

    So, what can I do then? Is there a way to have Transmission stop first?

    Maybe it's something like this.. NFS automount + transmission race condition on shutdown/reboot - Help and Support - OSMC Forums

    /Söder

    Edited once, last by soder (November 1, 2016 at 4:14 PM).