wired CIFS won't auto mount after reboot

  • OK, I give up and need a hand. I followed the instructions in the wiki here to setup the sample cifs mount script.
    Created a file in system.d call storage-recordings.mount

    I can do: systemctl enable storage-recordings.mount
    and I get the proper symlinks for the directory.

    I can then do: systemctl start storage-recording.mount

    and it works fine.

    Upon reboot, if I am using wired ethernet I get this error: (If I use Wireless it's fine)

    I can type in the Process: 530 command manually and it works:

    Code
    mount //192.168.2.98/Share/Plex/DVR /storage/recordings -t cifs -o username=XXXXX,password=XXXXXX,rw,vers=2.1 (code=exited,
    status=255)

    Reboot and it's gone again. It seems as if the LAN connection isn't truely up yet even those the script says "after network-online.service" This is verified by using WLAN connection with no issues.

    I tried to go into LibreElec settings ->Network->Advanced Network Settings ->Wait for network before starting kodi == ON, and Max Wait Time set up to 30secs.
    This made no difference.

    Anybody know how I can fix this?

    • Official Post

    not sure what happens here, maybe the >1 network cards creating some problem here

    some fix

    add an delay to the mount script (5sec ... or whatever works)

    ExecStartPre=/bin/sleep 5

    not sure if this works but I guess you can easily try this

  • No go on the sleep, I set it up to 15 seconds and it does the same thing.

    I Get Error: Unknown lvalue 'ExecStartPre' in section 'Mount'

    BTW: Hardware is a RPi2, LibreELEC 8.2.4

    Edited once, last by mudrunner88 (April 9, 2018 at 8:50 PM).

  • And if you set "wait for network" in Settings/LibreELEC/Network?

    At the end of my first post I stated that I set that as high as 30 seconds and still no joy.

    Here is systemctl list-dependancies storage-recordings.mount

    Code
    storage-recordings.mount
    ● ├─network-online.service
    ● ├─system.slice
    ● └─network-online.target
    ●   └─kodi-waitonnetwork.service

    To me those look good, but I'm not a Linux Guru

    Edited once, last by mudrunner88 (April 9, 2018 at 8:25 PM).

  • So I disabled any extra services I added (tvHeadEnd Specifically) and the same issue occurs.

    Reading the JournalCTL -b shows that right before the cifs mount fails I get the following error:

    Code
    connmand[317] Online check failed for 0x112c470 Wired

    Tried multiple ethernet cables and have same problem.

    UPDATE:

    The above error only occurs when using a static IP address that is Wired. If I use wired DHCP the cifs mounts no problem, If I use STATIC or DHCP the cifs mounts no problem.

    This is starting to looking like something that might need to be patched milhouse

    I will continue trying to debug this afternoon as time persists.

    Edited once, last by mudrunner88 (April 11, 2018 at 5:44 PM).

  • So I tried something new and it works but sounds like a temp fix.

    The way my network is setup, I have my router plugged in to a SoHo Netgear 24port switch. My RPi2 was plugged into a port on the switch and all connectivity worked fine (except for above said problem with cifs).

    I took the RPi ethernet cable and put it right into the back of my Router on an extra port and it works great all of the sudden.

    I find this rather puzzling. The switches are layer 2 so it shouldn't be looking for an IP address, rather it would go by MAC address.

    I know the MAC address table has the RPi's MAC in it, because it works fine once kodi is running.
    I wonder if Connman isn't waiting long enough for the test to complete, or if latency is high it might fail.

    So this sounds like an issue with Connman, not the timing of the execution as I thought before.